|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Animated buttons - keeping movie playing after mouseOff
Hello,
I am trying to make an animated button where the mouseOver action starts a movie that completes irrespective of whether the mouse actually stays over the buttons. I can create buttons where the movieClip starts on mouseOver and stops/reverts back to start on mouseOff (not sure of correct terminology here!), but not where the movie goes to the end even though the mouse has moved away. I have tried several tutorials downloaded from the internet, but can't seem to get them to work.Sometimes Flash keeps telling me the scripting is wrong, but when I try and make corrections accordingly Flash repeats the debugging message as nothing has been changed. I don't know actionScript well enough to do this from scratch myself, so some advice would be most welcome. It seems like such a simple thing to do - there must be some way I can manage it! Thanks |
|
#2
|
|||
|
|||
|
use an mc rather than a button - they are much more powerful - like this:
Code:
//on main timeline
my_mc.onRollOver = function() {
this.play();
}
//on frame 1 of my_mc timeline
stop();
|
|
#3
|
|||
|
|||
|
Thanks for the code. I tried it and came up with the following error messages from Flash. I hope I put the code in the right places!
Scene=Scene 1, Layer=main, Frame=1: Line 1: You must export your movie as Flash 5 to use this action. about_mc.onRollOver=function() Scene=Scene 1, Layer=main, Frame=1: Line 3: You must export your movie as Flash 5 to use this expression. this.play(); Scene=Scene 1, Layer=main, Frame=1: Line 1: Statement must appear within onClipEvent handler about_mc.onRollOver=function() I am using Flash MX (which doesn't seem to want to let me save down to Flash 5), if that makes any difference. |
|
#4
|
|||
|
|||
|
what are you exporting as? (see File/Publish Settings/Flash)
|
|
#5
|
|||
|
|||
|
The settings (File/Publish Settings/Flash) I have at the moment are:
Version: FlashPlayer4 Load Order: Bottom up Options: (none chosen) Jpeg quality: 50 and that's it.. |
|
#6
|
|||
|
|||
|
you'll have to export as 5 at least, 6 is better - you could it as flash 4 but the syntax is totally different.
|
|
#7
|
|||
|
|||
|
the movieClip.onEvent syntax is new to MX and it's new event model. Don't forget to give your clips instance names, otherwise your script will fail.
|
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > Animated buttons - keeping movie playing after mouseOff |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|