Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Loadmovie With Variables



In the loadMovie parameters, it says that you can load variables in with your movie. I want to use this feature to load in a number value to tell the movie on what frame to begin but I don't know how this is accomplished. I looked at some things, but they just said that it could be done and not how.

Please help.

Jason



FlashKit > Flash Help > Flash Newbies
Posted on: 08-01-2003, 02:10 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Variables, X And Y, Loadmovie
Just a few Questions.....

1. The loadmovie command does what exactly? I know that it allows you to load an already rendered swf file ontop of another flash movie, but once you do that, how do you control the file? How does your flash movie react to the external swf file?

2. Variables.
How do I define a variable? How do they work within flash? What are they for?

3. x and y
I found these in the setProperty area. I would imagine that they operate much like a graph on an axis and stuff.
What is the difference between xposition and xscale, likewise for y?

Many thanks to anybody and everybody in advance who gives me a hand, and may many riches and much champagne fall from the heavens for you.

LoadMovie With Variables?
Ok here is the situation. I have loaded variables from a .txt file - &fruit=apple&price=45&color=red - now I want to load a .swf file from my server dynamicaly with those values as the name of the .swf file example "apple45red.swf " How can I do this. Is this a task for arrays or do I set another variable equal to those 3 varibles concat together. I am just a little lost in this area and need some pointing to get me headed in the write direction.


Thanks
Carter

Variables With LoadMovie
This is pretty basic, I guess, but...

I have a button menu on level 0 and am using loadMovie to load animations that run on mouseover. I don't want the button to restart the animation if the user rolls over the same button again before rolling over a different button.

I thought I could set a variable "loaded" in the first frame of a loaded movie and check the variable in the button. That is, if movie 1 is loaded, loaded=1, and button one only loads the movie if loaded!=1.

Is there a special code you must use for a variable set in a loaded movie to be read on the main timeline?

Thanks in advance, you geniuses.

LoadMovie Using Variables
I wonder if it's possible to load movies dynamically using variables from an external feed (.txt, XML etc). In my mainmovie I have set up five "placeholders" at a specific position (x,y) where I want to load different movies. Since the logic is stored in a Servlet I don't know what movies that will load into these "placeholders". So what I want to do is to:
1) loadVariables from let's say a .txt-file
2) using the loaded variables to determine what movies that should be loaded into the placeholders doing something like, loadMovieNum("{var1}.swf", 0); but I can't get it work.

Or, is it possible to use the Generator Object "Insert Flash Movie", setting the "Filename" for that using the loaded variables "{var1}.swf"?

Thanks!

No Variables In LoadMovie
hey board,

i've got 2 MC's:

1- Main Clip
2- Clip which is loaded into the MainClip by button event

The second (2) MC contains various dynamic text vields which retrieve their information out of a text-file.

When testing the second MC, all information is displayed correctly but when it is loaded into the main movie clip the dyn. text fields are empty.

What is wrong?
Help me!

Loadmovie Using Variables
How do you use a variable to load a movie?

I have been trying

loadMovie(("/:Selection") add ".swf", "_root.content");

where /:Selection is the variable used to identify the correct file name. If /:Selection = clip1 then clip.swf would be loaded inot _root.content, for some reason this doesn't work!

Please help!

Loadmovie Using Variables
OK, I want to use the load movie command, but instead of hardcoding it like loadMovie("products_test.swf", "company"); I want the area i put the SWF info to be a variable. so when i click a button it makes a certain variable what i want then it passes to the load movie command..how do i write the loadmovie command so it can accept a variable?

LOADMOVIE - Using Variables
arg! this actionscripting hoo ha is pretty new to me soo id like a little help please! ...


ive got a button which sets a gobal variable as a path:


on (release) {
_global.image = 'work/concept/01';
}



first of all. is that ok to do?
i then try to recall the variable later in another movieclip:


loadMovie("var image/01.jpg", "_root.image.pic01");
stop();


