PDA

View Full Version : 2 Movies, same data?


q97
03-02-2007, 12:30 AM
I'm not particularly familiar with flash, and how it works, so hopefully what I want to do is actually doable...

We have a flash menu.swf and it has the menu for a project, and you can from there choose to show another movie. Both movies seem to play in the same window - the code is:

on (press) {
_root.loadMovie("movie2.swf");
}

What I want to be able to do, is to have a way that movie2 can recieve a variable so that the user can choose their connection speed. Movie2 has a lot of lots (it is a pre-auction presentation) which includes videos of the lots (around 2MB each).

I have modified the internal code of movie2 so that I can either display the video or show a static picture (still an flv, but just made from a pic). Obviously what I need to do is to be able to change this dynamically, preferably by setting some value on the initial screen.

Of course, I have no idea how this is/can be done with flash. Any ideas?

sknowlton
03-03-2007, 05:25 AM
if you want to store the connection speed at the beginning and access it later, you could just set a global variable at the beginning and call it later. That should be easy enough to do.

Also, you may want to consider loading the movie somewhere other that _root, like just make an empty movie clip

q97
03-05-2007, 04:17 AM
In movie2 there is a variable called WEB_MODE it is set to either true or false. However it is hardcoded...! What it appears that they have done is to put 2 copies of movie2 up on the web, and depending on your choice in movie1 depends which version you see.

The problem I have is that I don't really know how to declare variables in flash, nor do I know what happens when one movie calls another - does the first movie die? Are you saying to make a new movie clip in movie1 and play movie2 within that? Will the _root variables/etc in movie2 still work or will it all get screwed up?