Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 04-07-2007, 05:13 AM   #1
Snekums
Registered User
 
Join Date: Apr 2007
Posts: 2
Question Basic Variable problems?

This may be the simplest thing in the world, but I cannot for the life of me work out how to do it. I'm fairly new at coding, but i've managed to work through all my problems bar this:

I have two movies, for convenience lets call them MovieA and MovieB.
MovieA is the main file, and then from that I want to open MovieB (without opening a new window), but be able to transfer all variable settings from MovieA to MovieB.

For example - say my variable (varMovieA) value ranges from 1-7, which corresponds to the visibility of certain items on the stage. I want to be able to set the visibility of similar items in MovieB, based on what is visible in MovieA, hence need to be able to transfer the value of varMovieA to MovieB.
Snekums is offline   Reply With Quote
Old 04-09-2007, 12:32 AM   #2
BernzSed
oblivious
 
BernzSed's Avatar
 
Join Date: Apr 2006
Posts: 322
Send a message via AIM to BernzSed Send a message via Yahoo to BernzSed Send a message via Skype™ to BernzSed
Default

I see two solutions to that.

First, you could use GET data.
If you want to see GET data in action, look in your URL bar. It is probably in the form

www.domain.com/page.php?variable1=value1&variable2=value2&variable3=value3

If you use this in the URL for a Flash, it will create variables in your Flash whose values are Strings.


Or, you could restructure your Flashes so that instead of linking, one loads the other.
You could do this using the loadMovie() function, or by using the MovieClipLoader class. You can check the documentation for these at livedocs.adobe.com.
__________________
The views expressed in this post are those of an insane lunatic and do not necessarily represent the views of actionscript.org.
BernzSed is offline   Reply With Quote
Old 04-09-2007, 11:40 AM   #3
Snekums
Registered User
 
Join Date: Apr 2007
Posts: 2
Default

Thanks for your reply:
My flash movie is currently a stand alone program and is likely to remain that way, rather than being loaded up at a domain - is this going to cause problems? My aim is to have a program that loads from a CD, rather than a web-based animation.

I have currently been using loadMovie() to load the second movie from the first via means of a button.
Snekums is offline   Reply With Quote
Old 04-09-2007, 04:47 PM   #4
BernzSed
oblivious
 
BernzSed's Avatar
 
Join Date: Apr 2006
Posts: 322
Send a message via AIM to BernzSed Send a message via Yahoo to BernzSed Send a message via Skype™ to BernzSed
Default

Quote:
Originally Posted by Snekums View Post
Thanks for your reply:
My flash movie is currently a stand alone program and is likely to remain that way, rather than being loaded up at a domain - is this going to cause problems? My aim is to have a program that loads from a CD, rather than a web-based animation.

I have currently been using loadMovie() to load the second movie from the first via means of a button.
If your movie is stand alone, I guess you can't use GET data.


Try using the MovieClipLoader instead of loadMovie(). You can give it an event handler that could set the variables when the movie is loaded.
__________________
The views expressed in this post are those of an insane lunatic and do not necessarily represent the views of actionscript.org.
BernzSed is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Variable problems sourceworx ActionScript 1.0 (and below) 10 12-08-2005 12:10 PM
LoadVars Variable Display Problems mcallon ActionScript 1.0 (and below) 2 08-21-2005 08:57 PM
LoadVars() and global variable problems clem_c_rock ActionScript 2.0 4 11-11-2004 07:52 PM
Problems With loading a basic PHP Mailer in Flash newheartimplant ActionScript 2.0 1 10-07-2004 07:32 AM
variable problems Disjuku ActionScript 1.0 (and below) 4 01-03-2004 06:22 AM


All times are GMT. The time now is 11:55 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.