Solved

load root movie at a specific scene

Posted on 2008-06-11
7
811 Views
Last Modified: 2012-06-22
I have a main movie that starts the site. There is a button on this movie that when pressed, loadMovie at level 0. There are buttons on this external movie that when pressed brings you back to the main movie again, but how do I have it go to a specific scene within this main movie?
0
Comment
Question by:eringraphics
  • 4
  • 3
7 Comments
 
LVL 8

Expert Comment

by:section25
ID: 21760988
I'm not sure I understand your question. Could you please word it a little differently.

I think you are asking how to use gotoAndPlay() on the main movie from and external movie? Is that correct?
0
 

Author Comment

by:eringraphics
ID: 21761057
Basically i'm looking to go to a speciific scene when using loadmovie.

I start with erin.swf. Within erin.swf there is a button       loadMovieNum("photo1.swf", 0);
0
 

Author Comment

by:eringraphics
ID: 21761262
I'm looking to go to a specific scene in a movie.
The starting movie is erin.swf
There is a button within this movie that loadMovieNum("photo1.swf",0);
whithin photo1.swf, there are 4 buttons that take you back to erin.swf, but each one directs to a different scene within erin.swf. How do I have each button go to a scene within erin.swf?
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 8

Expert Comment

by:section25
ID: 21761439
Is this relted to your other question about preloading movie clips? Because the answer is very similar.

If the main movie is erin.swf, then you never actually leave this movie when loading other movie clips into it.

Within erin.swf you should have movie clip holders that will hold all of your external movie clips. You could either create these dynamically at run time with createEmptyMovieClip(), or create then manually and place them on stage and give them an instance name.

If you do it manually (which I would suggest at this point), then you would simply load the external clip into that one. Such as:

_root.loadMovie("photo1.swf",clip_1);

where "clip_1" is the clip you created and put on stage.

Now inside of photo1.swf when you want to refer to a specific scene (which is just another way to refer to movie clips) in erin.swf, you would refer to in by using

_root.gotoAndPlay("whatever");

where "whatever" is the name you give the frame in erin.swf. On that frame you could put whatever you want; such as a movie clip or some text or some graphics. Then it will move the playhead to that "frame" in erin.swf and start playing from there.
 



0
 

Author Comment

by:eringraphics
ID: 21762094
This works, however, how would I have the clip that loaded into the MC take the place of the original movie (erin.swf)?
0
 

Author Comment

by:eringraphics
ID: 21762308
I was able to load the external file into erin.swf by creating a mc called container. HOwever, I put the action _root.gotoAndPlay("whatever");
on the button within the external file "photo1.swf" to bring it back to the root file and go to the frame within there, however this link does not work.
0
 
LVL 8

Accepted Solution

by:
section25 earned 500 total points
ID: 21762628
OK, erin. I have created a working example for you. You can find it here:

http://www.section25.net/ee/erin/

The html file is erin.html.
The two fla's are erin.fla and photo1.fla

You can dowload them and look at them to see how they work.

Hope that helps.

0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
This guide will walk you through the essential considerations and tech stack for building scalable websites. Know how to grow your business the smart way!
An overview on how to enroll an hourly employee into the employee database and how to give them access into the clock in terminal.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

813 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now