ugh why is this not working? simple onclipevent
OK here is what I'm trying to do.
I have rotating floppy disk that is triggered by a button.
When you roll over the button the floppy begins to rotate.
When you roll out the floppy will continue to rotate until you reach frame 15 where it will go to frame 1 and stop. The movie clip is assigned a name of floppy. I think the problem is with the if statement for the rollout for the onclipevent. Currently it all works but the rollout.
Any help would be appreciated.
Here is a link to the page:
www.zoosplace.com/preview/test.html
Here is the action script.
First frame in flash:
stop();
_root.floppy.stopfloppy=true
Floppy disk action script:
onClipEvent (enterFrame) {
if (stopfloppy) {
gotoAndStop(1);
}
}
onClipEvent (enterFrame) {
if (rolloverfloppy) {
play();
}
}
onClipEvent (enterFrame) {
if (rolloutfloppy) {
if (_currentframe<14) {
_root.floppy.nextFrame();
}
if (_currentframe=15) {
_root.floppy.gotoAndStop(1);
}
}
}
Button action script:
on (rollOver) {
_root.floppy.stopfloppy=false
_root.floppy.rolloverfloppy=true
_root.floppy.rolloutfloppy=false
}
on (rollOut) {
_root.floppy.stopfloppy=false
_root.floppy.rolloverfloppy=false
_root.floppy.rolloutfloppy=true
}
on the first frame
put
Code:
_root.floppy.gotoAndStop(1)
on the button put
Code:
on (rollOver) {
_root.floppy.move = true;
_root.floppy.gotoAndPlay(1)
}
on (rollOut) {
_root.floppy.move = false;
}
on the last frame of the floppy movieclip put
Code:
if (_root.floppy.move == false) {
gotoAndStop(1);
} else {
gotoAndPlay(1);
}
thanks
thanks you are the best.. I have been fighting this all day...
I will try it and let you know how it goes...
kinda works
ok it works better than before but i did not want the rollover action to disrupt the movement if it was already in action...
what does move equal.. or what value does it hold.
I think i can figure something out but if you have the answer on top of your head it would be appreciated.
OK now it works the way I want it to...
I just put play(); in place of gotoAndPlay(1) in the button actionscript...
Thanks again... you are a life saver
[sleep.less.ness]
Here's my allterations to your file
eG
Attached Files
Beware Of Programmers Who Carry A Screwdriver
thank for the help...
Thanks for the help...
Here is the final of what I was trying to do
http://www.zoosplace.com/preview/
Once again thanks...
[sleep.less.ness]
which method did you end up using?
eG
Beware Of Programmers Who Carry A Screwdriver
I ended up using fidodo's method. But I did like they way you did yours. I'm not sure the effects of using either way. As long as it does what I want I don't care too much about the code. Its just funny how my original code was off so much...
I guess I should pick up an actionscript book and learn it...
[sleep.less.ness]
looking back and comparing they are very similar, depends on your prefernce for coding style
eG
Beware Of Programmers Who Carry A Screwdriver
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width