i know the last bit is totally wrong, but what i want to do is set the variable as a path and recall it later in the loadmovie command AND add the extra bit on (01.jpg) to load different images.

could somebody GODLIKE please fix/replace that last bit of script to make it work? cus im all

thank Q!

LoadMovie With Variables
I'm trying to load jpegs dynamically but the image urls have to be loaded from a text file.

So, I define the variables in the text file:

&image1=http://www...

Then in the flash file I say:

loadMovie(image1, "target")

It doesn't work.

Make sense? I'm kind of up against a deadline so I don't want to spend a lot of time explaining. I prolly won't get a reply before the deadline but I have to try.

Thanks,

David

Loadmovie And Variables
In my one movie main.swf I have:
loadMovie("bottom.swf", "bottom");

And in my bottom.swf movie I have:
onClipEvent (load) {
brems = 5;
solly = 46;
}
onClipEvent (enterFrame) {
x = solly-_x;
_x += x/brems;
}

When I test bottom.swf, my variables load correctly but when I test main.swf, bottom.swf loads correctly but the variables do not load or work. What do I need to change? Thx

LoadMovie Variables
Hello

I am Portuguese and my English is not good..sorry

1 - I loadmovie b.swf from a.swf using loadMovie("b.swf", "placeholder_b")...it is working ok!

loadMovie("b.swf?&variable=value", placeholder_b);
//will work in browser.

- the "value" is a string or number, not a varible to:

i want to do this:

aquiles = "teste";

loadMovie("b.swf?&variable=aquiles", placeholder_b);
// the variable go to the b.swf but with the aquiles value, not with
"teste"

- how can i resolve this?



Cumprimentos (thanks in Portuguese)
aquiles boiça

LoadMovie And Variables
If I'm loading a swf into a movieclip, does the main movie recognize the variables in the loaded movieclip? (by variables, I mean, for example, _root.elephant = true; )? Basically when a user pushes a button in the main movie, the swf loaded finishes playing and then loads a new swf.

LoadMovie Variables Help Please
Ok i have from a text file the variable loaded from php as :

item1 = "tractor.jpg"

i want to use this varibale as the target for an image to be loade usuing loadMovie function. Somehitng like this:

loadMovie('item1', "targetClip");

but that doesnt work.

ideas?

Also how could i concatonate (is that the right term) so that i could target the varibale but up a directory- if you see what i mean :P

loadMovie(/images/'link1', "_root.loader1"); or something like that?

is that possible?

LoadMovie And Using Variables, Please Help
heya,

I have this main.swf file who has a menu, the buttons on this menu are meant to load about.swf and assign a variable to the load movie so that about.swf jumps to the right scene and frame when it is loaded. I thought of having loadMovie assign a diff. variable for each button, so when about.swf is done loading it'll jump to the right frame by using that variable.



But it's not working.

The target path for the loadMovie isn't working, nor is the variable.
Here's how my files are setup:


main.swf - menu button controls root holder mc that loads about.swf into a specific frame (the frame is in scene 2 not in scene 1)


about.swf - scene 1 (preloader)
- scene2 (content) -> Each content page is in a different frame who is labeled a certain name


The code i used is the following:

code on each button in menu (main.swf) that loads About.swf ->

on(release){
this._parent._parent.holder.loadMovie("about.swf", 1);
_root.frameNum = 6;
}

frame in scene 2 on about.swf that goes to "framenum":

