;

PDA

Click to See Complete Forum and Search --> : How do I insert a Flash Movie in another w/ buttons?


bjwatts
12-06-2002, 04:49 PM
Hey,

I have inserted a Flash Movie (Flash Movie #2) as an object in my Flash Movie (Flash Movie #1). In Flash Movie #2 there are buttons which when clicked load another movie (Flash Movie #3). I want it to load where Flash Movie #2 is. I set the levels to 0, but clicking the button does nothing. Any ideas? Thanks.

BJ Watts
madtea@charter.net

Bob Hartzell
12-06-2002, 05:48 PM
I set the levels to 0.

-> The main movie must be level 0, in your case movie 1.

bjwatts
12-06-2002, 06:15 PM
The buttons in Movie #2 reference Level 0. This replaces the main movie (Flash Movie #1). I don't want this. I want to load the new movie in Movie # 2.

bridelh
12-06-2002, 09:21 PM
I would import movie 2 into a level (_level1) rather than import as an object, and then from that movie have the button do something like this:

on(click){
loadMovie("movie3.swf","_level1");
}

this assumes movie 2 is loaded into _level1

Hilary

--

johnie
12-06-2002, 09:46 PM
Likewise you could also use load Movie AS with to target the MC (Object).

loadMovie("uri","Name of MC");

johnie
12-06-2002, 09:52 PM
I have created an Example and included it.

necromanthus
12-06-2002, 11:28 PM
Originally posted by bjwatts
I want it to load where Flash Movie #2 is.
BJ Watts

In this case you must add this script for the button from "Movie2":

on(click){
_root.movie2.loadMovie("movie3.swf","_self");
}

:mrpimp:

trixter2
12-07-2002, 12:32 AM
I have been wondering how to do this and the example helped, but how do i set where the movie pops up??

TriX

necromanthus
12-07-2002, 12:56 AM
Originally posted by trixter2
I have been wondering how to do this and the example helped, but how do i set where the movie pops up??
TriX

The Movie3 left-upper corner will be the Movie2 center.
(all you have to do is to set the Movie2 center)
p.s.
You can check my "KOOL STUFF/DEMO" section to see how it works.

johnie
12-07-2002, 01:08 AM
In my example it loads into MC1. Wherever MC1 is the movie loads into it.

You can actually target any MC to load a new movie into. Likewise you can target any _level also.

A full explanation of this can be found in the MM TechNotes here http://www.macromedia.com/support/flash/ts/documents/loading_movie_clips.htm

The Technote is for Flash 4 but the basic concepts are the same except you would no longer use tell target which was depreciated in Flash 4 but rather the Flash 5/MX dot syntax for targeting . The actual syntax is loadMovie(url [,location/target, variables]]);. KM adopts the Flash MX/5 AS Model (KM Supports just about all of the Flash 5 model in 3.5 and 3.6 will support all of the Flash 5 model and a good portion of the MX Model) and just about completly Ignores the Flash 4 Model although some very limited support is included. Likewise Support for the Flash 2 Action Model is supported.

The Unsuported Model Syntax is Pascal like and is programatically signifigantly different than the Flash 5/MX Model.

The Flash 5/MX model is built around ECMA(262) - Standardized Javascript for those of you who don't know that. In Fact the Flash 5 model is 95% ECMA with its own DOM. ECMAscript is an object based language very loosly based on C++ Concepts.

Becuase The two models are programatically signifigantly different instead of implementing both and increasing bloat only the Flash 5/MX Model is supported.

This is important to remember when doing tutorials online as Flash MX and Flash 5 will still execute the Flash 4 Syntax and thus you must convert the depreciated Syntax to the new Model.

trixter2
12-07-2002, 01:59 AM
Thanks guys, I have two more questions to ask you though. How do you make the the movie that the button loads a smaller size through actionscript, i want to know this because it is going out the side of the screen.

Also, How do i make my other shapes to appear ontop of the movie not below, because the movie is covering everything else.

TriX.

necromanthus
12-07-2002, 02:17 AM
How do you make the the movie that the button loads a smaller size through actionscript, i want to know this because it is going out the side of the screen.

on(click){
_root.movie2.loadMovie("movie3.swf","_self");
}
_root.movie2._xscale = xval;
_root.movie2._yscale = yval;

(set xval & yval as you wish,but smaller than 100)

How do i make my other shapes to appear ontop of the movie not below, because the movie is covering everything else.

1)Convert the shapes into movies.
2)add this script for each one:

onClipEvent(load){
this.duplicateMovieClip("clone1",10);
this.duplicateMovieClip("clone2",11);
...
}