Solved

on exit from pop-up loaded .swf, main movie must 'goto and play' - HOW?!!

Posted on 2004-03-26
8
284 Views
Last Modified: 2008-03-10
Hi there

I have a movie that loads an swf above the main interface.
How do I instruct the playhead to go somewhere on the main timeline when i click out of the loaded swf?

thanks
Aidan

0
Comment
Question by:aidan09
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 39

Expert Comment

by:blue-genie
ID: 10686406
you can target the main timeline (i'm assuming you're referring to what you call the main interface) by simply preceding your code with _root.

ie. _root.gotoAndStop(2);

blu.
0
 

Author Comment

by:aidan09
ID: 10686966
at the moment, I have

on (release) {
    unloadMovieNum(1);
}
on (release) {
    _root.gotoAndStop(framename);
}

but it's just unloading the swf
??


thanks
aidan
0
 

Author Comment

by:aidan09
ID: 10687159
make that:

on (release) {
    unloadMovieNum(1);
    _root.gotoAndStop(1945);
}

the movie unloads, but the playhead is still at the same frame where the swf launched from
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:aidan09
ID: 10687199
the button that exits from the loaded swf in level in is contained in that swf rite?

should the exit button call from the main timeline to the loaded swf?

0
 
LVL 39

Accepted Solution

by:
blue-genie earned 500 total points
ID: 10687299
okay, where and how do you load the movie to start with.

then, where in comparason to that is the button where you're unloading the thing.

while the swf that has been loaded is there, what's going on with the main timeline? has it stopped - are other things happening?

for example, i just put a quick 30 frame movie together.
i have keyframes in 1, 15 and 30.
in frame 1 (main timeline) i have
loadMovie("loader2.swf", 1); //load the movie loader2.swf into level1

in frame 15
i have a stop action, and a button on the stage with the code:
on (release) {
      unloadMovieNum(1);
      _root.gotoAndStop(30);
}

so when i run the movie - the swf is immediately loaded, when it gets to frame 15, my button appears. and the playhead stops at frame 15. when i click the button, it unloads loader2 and goes to frame 30 -
how's that different to what you're doing.

I'll be back on Monday, if that didn't help and someone else hasn't quipped, i'll get back to you then.

blu.
0
 
LVL 39

Expert Comment

by:blue-genie
ID: 10687425
aah ok, *lightbulb moment*

you have the button inside the swf which is loaded onto the main movie,
so your code then should be (from the button in the loaded swf).

on (release) {
     unloadMovie(this);
     _level0.gotoAndStop(30);
}
have a good weekend, good luck
0
 
LVL 39

Expert Comment

by:blue-genie
ID: 10687446
quick explanation, in the first example where i thought the exit button was in the main movie, using _root will refer to itself, but since your button is in the swf, then you need to refer to the level, which is _level0 as _root will refer to the swf's own main timeline.

:-)

0
 

Author Comment

by:aidan09
ID: 10687915
thanks mate - fantastic!!!
u got me thinking linear again - and it worked!!

thanks for the effort!

aidan
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question