Heirarchies and if statements. AS2
- d8b
-
d8b
- Member since: Nov. 2, 2008
- Offline.
-
- Forum Stats
- Member
- Level 04
- Blank Slate
I have 2 questions about actionscript.
Question Number 1:
Okay umm so I have a menu, and there's a two movieclips.
On the first movieclip(Labeled "INST_BUTTON"), its a transition for a button to appear. The last frame it stops and a button is formed.
On the second movieclip, it is labeled "INST". It shows a Images appearing. The first frame is blank and has a "stop();" script. From the second frame to the sixteenth frame, it shows the button appearing. From the seventeenth frame to the thirty-second frame, it shows a animation loop, on the last frame of the loop it goes back to the seventeenth frame so it loops again and again. And from thirty-third frame to the forty-eighth frame, it shows the image fading out.
What I want to do is, from the first movieclip's button, hmm I'll just put this in pseudo code.
on(rollOver){
_("INST").gotoAndPlay(2);
if(rollOut at Frame 17){
gotoAndPlay(33);
}else if(rollOut at Frame 18){
gotoAndPlay(34);
}else if(rollOut at Frame 19){
gotoAndPlay(35);
}else if(rollOut at Frame 20){
gotoAndPlay(36);
}else if(rollOut at Frame 21){
gotoAndPlay(37);
etc~~
}else if(rollOut at Frame 32){
gotoAndPlay(48);
}
}
If you don't understand, just ask.
Date-B.
- d8b
-
d8b
- Member since: Nov. 2, 2008
- Offline.
-
- Forum Stats
- Member
- Level 04
- Blank Slate
Actually, I asked both questions in that thingy.
Just fix the code, and tell me what parts I was wrong at.
Date-B.
- d8b
-
d8b
- Member since: Nov. 2, 2008
- Offline.
-
- Forum Stats
- Member
- Level 04
- Blank Slate
Date-B.
- Denvish
-
Denvish
- Member since: Apr. 25, 2003
- Offline.
-
- Send Private Message
- Browse All Posts (15,977)
- Block
-
- Forum Stats
- Member
- Level 46
- Blank Slate
Not sure exactly what you're asking, but try this
on(rollOver){
INST.gotoAndPlay(2);
}
on(rollOut){
if(_currentframe==17){
gotoAndPlay(33);
}else if(_currentframe==18){
gotoAndPlay(34);
}else if(_currentframe==19){
gotoAndPlay(35);
}else if(_currentframe==20){
gotoAndPlay(36);
}else if(_currentframe==21){
gotoAndPlay(37);
}else if(_currentframe==32){
gotoAndPlay(48);
}
} - d8b
-
d8b
- Member since: Nov. 2, 2008
- Offline.
-
- Forum Stats
- Member
- Level 04
- Blank Slate
It doesn't work.
Heirarchies are difficult. :/
I need to get both scripts to refer to the 'INST' movieclip.
And INST.//actions
Doesn't work.
Date-B.
- Denvish
-
Denvish
- Member since: Apr. 25, 2003
- Offline.
-
- Send Private Message
- Browse All Posts (15,977)
- Block
-
- Forum Stats
- Member
- Level 46
- Blank Slate
At 3/18/09 11:34 AM, d8b wrote: It doesn't work.
Heirarchies are difficult. :/
I need to get both scripts to refer to the 'INST' movieclip.
And INST.//actions
Doesn't work.
on(rollOver){
_root.INST.gotoAndPlay(2);
}
on(rollOut){
if(_currentframe==17){
_root.INST.gotoAndPlay(33);
}else if(_currentframe==18){
_root.INST.gotoAndPlay(34);
}
//etc etc
} - d8b
-
d8b
- Member since: Nov. 2, 2008
- Offline.
-
- Forum Stats
- Member
- Level 04
- Blank Slate
Date-B.


