I have a problem, the problem is, that i want a movie to show when i rollover a button, but i want it to be invisible if the user does not rollover the button, how would i go about doing this?
that doesn’t help
http://www.kirupa.com/developer/flash5/advroll.htm
But since tellTarget is deprecated and replaced with the much easier dot syntax, change this… [AS]on (rollOver) {
tellTarget ("/rollover") {
gotoAndPlay (“1text”);
}
}
on (rollOut) {
tellTarget ("/rollover") {
gotoAndPlay (“1back”);
}
}[/AS]
To this…
[AS]on (rollOver) {
rollover.gotoAndPlay(“1text”);
}
on (rollOut) {
rollover.gotoAndPlay(“1back”);
}[/AS]
this is what i want, i have a set of buttons at the side, and when i roll over this button, i want a movie clip to start playing, but if i don’t rollover it, i want it to appear invisible. I have put the movie clip on stage and i have given it the instance name minigoals, now obviously i would have to put some action script in the button that controls it, what should i put in?
Okay, if the animation loops continuously (sp?) then you can do something like this: Say your movieClip with the animation is called, um, ‘doggie’ - I hate making up instance names…
[AS]
//on your button
on(rollOver){
_root.doggie._visible=true;
}
on(rollOut){
_root.doggie._visible=false;
}
[/AS]
Don’t forget to put the code on the movieClip ‘doggie’ as well so it doesn’t show up at start up:
[AS]
//on the movieClip doggie
onClipEvent(load){
this._visible=false;
}
[/AS]
That’ll do it?
refer to last post :sigh:
You would need to target the clip and tell it to gotoAndPlay() what you want, just like stated in the tutorial in my last post.
If you want it to be invisible to start with, make the first frame of the movie clip empty and containing a stop() action, so when the movie loads it will start off stopped at the empty frame until you tell it to play on rollover with the method in my last post.
Freddy that works okay, but the problem is that my movie clip does not loop. When i roll over the button, it just displays a the movie in its last frame how could i get around this ?
Hey lostinbeta, u put 1back, in ur actionscript, is that just a made up instance name , should i replace whats in the speachmarks with the instance name for my movie clip?
I edited the code from the tutorial, in the tutorial, 1back was a frame label within the movie clip symbol you wanted to play.
Hi lostinbeta, wouldn’t i need to put an instance name of my movie clip simple in the actionscrip
on (rollOver) {
rollover.gotoAndPlay(“1text”);
}
on (rollOut) {
rollover.gotoAndPlay(“1back”);
}
there is no mention here of instance name of a movie clip, should i put it in or not? or should i just change the 1text and 1back, to numbers and put it in my button script!
rollover is the instance name (again… all covered in that tutorial link)
If “back1” is a frame label then you need to replace it with the correct frame number from your movie… unless you are also naming your frames.
HTH
Liz
They’d understand better if you could post the .fla as well as I ^^
Hey lostinbeta thanks a lot man, that worked a treat, i still think ur the best at flash, thanks for ur patience too, your a good guy!!