|
-
addressing a timeline label inside a mc inside a mc
? how would you write:
if(c=1){
gotoAndPlay.home.trans "contact";
}
... .home is a mc that contains .trans mc and "contact" is a label in the .trans mc timeline.
I get the
contactbtn.on(press) {
gotoAndPlay ("next"); // address label within the current mc
}
but am unclear how to do this correctly when the timeline label is within a movie clip inside another movie clip.
thanks for the clarification
Self taught... still learning actionscript flasher
Self-taught Flasher
Pursue Perfection
Kim
-
I'm pretty much a newbie at this but I'll give it a shot:
Code:
if (c=1){
_root.home.trans.gotoAndPlay("contact");
}
rberry88
-
same concept... different line of code
code: home.homebtn.on(press) {
_root.home.gotoAndPlay("home");
}
same concept, homebtn in inside the home mc inside the root timeline..
output reflects this:
Symbol=home, Layer=actions, Frame=1: Line 1: Expected a field name after '.' operator.
home.homebtn.on(press) {
could use a hand here as well... thanks so much...
tryed:
code: home.homebtn.onPress {
_root.home.gotoAndPlay("home");
}
then I get the following output:
Symbol=home, Layer=actions, Frame=1: Line 1: ';' expected
home.homebtn.onPress {
where am I going wrong here?
Thanks again..
Last edited by phantomlady; 10-22-2004 at 08:07 PM.
Self-taught Flasher
Pursue Perfection
Kim
-
Senior Member
1)
In the first two examples, note that you need to use == (two equal signs) and not =.
if (c == 1)
2)
There are two ways to setup event handlers, depending on whether it's a frame script, or a script attached to a movieclip or a button. The syntax is different, and in the last couple of examples, the styles are mixed up.
From a frame script, you would do it like this:
code:
home.homebtn.onPress = function()
{
_root.home.gotoAndPlay("home");
}
Or, if you attach the script directly to the button, you would use this:
code:
on(Press)
{
gotoAndPlay("home");
}
If you use the first method in a script attached to a button, you'll get syntax errors, and vice versa.
Last edited by jbum; 10-22-2004 at 08:12 PM.
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
|