Solved

Problems with buttons and two movies

Posted on 2002-03-17
1
274 Views
Last Modified: 2010-04-03
I am new to Flash 5 and have been experimenting with buttons.

I have two movies which I want to link.
The original is called Shapes and on this I have created a button.  I want to be able to click this button and another movie (called Demo1) to be loaded and run - thus replacing the original.

For the actions for the button press I have used this code

on (press) {
    with ("shapes.swf") {
        stop ();
    }
    unloadMovie ("_root");
    loadMovieNum ("demo1.swf", 0);
    tellTarget ("_root") {
        play ();
    }
}

However, when I test the scene I get the following message

Target not found: Target="demo1" Base="_level0"

This can appear several times - once for each time I click the button - and then all of a sudden the Demo1 movie starts to play.  At other times, it appears only once or twice and then the demo1 movie starts to play.

What am I doing wrong?
0
Comment
Question by:MnrSchot
[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
1 Comment
 

Accepted Solution

by:
LOBO earned 100 total points
ID: 6876068
MnrSchot, try this....

On (Press)
      Load Movie ("demo1.swf", 0)
End On

The 0 indicated that you would like to replace the original movie, if it was a 1 the movie would load on another layer.

I am presuming your movie has already stopped when using the button, and the "demo1" movie will play automatically along as there is no stop action on the first frame.

Also the two .swf files should be in the same directory.
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to how to record live broadcast.

738 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