Solved

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

Posted on 2004-03-26
8
291 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
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.

624 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