gotoAndStop("frameNum" ; (I also tried "_root.framenum"


I'd appreciate help on this, deadline is getting too close


thanks alot!

LoadMovie And Variables...
ok, forgive the lack of syntax...I am a drawer, not a coder =)

I have 50 frames of animation on the timeline...on each frame I need a keyframe that says something to the effect of:

var1=pic1


then, on keyframe two, it would need to say var1=pic2 and so on and so forth on each of the 50 frames.


I want to have a single action frame that then says something to the effect of:

if var1=pic1, then:
mainpic.loadMovie("/images/gallery1/pic1.jpg");
loadVariables("/images/gallery1/text/info1.txt","_level0.gallery1");

if var1=pic2, then:
mainpic.loadMovie("/images/gallery1/pic2.jpg");
loadVariables("/images/gallery1/text/info2.txt","_level0.gallery1");

if var1=pic3, then:
mainpic.loadMovie("/images/gallery1/pic3.jpg");
loadVariables("/images/gallery1/text/info3.txt","_level0.gallery1");

and so on till we cover all 50 variables (and their respective pic and text info)

Help...please?

Many thanks in advance!

Using Variables From LoadMovie SWF
I'm loading a series of external SWFs into my main movie, ala a slideshow, but I'd like to be able to have a variable I've defined in each uploaded movie display in a text field of the main movie (ie a text description of each movie as it loads).

It seems like it should be super easy, but everything I've tried, from simple
var X = "sample Text" //in movie a
dynamic.text = X //in movie b

... to using full new LocalConnection scripts, but so far nothing has worked.
Anyone have any pointers/suggestions?

Any help would be much appreciated.
Gyz

Using Variables From LoadMovie'ed SWF
Hey all - I'm new to the forum and lousy with Actionscript, so please be gentle.

I'm creating a sort of slide show wherein my host movie loads a series of SWFs containing variables (author's name and a description of the clip), but when I load the SWFs into a container clip, the variables don't pass, and my text field displays "undefined" (the same thing happens when I try to get the host movie to trace the loaded movie's variables).

