Home arrow Message Forum
Message Forum
Welcome, Guest
Please Login or Register.
Lost Password?
Turn movieclips into buttons? (1 viewing)
_GEN_GOTOBOTTOM Post Reply Favoured: 0
TOPIC: Turn movieclips into buttons?
#34
dwella (User)
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
Turn movieclips into buttons? 2007/10/25 17:37 Karma: 1  
Hi Ive created a menu with movieclips and now I need to make them into buttons so I can browse my site. If I remember correctly I need to give the movie clips instance names right? Ive forgotten the code to make the buttons clickable, to make them go to different pages... Anyone wanna help me out?
Thanks!
  The administrator has disabled public write access.
#35
sstark (Admin)
Admin
Posts: 29
graphgraph
User Online Now Click here to see the profile of this user
Re:Turn movieclips into buttons? 2007/10/25 18:08 Karma: 0  
you're on the right track.

Yes, you have to first give each of the buttons instance names... I like to use a sequence naming scheem, like btn_0, btn_1, btn_2 ect so that I can easily address them through a loop. Then, I would code like this:

Code:

  var links:Array = new Array(  "link_url_1.html",  "link_url_2.html" ); for(x=0xlinks.lengthx++) {  _root["btn_"+x].my_index x;  _root["btn_"+x].onPress = function(){   getURL(_root.links[this.my_index], "_top"«»);  } }



I hope that helps.

Post edited by: sstark, at: 2007/10/25 18:09

Post edited by: sstark, at: 2007/10/25 18:17
--
Local Administrator
Site - StevenStark.com
  The administrator has disabled public write access.
_GEN_GOTOTOP Post Reply
Powered by FireBoardget the latest posts directly to your desktop

New Jobs

No items in list
We have 10 guests online
There are 89 items & 53 categories in the 'Portfolio Manager'
There are 38 posts in the Message Forum.