anyone up for flash help?
- Started
- Last post
- 7 Responses
- lnu
Can't login to were-here for some reason, so:
This will be easy for some of you. I have eight buttons with instance names like "_root.btn1", "_root.btn2" and so on. I also have a var that's called "cat". Cat contains a number from 1 to 8 - the active button number at the moment. The buttons have _width and _x properties that I need to store in variables like _root.btn1.w (width) and _root.btn2.l. (left).
I want to use the cat variable and put it in the code to return the _width and _x propertys for the active button, like
_root.btn[cat].w or _root.btn[cat].l
What is the syntax for this thing?
Know what I mean?
Please help. Thanks.
- lnu0
anyone at all?
- unfittoprint0
wiser if you do this.
//Inside your [movieclip] buttons
this.onRelease = function(){
_parent.active.gotoAndPlay("inac...
this.gotoAndPlay("active");
_parent.active=this;
}//In the main timeline you'll just have to do something like
myVar= active._width
myVar= active.buttonVar
etc. . .
- bug0
haha, hey unfit, do you have some sorta special NT preference where NT pages you once someone starts a flash thread...'cause HOTDAMN yer quick!
I still think you work for MM ;)
The mystery continues...
Yer one'a the best resources on NT IMHO
- lnu0
thanks unfit - you sure are trustworthy, but if I want to do it my way? (The cat var comes from a html-page).
- chinzon0
you can use the eval() function
- lnu0
cool, that hit the spot.