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
Solved

Problems with buttons and two movies

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
flash cs6 4 347
Flash movie or gif/animation? 3 912
Is it possible to insert an Adobe Flash video in a .net  web page ? 2 105
Adobe Flash player - Microsoft Edge 9 175
Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
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.

860 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