03-07-2001, 01:47 AM
|
#1
|
|
Registered User
Join Date: Nov 2000
Location: Mammoth Lakes, CA
Posts: 97
|
I have a Main [level0] movie with (6) scenes.
My Menu .swf is loaded into level 9. I'm trying to use telTarget commands executed from Menu movie buttons to go to the various scenes. Example....
on (release) {
tellTarget ("_level0") {
gotoAndPlay ("Services", 1);
}
}
But it's not working. Is it possible to use telTarget to go to a 'scene' in a different level?
Thanks, Metrov
|
|
|
03-07-2001, 02:02 AM
|
#2
|
|
ActionScript.org Founder
Join Date: Nov 2000
Location: New York
Posts: 8,736
|
Yes, and that code is perfectly acceptable... dunno why it's not working.
Tried:
_level0.gotoAndPlay ("Services", 1);
?
Cheers
Jesse
__________________
Cheers
Jesse Stratford
ActionScript.org Cofounder
Please don't email or PM me Flash questions, that's what the Forums are for!
Please don't rely on me reading my PMs either. Email me about important stuff.
|
|
|
03-07-2001, 02:27 AM
|
#3
|
|
Registered User
Join Date: Nov 2000
Location: Mammoth Lakes, CA
Posts: 97
|
I tried using labels instead of frame #s and now it works fine. I'd heard that Flash sometimes has trouble with frame #'s, I think especially if it's the first frame, and there is only one frame in a scene. So there you have it. Thanks, M
|
|
|
02-18-2002, 01:34 AM
|
#4
|
|
Member
Join Date: Jan 2002
Location: San Bernardino, CA
Posts: 81
|
FURTHER THOUGHTS...
Found this thread through the 'search' feature as it pertained to my dilemna. I'm new to actionscripting and this is what I've noticed:
I ran into the same issue of not being able to get this piece of scripting to work between scenes. Then I realized that the script (on the buttons) I tweaked in the new scene was changing on a global level BECAUSE my buttons were placed inside a MC (that was then duplicated in the new scene). Regardless, the button script (used in both scenes) is still pointing to the original scene, so technically it should work, but it doesn't, not even if there's only one scene. I don't know why it's happening, but here's what is/isn't working:
This does not work
on (release) {
_root.gotoAndPlay ("Scene1" , 7);
}
This does work, just that I can't specify the scene
on (release) {
_root.gen.gotoAndPlay (7);
}
In anycase, I guess I'm realizing that it probably isn't the best idea for me to build a site with 5 more or less duplicate scenes, but it would be nice to know that I could do it if needed. Anyone have any further thoughts on this?
|
|
|
02-18-2002, 06:58 AM
|
#5
|
|
Member
Join Date: Jan 2002
Location: San Bernardino, CA
Posts: 81
|
Actually, I failed to mention that I did not get the second script to work across multiple scenes, only with one scene.
|
|
|
02-18-2002, 08:00 AM
|
#6
|
|
:: :: :: ::
Join Date: Feb 2002
Location: The Netherlands
Posts: 138
|
//this should be work:
on (release) {
gotoAndPlay ("Scene2" , 7);
}
//this will be never work:
on (release) {
_root.gotoAndPlay ("Scene1" , 7);
}
//the problem of your script is the "_root"
|
|
|
02-18-2002, 08:08 AM
|
#7
|
|
(@_@) -("pretty lights")
Join Date: Sep 2001
Location: the Netherlands
Posts: 3,982
|
Flash has troubles with scenes. Kinda depends on different factors. Too get around this, label the frame of the scene u want to jump to, and target this lable. For instance, if u label the 1st frame of scene 2 as "someFrame", u can just code :
_level0.gotoAndPlay("someFrame");
But if u really wanna use numbers, u'll need to take the frame number and add the frames in front of it (like frame 7 in scene2, with 50 frames in scene 1, then it can be targetted as frame 57, but this is a bit awkward, cuz if u add a frame in scene 1, u'll need to change the gotoAndPlay too).
__________________
RicoD
Link ?
|
|
|
| Thread Tools |
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT. The time now is 09:34 AM.
///
|
|