PDA

View Full Version : HELP -- seeking scene in flash


ericahlstrom
08-14-2005, 04:43 PM
Anyone know how to address a specfic scene in a flash move. ex "scene_02, frame 1" ?

The current seek will only work on the main timeline

Corey
08-14-2005, 04:57 PM
Hmmm, OK. My recommendation is to name your key frames in Flash and then create a small function to jump to those frames as dictated by a simple variable which you can manipulate from AMS using the Flash.SetVariable action. :yes

eric_darling
08-14-2005, 05:16 PM
Anyone know how to address a specfic scene in a flash move. ex "scene_02, frame 1" ?

The current seek will only work on the main timeline
This sounds like a non-AMS question? Perhaps better re-positioned in the Computer Chat forum?

In any case, using Actionscript 2.0, you should use the object-oriented dot notation. For example: myMovieClipInstance.gotoandstop(labelName);

Here's a terrific tech document from Macromedia on the topic, which leads to several other very good ones as well:
http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_14123

Corey
08-14-2005, 05:22 PM
I think the question here is, "how to use the AMS Flash.Seek action to jump across scenes". I'm creating an example right now. :yes

eric_darling
08-14-2005, 05:25 PM
More directly, you can address a frame in a different scene by just naming the scene in the gotoandstop or gotoandplay commands.

For an instance where you have two scenes named "sceneOne" and "sceneTwo", you could put this code on a button in sceneOne (where the numeral 1 is the frame number you want to target in sceneTwo):
gotoAndStop("sceneTwo", 1);

Corey
08-14-2005, 05:33 PM
Not in AMS. The Flash.Seek function accepts a number. :yes

ericahlstrom
08-14-2005, 05:33 PM
thanks for the help. After reading Eric Darling's link I found that you can simply use the seek function in AMS by adding the frame's from the previuos scenes to get to the next scene.

So if you have 3 scenes and each scene is 10 frames then scene 2 would = frame 10. simple enough.

eric

ericahlstrom
08-14-2005, 05:35 PM
Not in AMS. The Flash.Seek function accepts a number. :yes

If you have another way I would like to see it.

Thanks for the help.

Eric :lol

Corey
08-14-2005, 05:38 PM
Ah, I see. OK great, I was only going by your original post which implied you weren't able to do that. I don't use scenes personally, so... :)

Anyhow I'm working up a more dynamic example. :yes

ericahlstrom
08-14-2005, 05:39 PM
Ah, I see. OK great, I was only going by your original post which implied you weren't able to do that. I don't use scenes personally, so... :)

Anyhow I'm working up a more dynamic example. :yes

More dynamic is good. :yes

Corey
08-14-2005, 05:48 PM
OK here you go, I've attached an example where I got it down to a couple actions, basically you just pass the frame name and a flag variable. This can be applied across scenes, inside of movie clips (with a small mod), etc. i.e.:

_root.onEnterFrame = function() {

if (hopFlag=="true") {
hopFlag = "false";
gotoAndPlay(myFrame);
}

}

ericahlstrom
08-14-2005, 05:54 PM
OK here you go, I've attached an example where I got it down to a couple actions, basically you just pass the frame name and a flag variable. This can be applied across scenes, inside of movie clips (with a small mod), etc. i.e.:

_root.onEnterFrame = function() {

if (hopFlag=="true") {
hopFlag = "false";
gotoAndPlay(myFrame);
}

}

Thanks very much. That is exactly what I needed. My workaround works but the Macromedia guys say that it may create unexpected results, I can't afford unexpected results in my job.

Thanks again

;)

eric_darling
08-14-2005, 05:54 PM
Sorry about that - my impression was that Eric wanted to know how to do this completely within Flash itself. I don't often have the need to make AMS do the work that can be done right inside the SWF, which is what I had figured could be done in this case.

Corey
08-14-2005, 05:55 PM
No problem ericahlstrom. :)

Yeah, you're right eric_darling in that case. Named frames are often easier to work with in the end than numbers, especially as your Flash movies grow, and grow, and grow. :)

eric_darling
08-14-2005, 07:19 PM
Hee! Too many Erics. :)