Solved

Problems with buttons and two movies

Posted on 2002-03-17
1
260 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
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

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…
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…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

809 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