-
Action script help
ok, I have a button and I want it to, when clicked, make a movie clip move to frame 2.
i know that it should be something like:
on(release){
tellTarget ("scope") { gotoAndPlay (2); }
with "scope" being the name of the movieclip but of course this isn't quite right (it never is, is it).
could anyone help?
thanks in advance
Last edited by leoZ; 02-13-2006 at 11:26 AM.
meh.
-
Hey Timmy!!!
Howdy, it should be
on(release){
_root.scope.gotoAndPlay(2);
}
-
hmm should be but isn't according to flash. the word "scope" is written in black in the actions box and I'm fairly sure it's not meant to be if that's any help...
-
Hey Timmy!!!
Seeing as it's a movie clip it will not have a color. Only Flash own words get the colors like _root, gotoAndPlay, on, function and a lot more.Are you getting an error with the code?
-
I'm not getting any errors, but it isn't going to frame 2 of the movie clip scope either :|
-
Hey Timmy!!!
Have you tried butting the code on the main timeline. It would look like this
your buttonName.onPress=function(){
_root.scope.gotoAndPlay(2);
}
-
tried it just now, and again: no actionscript errors, but it doesn't do it.
-
Hype over content...
I think you may be getting the term scope mixed up with a movie clip instance.
Is the mc actually called scope ? You should use the instance name you've given it and replace the word scope for that.
So for example, your instance ( By that I mean the mc you've got on the stage, you've opened the properties and called it "viralInfection" ) will be called via
_root.viralInfection.gotoAndPlay(2);
Of course if I've totally misunderstood, sorry
Squize.
-
*smacks head*
Sorry for ever doubting you walsher. I forgot you had to give things instance names.
Ta squize.
-
Hey Timmy!!!
Awesome, glad you figured it out. It always seems to be the smaller things that mess ya up.
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
|