-
Help! with the with action...
I am using FlashMX.
I am readjusting to the 'with' action and I am having problems targeting from within nested MC's.
Here's the situation:
_root.floor_2.unit207W
this is the path and inside unit207W there is a button.
When clicked, I need it to go to a new scene.
I have this as my code, and it does not work....
The trace I set up after the path works, but it does not go to the new scene...
on (release) {
with (_root.floor_2.unit_207W) {
gotoAndPlay("unit_207W",1);
}
}
Am I even doing this right to begin with? Or is there another way????
HELP!!!!!
Thanks in advance!
-
Registered User
Code:
on (release) {
_root.floor_2.unit_207W.gotoAndPlay("unit_207W",1);
}
should be the quickest way.
first of all, don't use "_" not "-" with instance names
then, read
this thread on scenes
Last edited by nunomira; 11-25-2002 at 03:42 PM.
-
the "with" is mainly used when multiple action target only one movieclip. If you have only one command you so not really need it.
All the "goto scene" has been covered a lot in this forum. And the result is that it is better in all cases to use labels instead of scene names and frame numbers which most of the time only work when called and executed from the same timeline.
so this should work better:
_root.floor_2.unit_207W.gotoAndPlay("label");
Now, even, if this action is calle from that timeline (you said the button was inside "_root.floor_2.unit_207W")
this should be enough:
this.gotoAndPlay("label");
or
gotoAndPlay("label");
gparis
-
half as fun, double the price
Originally posted by nunomira
first of all, don't use _ not - with instance names
?
-
Registered User
is this supposed to work?
_root.mymc-1.gotoAndStop(2);
and I've had problems with "_" the first and only time I used it.
there is something like a "white paper" which mentions that.
or would you like to explain better your idea?
-
half as fun, double the price
I didnt see any "-"s in the original path and you left off (which I now assume to be a typo) the "_" in _root, which is what I thought that quote was refering to, the "-" just being a part of the grammar extending your sentance...
-
Registered User
that was definitely a typo!
and the lack of quotes, lazyness!
-
it works, but are you saying not to use underscores ("_") in instance names?
-
half as fun, double the price
it was about using "-" in instant names, not "_"
underscores are fine, dashes shoulf be avoided.
-
Registered User
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
|