PDA

View Full Version : goto specfic scene, not just frame


cuse
01-10-2003, 05:42 PM
hey guys and gals... it is part of my design and animation so this is the best place for this post i guess. anyway, ive got this a/s on on button...

tellTarget (_level1.gotoAndPlay(15)) {
}

now level 1 is a background and this works fine just to go to frame 15. BUT what i really want is to say gotoAndPlay("exterior", 9) cause i need to be specific to the scene in the level as well... but it doesnt seem to respsond to that action!

is there another way to do it or am i just being a dumbass cause its straight forward enough.


thanks



cuse

fig
01-11-2003, 11:57 PM
ok, why are you needing to target a level1? is that a loaded movie? if its your base movie it would just be in level 0. also, have you used dot-notation at all? its a whole lot more effective than tell target (which is an old syntax that's being phased out). you should be able to say something like:

_root.level1.gotoAndPlay("scene2", 1);


in general using scenes isn't the best idea because of what you're figuring out, they're really hard to target. if i've just got one main movie with different movieclips in it i can talk to one from any other one at any moment, much better way of doing things.

chris

samartin
01-12-2003, 12:13 PM
fig is spot on with using different movies on u're main page or wotever...

_root.(movieclipname).gotoAndPlay(blah); - not literally ;-)

would then b u're syntax...

cuse
01-13-2003, 09:10 AM
"have you used dot-notation at all?"

what the hell is that?

to be honest i tried what you have scripted there but as an expression and that didnt work, but ill give it another go, thanks anyway


cuse

samartin
01-13-2003, 09:17 AM
Let's say u're using MX...

if u create a button 4 example u might wanna control say a seperate movie clip of say a spinning circle...

u would need 2 create the spinning circle move clip as a movie, then u would give it an instance name such as (spincirc)...

the 1st frame of the spincirc movie u would need 2 add a "Stop();" command so it won't auto play...

then the actionscript 4 the button would be :-

on (RollOver) {
_root.spincirc.gotoAndPlay(2);
}

I hope this helps ya, I ain't used flash 4 a while now so the syntax might not b spot on...

cuse
01-13-2003, 09:30 AM
" Let's say u're using MX... "

"I ain't used flash 4 a while now so the syntax might not b spot on..."

eh? that was confusing?>hehe, i am in MX and i got what your talking about now with user-defined functions, so thanks... gonna have to get back into scripting, not since pre<flash4. anyway thanks


cuse

samartin
01-13-2003, 09:46 AM
that's my slack @ss typing... flash 4 a while = flash for a while... muahahaha

fig
01-13-2003, 03:32 PM
ok, so a better answer might be 'no, could you please explain that to me' ;)

to use the blurb of code that samartin wrote as an example we have

on (RollOver) {
_root.spincirc.gotoAndPlay(2);
}

that's basically saying:

on(rollover) {
*when this button is rolled over start doing what's inside this bracket*

_root.spincirc.gotoAndPlay(2);
*start at the root timeline, find the movieclip called spincirc and goto and play frame 2 of that clip*

}
*don't do anything else*

the real key is the _root statement, the dots between each of those names is what i referred to as dot notation. its basically a MUCH simpler way of targeting and controlling mc's than telltarget. hope that helps.

chris

cuse
01-13-2003, 03:41 PM
thanks anyway chris, i totally understood everything but what you were refering to by dot notation... ive used that for so long but had no idea what you were on about :)

thanks


cuse

CGTalk Moderation
01-14-2006, 04:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.