The current incarnation of the code (and I've tried quite a few variations) is:

Loaded movie:

ActionScript Code:
var nameX = "Enter your name here";
var descX = "Enter a title and description here";

Host movie:

ActionScript Code:
my_mcl.loadClip("myMovies/myMovie02.swf", "myMovie");
_root.myName.text = _root.myMovie.nameX;

Why aren't the new variables working in the host movie? What am I doing wrong?

Any and all help is appreciated! Thanks!
Gyz

LoadMovie Using Variables
Hey all,
Hoping everything's well in the world of Flash since I last left it
I was wondering if there would be an easy solution to a problem I'm having with my code.

Basically, I'm making a simple loadMovie site, but I want to eliminate buttons that have already been pressed. For example, if the user is already at the homepage, disable the home button, and so on and so forth.

What I THOUGHT would work is adding this code to the first frame in my movie:

ActionScript Code:
var History:String = "Home";
And adding this code to my buttons.

ActionScript Code:
on (release) {
if(History = "Home"){
trace("TRUE!");
}
else {
_root.container.unloadMovie();
loadMovie("home.swf",this._parent._parent._parent.container);
History = "Home";
}
}
--

I was thinking that if I could make a variable that started off reading "Home," then I could test to see if the variable was the same every time a button was clicked. If it was, basically do nothing, don't unload and reload etc. If it wasn't however, unload and reload the correct movie in, as well as set the variable to the new page's variable, to disable it next time.

Can anyone see where I'm going wrong?

LOADMOVIE WITH VARIABLES
Hey all,
Hoping everything's well in the world of Flash since I last left it :)
I was wondering if there would be an easy solution to a problem I'm having with my code.

Basically, I'm making a simple loadMovie site, but I want to eliminate buttons that have already been pressed. For example, if the user is already at the homepage, disable the home button, and so on and so forth.

What I THOUGHT would work is adding this code to the first frame in my movie:
var History:String = "Home";
And adding this code to my buttons.
on (release) {
if(History = "Home"){
trace("TRUE!");
}
else {
_root.container.unloadMovie();
loadMovie("home.swf",this._parent._parent._parent.container);
History = "Home";
}
}
--

I was thinking that if I could make a variable that started off reading "Home," then I could test to see if the variable was the same every time a button was clicked. If it was, basically do nothing, don't unload and reload etc. If it wasn't however, unload and reload the correct movie in, as well as set the variable to the new page's variable, to disable it next time.

Can anyone see where I'm going wrong?

Variables In LoadMovie
I have a text document that I pull variables from to fill in dynamic text boxes. Can I use this same method insert variables into the code below where it says "variable"?

this.scroller.thumbs.loadMovie("thumbnails/variable/avril.jpg");

Variables From LoadMovie?
Okay. I got loadMovie to work in a movie called "testShell" and it loads a movie named "testvid.swf" with a variable "testVar" in it. testvid.swf is loaded into a movieclip named "testclip". How can I get testVar to register in testShell? If I reference it as "_root.testclip.testVar", it doesn't work.

Loadmovie And Variables
Hello to all!

If some of you have got time to look at my case.

I have this script :


Code:
function click()
{
bouton_av.gotoAndStop(2);
loadMovie(_photo, "photo");
art = _art;
ref = "Réf. " + _ref;
design = _design;
if (_exprix > 0)
{
barre._visible = true;
prix0 = _exprix + " €";
prix1 = _prix + " €";
}
else
{
barre._visible = false;
prix = _prix + " €";
}

function over(n) {
n = real_val[n];
n = n+20*(no_sous_rayon-1);
_photo = _root["photo"+n];
_art = _root["art"+n];
_ref = _root["ref"+n];
_design = _root["design"+n];
_prix = _root["prix"+n];
_exprix = _root["exprix"+n];
bulle._visible = true;
startDrag("bulle", true);
bulle.ref = "réf.
"+_ref;
}

bulle._visible = false;
barre._visible = false;
point_info._visible = false;
no_sous_rayon = 1;
real_val = new Array();

Next : I have 4 buttons with instance names "v1", "v2", "v3", "v4" and codes associeted to each button (1/2/3/4 after "over") :


Code:
on (release)
{
click();
}
on (rollOver)
{
over(1);
}
on (rollOut)
{
out();
}
And in the timeline :


Code:
function click()
{
_parent.click();
}
function over(n)
{
_parent.over(n);
}
function out()
{
_parent.out();
}
stop ();
Finally, I have a movieclip with the instance name of "photo". (A few elements are missing but they have nothing to do with my problem)

Currently, when one button is clicked, the variable photo appears in the target MC "photo".

In fact, I'd like to have sort of previews of the images on each button : each variable photo would appear on target MCs with names "photo1", "photo2", "photo3", "photo4". Could someone help?

In advance, thank you very very much.

SENDING Variables With LoadMovie
I've got 3 variables - playerName, playerEmail and playerScore.

How do I send them to my php script (savescores.php) using the loadMovie command??

I can do it with getURL but I don't want another browser window to open ... HELP!!

Very Odd Loadmovie And Variables Error
Hi Guys,

I've been trying to get this to work all day, but well, now I'm here. So. . . here's the problem

I've got a movie that reads in variables from a text file.
The text file contains the following:

&StateFlick=ca.swf

Inside the movie, I am able to output StateFlick in a textfield. outputs as: ca.swf

Everything's fine and dandy so far. The problem is, when I get to using that variable. . things don't go so well.

In the flash movie i have: _root.StateContain.loadMovie(StateFlick)

Which. . doesn't work. If instead of StateFlick i write "ca.swf" then this runs w/o a hitch.


So here's what I've figure out from attempting to trouble shoot this:

- if I set var Playmenow = StateFlick and try to output Playmenow w/ a textfield, i get a blank

- if I call the movie like so: http://blah.com/statespin.swf?StateFlick=ca.swf

everything works just fine. Unfortunately I can't keep reloading this movie each time a state changes as data is updated inside the page already. . so why can't the movie variable also be updated?



So. . . Does anyone have any ideas? Please help!

Thanks tons and tons in advance


- Scott

Getting Variables Out Of An Movie And On Loadmovie...
Hello there,

Let's say i have one movie loaded and within that movie i have a variriable username. I loadmovie another one how can i take the username variable from the first movie to the new loaded one?

thanks in advance,

rob.

Passing Variables Using Loadmovie
I need to replace my movie in _level0 with another one, but I need to keep some variables alive, my first thought was:

loadMovieNum("movie.swf?variable=1", 0, "GET");
or
loadMovieNum("movie.swf", 0[variable=1], "GET");

but it never worked, I looked around the web and found a cuple of tutorials that use this to pass variables to generator, so maybe what I want can't be done that way, so then I decided to load another movie in _level1, then sen my variables there, load the other movie in _level0 and then the movie in _level1 returned the variable and everyone lived hapily ever after, only it didn't work, well it worked, but then I saved and the next morning it didn't work, so am starting to think it worked in my dreams, anyone has any idea of how to do this, am sure there must be an easy way. Oh the movie I load needs to be on _level0.
Thanx

Variables And The LoadMovie-Command
Hi everyone,

I got a little problem feeding the loadMovie-Command of Actionscript with several URL's using a normal or array variable.
Everytime I checked the script with a specific URL it works perfectly but when I use variables (loadMovie(<variable>, <level>,...) it doesn't seem to load the movie. Is there a way to make this work?

Michael

LoadMovie Erases Variables
I have a custom component that inherits from MovieClip. I have two simple Number fields defined in it. I'm trying to attach multiple instances of my MC at runtime, then load a jpg into each one. I also have a set method that sets the Number fields later on in my initialization procedure.

Here's the problem: if I don't use loadMovie and add my jpg's, everything works fine (but I have no images - the MC's are blank). If I call loadMovie on the component instance, it clears the Number fields and I can't set them again - it virtually erases them.

At first I tried this without the component, just a blank MC. It did the exact same thing (only I didn't realize what the problem was then).

Can someone please help me find a workaround for this? Has anyone encountered the same problem?

Thanks,
Andrew

Variables In Loadmovie Address?
Hello peeps,
Is it possible to set a variable to act as the folder name for use in specifying the path for a loadmovie operation?
To make things clearer, here's what I'm doing...

I have collections of images I want to load (01.swf, 02.swf, 03.swf etc) each placed in seperate folders by artist name.
To simplyfy things, I want to load the swfs using a variable that is set at the root level to specify the folder in which they're placed, kinda like this...

(set at root level)

ArtistName = johnsmith

(then load corresponding swfs)

loadMovieNum(ArtistName + "" + "01.swf", 5);

I've tried loads of different permutations but to no avail. Does anyone know if this is possible or not???

Cheers

LoadMovie + Variables -- A Dynamic Jpg
I'm making a online portfolio. I use MySQL+php to power the site. I've made a flash for the first page and I want to display the "latest work" in the flash. I've got the loadVariables thing to work, and can display the tree variable names in text boxes (Costumer, url to page, and the name of the picfile (scr.jpg))

I've even got the loadMovie thing working like this:
loadMovie("http://www.thinkweb.no/upload/scr.jpg",_root.picHolder)

But when I tried to make the scr dynamic from the variables it dident work!!! Here is the code (img variable contains the img name).
_root.loadVariables("test.php");
loadMovie("http://www.thinkweb.no/upload/" + img,_root.picHolder);


Can someone please help me with this one?

LoadMovie And Variables In The Loaded Swf?
i use a control.exe to load 2 external swf files depending on what time of day it is, but when i load them, the loadvars and external text files dont load into the swf files. is this a targeting problem, do i have to rewrite the code in the 2 swf files to use the parent targets?
any ideas will help, Jeff

Variables, Loadmovie & Navigation
hi there,

I followed a tutorial for a sliding menu on this site, but now i've come upon a problem.

I'm using variables to establish a navigation system.

There are six sections each of which are seperate swfs.

From the main navigation frame, a user clicks a button, which does the following:


on (release) {
gotoAndPlay ("transition");
name = "1";
}

A transition scene is thus played and the variable name is set to "1". I need the variable so that I can load the correct movie after the tranistion scene depending on the button clicked.

Then on another frame, the following action plays:

if (name == "1") {
loadMovieNum("test.swf", 2);
} else if (name == "2") {
loadMovieNum("test2.swf", 3);
} else if (name == "3") {
loadMovieNum("test3.swf", 4);
} else if (name == "4") {
loadMovieNum("test4.swf", 5);
} else if (name == "5") {
loadMovieNum("test5.swf", 6);
} else if (name == "6") {
loadMovieNum("test6.swf", 7);
}

Trouble is, I can't it to work!

This is my first attempt at ActionScript
and I'm certain I'm doing something pretty obviously wrong.

I hope someone can help me!!

because there was also some script involved in the creation of the menu, i'll give a url to a rar file with the fla and tests.swf

here it is: http://members1.chello.nl/~rj.groot/troubles.rar

thnx in advance!

rob

LoadMovie Overwrites Variables
Hi all
I have a MC that I am loading a jpg into. the image loads fine. However, after loading the jpg, the variables I dynamically assigned to the containing MC are vanished.

In the containing MC, I use:
onClipEvent(load) {
var myId;
}

from another MC, I set the value for myID. this works well, until I am also loading a jpg using loadMovie to the same MC. After loading the jpg into it, it doesn't recognize the dynamically assigned value for the myID variable.

Any ideas?
Thanks!

Sharing Variables With LoadMovie
Hi all,

I have a swf where a user will fill out a number of fields, (name, email, choose a color, etc.)

All of the variables that they enter are then loaded into movie clips:

username.text = _root.name;
usermail.text = _root.email;

and so on. It works perfectly inside the test movie.

Now here comes the tricky part. In the last frame of the setup, I have a loadMovie function that loads a swf into a blank movie clip.

This newly loaded swf is supposed to react to the same variables that the user has entered. Unfortunatly, I am left with empty dynamic clips...

Inside the loaded clip, I target all of the variables on the root level...

How can I get the loaded movie to use the same variables as the parent movie?

Thanks for your time

Passing Variables When Using Loadmovie()
Hi, I'd like to know a method of passing variables to a movie loaded using loadmovie();

The variables are on the _root timeline of the main movie, and are to be passed to the _root of the loaded movie.

LoadMovie From ASP With POST Variables
I've drawn a blank with the following problem - its probably something dumb that I have missed, as I am not a highly experienced scripter. If so I would be really gratful if someone more knowledgeable than me can help put me out of my misery...

Basically I want to load an image using an ASP link, and need to send over some variables to get the right one. This works just fine :

loadMovie('aspurl.asp?thevar='+_root.thevar,myMovi e)

where :
_root.thevar is a previously defined variable

but unfortunatley it is essential for my purposes that the ASP URL with variable does not appear in cache. To do this I have been advised to use the POST method instead.

So I just tried this instead, in various different forms :
loadMovie('aspurl.asp',myMovie,'POST')

also tried declaring a new local variable just before this.

>> But it doesn't work <<

What have I missed ? My ASP knowledge is limited - is something required on the ASP side perhaps ?

Sending Variables Though Loadmovie
Probably a stupid question, but still....

How do you send variables though to a SWF that's been loaded with the loadmovie() command?

LoadMovie With Variables Problem
So this has been brought up several times on this board but I still find no real answer.

I have a text file content_introduction.txt with my variables in it. I load it with:

loadVariablesNum("content_introduction.txt",0);

In there I have a variable:
&intro_page1_image=intro_page1_image.jpg

I then use it to load the image into a movie clip:

loadMovie(intro_page1_image, "presentation_image");

I get nothing in the movie clip.

If I make it:

loadMovie("intro_page1_image.jpg", "presentation_image");

it loads fine.

And if I make intro_page1_image a dynamic text box it shows up as it should: "intro_page1_image.jpg"

Any ideas?

To me it seems logical and there must be something funky with Flash MX.

Thanks....Rob

How To Pass Variables Using LoadMovie() ?
Hi, How can I add in my actionscripts to pass the variables => x="Result" to the Popup(Test).swf ??

Thanks alot.. hope someone help me..

Alvin
-----

LoadMovie And Variables Problem
Hi , i've made a flash with a movieclip called "pageMC" ,this flash loads another flash and place it istead of pageMC using the loadMovie() command.

the child movie it loads have a script that scale the Y value of a movie clip called "scaleA" according to a number (variableA) stored in a TXT file.

when i play the child movie on its own the whole thing works fine however when i use the parent movie to load the child its no longer scaling the movie clip.

this is how my script looks like :

parent movie script:


Quote:




loadMovie ("childMovie","pageMC");






child movie script:


Quote:




loadVariablesNum("CRprojects.txt" ,0);
var projectsVars = new LoadVars();
projectsVars.onLoad = function(ok) {
if (ok) {
scaleA._yscale = (variableA);
}
};

projectsVars.load("CRprojects.txt");
//end of script






can anyone tell me why is this happening or at least how to fix it ?

LoadMovie Using Defined Variables
Here's what I'm trying to do... I have two vars: picturefolder and picturenumber. I'm using this for a type of slideshow picture gallery while dynamically loading the images. Let's say the picturefolder var = "hawaii". If the user clicks "next picture" while looking at "hawaii/1.jpg", I want it to load "hawaii/2.jpg" and add 1 to picturenumber. This is what I have, and it isn't working..

Code:
on(press){
_root.top.picture.loadMovie(_root.picturefolder+"/"+_root.picturenumber+1+".jpg");
_root.picturenumber = _root.picturenumber+1;
}
But instead of adding 1 to the picturenumber var, it actually adds a "1" to the image. Instead of going to 2.jpg, it goes to 11.jpg. then it goes to 111.jpg. How in the world do I just add 1 to the actual number?

Passing Variables To A Loadmovie SWF
I am having difficulties passing variables between SWF files that I am loading with LoadMovie(). I have searched around the forums here but haven't found anything that seems to work. Here is what I am doing...

MovieA has a menu system for the user to interact with. I am using loadMovie() to load a SWF file that relates to the choice the user has made (ie. MovieB, MovieC or MovieD).


ActionScript Code:
on(release) {  loadMovie("MovieC.swf",_root);}


The movie loads fine, but I cannot use
ActionScript Code:
unloadmovie("_root.MovieC")
to remove MovieC and return to MovieA (which was originally loaded). Should I be using another loadmovie call instead (the flash documentation seems to indication that I should use unloadMovie, but I have a feeling that they are wrong in this instance).

Now the second problem I am running into is getting the variables that are held in MovieA to pass the data to the loaded movie.

I have seen suggestions that people have made to use : myNewArray=_root.myOldArray.slice() but I have not been able to get this to work when I use it in MovieB thru D. It is almost like Flash removes the first movie from memory and then displays the new one that I have loaded before the variables can be passed.

I thought of perhaps sending this data to a location somewhere (such as a txt file for the time being), but Flash's documentation on using 'send' is piss poor (much like the rest of their documentation).

Are there any thoughts or suggestions on how I can get the SWF files to play nicely with one another so that they pass the variables in/out correctly.

Passing Variables To A Loadmovie SWF
I had originally started this thread in the MX 2004 boards, but I guess that was the wrong location to get the proper attention that it needs.

I would grealty appreciate it if someone could jump over to the thread (provided below) and provide some suggestions in regards to my problem trying to pass variables between SWF files that are loaded with loadmovie().

http://www.kirupaforum.com/forums/sh...threadid=48013

External Variables + Loadmovie
hey there,
I want to load an additional movie into a first one (using loadmovie), and this one has to use variables from an external file (like data from a mysql database or whatever)
If I only load the additional swf without the first one everything works fine, but if I try to play the whole thing it ist not.
where is the mistake?

Passing Variables To A Loadmovie SWF
I am having difficulties passing variables between SWF files that I am loading with LoadMovie(). I have searched around the forums here but haven't found anything that seems to work. Here is what I am doing...

MovieA has a menu system for the user to interact with. I am using loadMovie() to load a SWF file that relates to the choice the user has made (ie. MovieB, MovieC or MovieD).


ActionScript Code:
on(release) {  loadMovie("MovieC.swf",_root);}


The movie loads fine, but I cannot use
ActionScript Code:
unloadmovie("_root.MovieC")
to remove MovieC and return to MovieA (which was originally loaded). Should I be using another loadmovie call instead (the flash documentation seems to indication that I should use unloadMovie, but I have a feeling that they are wrong in this instance).

Now the second problem I am running into is getting the variables that are held in MovieA to pass the data to the loaded movie.

I have seen suggestions that people have made to use : myNewArray=_root.myOldArray.slice() but I have not been able to get this to work when I use it in MovieB thru D. It is almost like Flash removes the first movie from memory and then displays the new one that I have loaded before the variables can be passed.

I thought of perhaps sending this data to a location somewhere (such as a txt file for the time being), but Flash's documentation on using 'send' is piss poor (much like the rest of their documentation).

Are there any thoughts or suggestions on how I can get the SWF files to play nicely with one another so that they pass the variables in/out correctly.

Passing Variables To A Loadmovie SWF
I had originally started this thread in the MX 2004 boards, but I guess that was the wrong location to get the proper attention that it needs.

I would grealty appreciate it if someone could jump over to the thread (provided below) and provide some suggestions in regards to my problem trying to pass variables between SWF files that are loaded with loadmovie().

http://www.kirupaforum.com/forums/sh...threadid=48013

LoadMovie And Passing Variables
I'm using a container movie to load another Flash movie. Is there a convenient way that I can specify querystring and param variables in the HTML to the container movie, and then have the container movie pass the whole lot onto the movie it's loading? Would all of those variables be stored in an array somewhere in the container movie? Can I pass an array of variables into a movie I'm loading via loadMovie()?

Thanks for any pointers you can give me.
-Nate

LoadMovie And Passing Variables
I am trying to get a popup window to work using the following code:

function popupContribDetail(popArgs:String) {
//split the args
argumentArray = new Array;
argumentArray = popArgs.split("|");

var argContribID = argumentArray[0];
var argContribName = argumentArray[1];

//this.createEmptyMovieClip("mcPopup", 1);
loadMovieNum("contribDetails.swf", 1);
}

This function is called from an asfunction commmand located in an html textField. Everything works exactly as it needs to, with the exception of being able to pass a variable to the newly loaded movie. In the loaded movie I've tried to reverence the variable using _global, _root, etc... I have also tried using LoadMovieClip but this seems to open a new browser window, which I do not want.

If anyone can help, I would greatly appreciate it. Also, if there is another method that might get the same results, I will be happy to look at that as well.

Thanks,
Ron

Prob Using Variables In LoadMovie
hello, I am trying to use loadMovie and random numbers in an onEnterFrame and I can't see why it doesn't work. Any help appreciated. First frame code:

Code:
stop();
this.onEnterFrame = function() {
//generate random numbers
randomPic = Math.round(Math.random()*86);
randomClip = Math.round(Math.random()*238);
//load random pic into random clip
whichClip="clip"+randomClip;
whichClip.loadMovie("thumbs/pic"+randomPic+".JPG");
};
BTW there are a bunch of clips on the stage name clip1, clip2, clip3, etc. -- I am trying to load into these.

Copyright © 2005-08 www.BigResource.com, All rights reserved