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




Using Variables In A Movie Within A Movie



Please help! I am trying to build a flash 5 movie catalog for our products. All the data for the products in the catalog is arranged in sublevels in a SQL database. I am passing/receiving variables from .asp files to traverse those levels (as a user selects particular items, different items appear next and the next frame is loaded). I am able to successfully pass variables to an .asp file and get new variables back. But, now I need to (I think) have a submovie in one frame that allows the user to choose from certain dynamic data and I can't seem to get it to work:

I made a movie object, edited it, and dragged it onto one of the frames in my movie. I am trying to use some of the variables from the main movie in this movie object and they don't seem to register. The values are not set. Do I need to pass the variables to this movie object? Or load them IN the movie object? Is what I'm trying to do impossible? Please help, thanks!

-Drew



FlashKit > Flash Help > Flash ActionScript
Posted on: 01-23-2002, 04:24 AM


View Complete Forum Thread with Replies

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

Passing Variables From Loader Movie To Loaded Movie, Flash Satay Method
I like the Flash Satay method for its clean integration and standards-compliance, however there are still some things I can't manage the way I want to... I'm trying to implement a working method to pass variables from the loader movie to the loaded movie. As you may know, the Flash Satay method uses a small SWF file which uses a bit of code to load the desired movie, all in order to allow IE browsers to retain streaming capabilities when rendering Flash content through the <object> tag. Basically it's just a small file with the following AS2 code in the first frame:

loadMovieNum(path, 0);

This means the c.swf file is ENTIRELY replaced at level0 with the desired movie, and any variables that were passed to the loader movie turn to smoke.

I'm trying to generate a querystring using all other variables the loader movie receives, and pass that along with the filename for loadMovieNum. This seems to be working very well in most cases, but whenever there's a URL in the querystring (even URLEncoded), BAM, everything turns to lowercase... EVERYTHING... here's an example:

c.swf?path=banner.swf&myLifeSUCKS=true&Icantbelieve=ITSNOTBUTTER

this successfully loads banner.swf in place of c.swf, with the following correct querystring appended

banner.swf?myLifeSUCKS=true&Icantbelieve=ITSNOTBUTTER

If I try:

c.swf?path=banner.swf&clickTag=http://www.myurl.com/&ANOTHER=variable

this successfully loads banner.swf in place of c.swf, but I end up with lower-cased querystring (all of it!!):

banner.swf?clicktag=http://www.myurl.com&another=variable

what happens to my capital letters?? I need these to remain case-sensitive as there is no saying how the loaded movies are programmed. The generally accepted convention for "clicktag-enabled" banners is to use _root.clickTag as the link button's URL...

Even URL-encoding the URL doesn't change this

For reference, here's the HTML snippet and ActionScript 2 code I use:
---- html ----

<object type="application/x-shockwave-flash" data="c.swf?path=banner.swf" width="728" height="90">
<param name="movie" value="c.swf?path=banner.swf" />
<param name="FlashVars" value="clickTag=http://www.google.com/" />
</object>








Attach Code

----c.swf----

var queryString:String = "";

for (var i in _root){
if (i != "path" && i != "queryString" && i != "$version"){
if (queryString) { queryString += "&"; }
queryString += i + "=" + _root[i];
}
}

if (queryString != "") {
loadMovieNum(_root.path + "?" + queryString,0);
} else {
loadMovieNum(_root.path,0);
}

























Edited: 10/01/2008 at 10:40:48 AM by Inzoum

Xml Variables' Paths In A Loaded Movie Via Movie Cliip Loader
Okay, I found 3 different .fla files:
1] an XML photogallery [including image, thumbnails and title & description]
2] a Navigational type file [when a button is pressed, the screen moves to that section, set by x & y coordinates, with friction]
3] a file featuring loading multiple external .swf's into specific movie clips [movie clip loader, instead of loadMovieNum]

All the files work fine independently.
I put the actions of the movie clip loader into "navigation-1.swf".
The movie clip loader calls "gallery4.swf" and places it in a movie clip deep navigation-1.swf.

Gallery4.swf loads almost loads fine in navigation-1.swf; the images and thumbnails show, but the title and descriptions do not.

a] It might be the paths in gallery4.swf. I read the tutorials in paths/advanced paths from actionscript.org. I tried applying it in the code. Still I'm not sure if this is it. So, I went to investigate the movie clip loader script and thge navigation-1.swf file.

b] I was thinking the problem was the navigation-1.swf. I tried something to test that out. I called the gallery4.swf using loadMovieNum into level1. Everything in the gallery showed up, images and text. So now, I'm thinking it's not the navigation-1.swf that's giving me a problem. I think it's the movie clip loader script that might be playing games with me.

The only reason why I'm set on using the movie clip loader to load gallery4.swf into navigation-1.swf is because I like the effect of everything on the stage moving; this is accomplished when gallery4.swf is loaded in a particular movie clip in navigation-1.swf.

Can anyone help me out with this one? I'm okay with flash [that's stretching it], but you guys/gals are the gurus!!!!

Here's a link to view navigation-1.html, the file that calls gallery4.swf

Here's a link to just view gallery4.swf

Here's the .zip of the files involved.

Mind you the visuals aren't done yet, I'm still trying to figure the functional part, hopefully!!! AAAAA

Hope your brains' are sharp tonight because I think mine has worn as my eyes tonight!!!

Thanks,
upp'ed to motrin5xaday for tonight...

Swapping Movie Clips With Variables And Just Playing A Friggin' Movie..
Ok i am trying to do 2 very simple things..

i just want to jump to frame 2 of this movie called solotab just when the movie first runs..

Then i want the clickable tabs to enlarge - move to the edge and replace each other and for this there are the variables current and currenttab to store the respective instances to be targetted.

I don't know why it doesn't work as the target path is correct and the variable is correct - the trace action shows this..

with your help i could become cleverer..the file is on this thread - http://www.kirupa.com/forum/showthread.php?t=217591

Si

Xml Variables' Paths In A Loaded Movie Via Movie Cliip Loader
Okay, I found 3 different .fla files:
1] an XML photogallery [including image, thumbnails and title & description]
2] a Navigational type file [when a button is pressed, the screen moves to that section, set by x & y coordinates, with friction]
3] a file featuring loading multiple external .swf's into specific movie clips [movie clip loader, instead of loadMovieNum]

All the files work fine independently.
I put the actions of the movie clip loader into "navigation-1.swf".
The movie clip loader calls "gallery4.swf" and places it in a movie clip deep navigation-1.swf.

Gallery4.swf loads almost loads fine in navigation-1.swf; the images and thumbnails show, but the title and descriptions do not.

a] It might be the paths in gallery4.swf. I read the tutorials in paths/advanced paths from actionscript.org. I tried applying it in the code. Still I'm not sure if this is it. So, I went to investigate the movie clip loader script and thge navigation-1.swf file.

b] I was thinking the problem was the navigation-1.swf. I tried something to test that out. I called the gallery4.swf using loadMovieNum into level1. Everything in the gallery showed up, images and text. So now, I'm thinking it's not the navigation-1.swf that's giving me a problem. I think it's the movie clip loader script that might be playing games with me.

The only reason why I'm set on using the movie clip loader to load gallery4.swf into navigation-1.swf is because I like the effect of everything on the stage moving; this is accomplished when gallery4.swf is loaded in a particular movie clip in navigation-1.swf.

Can anyone help me out with this one? I'm okay with flash [that's stretching it], but you guys/gals are the gurus!!!!

Here's a link to view navigation-1.html, the file that calls gallery4.swf

Here's a link to just view gallery4.swf

Here's the .zip of the files involved.

Mind you the visuals aren't done yet, I'm still trying to figure the functional part, hopefully!!! AAAAA

Hope your brains' are sharp tonight because I think mine has worn as my eyes tonight!!!

Thanks,
upp'ed to motrin5xaday for tonight...

Loading Movie That Has Variables Loaded Into MovieClip Of That Movie
hi, I have a problem with loading movies that contain loaded variables ,
here is what I'm trying to do:
Main Movie (loadMovie ("reset.swf", _level0.MC))

reset.swf (loadVariables ("crimea.txt", _level0.text))

and the problem is that the text (=crimea) isn't displayed

Have you any ideas of what is wrong?
-thanks-

Why Variables Of Loaded Movie Reset Within Main Movie
why variables of loaded movie reset within main movie!!!! mean when i load movie into level 1 or else (not level0)
variables like text etc of loaded movie dont display...
//
i have movie "Text" with text loaded into it:
loadVariables ("crimea.txt", _root);
in main movie when i load "Text.swf" to level0 everything is fine, but when i load it to level 1 or else text of "Text" movie doesnt display...
//
where i have a mistake or
is there a way to make it different???
your help is appreciated, thanks

Passing Variables From Movie Clip To Loaded Movie
I've got a movie clip which contains a button in it. This movie clip contains a few dynamic text fields and is duplicated 20 times. When clicked the button loads a movie into a specified target. Is there a way to send the movie clip's variables to the loaded movie?
Thanks very much.
-Mike

How To Pass Variables From Main Movie To Movie At Different Level
hi guys,
i have a main movie which loads different movies at different levels.
i want to connect these movies by a single preloader(loader.swf) which will receive two varibles from main movie(main.swf)
1)mymovie (this variable will have the movie name which will be loader by loader.swf)

2)mylevel (at which level)

now problem is how i will pass the varibles from main.swf to loader.swf which will load movies in main.swf

am i logically correct.........
is there any tutorial available similar to this.

bye
all comments are appreciated
adnan

Movie Inside Movie Wont Load Variables.
Hello,

I have a Main navigation movie that loads page movies inside a movie clip within the main navigation movie.

one of the pages "News" will not load its variables when viewed inside the Main Navigation movie clip but will load them when viewed on its own.

Here is a snippet of code I am running in the "News" page:

this.addressVars = new LoadVars();
this.addressVars.load("php-text.php");
this.addressVars.onLoad = function() {
_root.newsText.text = addressVars.newsText;
_root.newsTitle = addressVars.newsTitle;
_root.newsDate = addressVars.newsDate;
}

I am guessing it may have something to do with addressing this or root or parent.

Any help would be greatly appreciated.

Passing Variables From Movie To Movie
I have a page which send a Variable to a flash page. This flash page gets the varialbe fine and this page is used to determine if the user has flash or not.

Im going to use the following line to determine the flash the only problem is I can not get Variable Jackpot to hold its numeric value to the page called alert.

getURL ("Alert.asp?Name=Jackpot", "_self");

If I send varialbe using get then the Var "Name" is equal to "Name=10" all I want it to be is "10" Is this possible

How To Pass Variables From Movie To Movie
I am trying to pass a variable from Movie 1 to Movie 2.

Movie 1 is on the main timeline.

Movie 2 is a popup scroller window (swf file) that loads an external textfile.

I am trying to get the button actions in Movie 1 to tell Movie 2 which external text file to load.


Button on Movie 1

on (release) {
loadMovieNum ("popup.swf", 1);
}

--------------

Here is what loads the text file into Movie 2. It brings the contents of the entire textfile in as a variable. How can "scrolltext.txt" be replaced with a variable name so it will be dynamic, based on the button actions in Movie 1?

loadVariables ("scrolltext.txt", "");


Any help would be appreciated!

Passing Variables From Movie To Movie
Hi,

I have a game with three separate parts. What I need is put variables in the first part for name and score, and passing them as I go from part to part. At the end I have to make a "HALL OF FAME" with the name and score writen on a page.

How do I put and pass a variables from one .swf to another?

Thanks

Movie In A Movie Properties & Variables HELP PLEASE
Hello fellow flash users!

Can you help?

I have a main large movie that has a smaller blank movie within it called "Blank".
When i click the menu buttons i can load external .swf pages into the "Blank" movie with no problems BUT if i load a game into the "Blank" movie i find that the games properties and variables are not working?

If i load .swf pages that have no properties or variable then all works well but games with variables do no work.

The actual game has its properties set and variables set at the first frame and the game on its own works fine.
But when loaded into "Blank" of the large movie then the game runs but the properties such as visability are ignored.

Can you please help, Many thanks!
Ron

A Movie Sending Variables To Another Movie
I have a file(nav.swf) and I want a button to return a value to a variable in a different move(body.swf) when the button is depressed. Is it possible? I know it is because of the action loadvar. Can someone help me? I need to know how to do the setup with both movies. I've been trying to figure this out for 5 hours. Any help, again, will be greatly appreciated.

- sar

Passing Variables From Movie To Movie
Hi Guys

This may seem a realy silly question but how can I pass variables from one flash movie to another?

I am working on a site which requires a shopping trolley. As a visitor views the site they can add information to a basket. This is one flash movie. Then there is an enquirey form. This is a second flash movie. The variables from the first needs to be passed to the second.

These two movies are controlled via a flash menu (third flash movie).

all movies are on a framed site which has a top frome (top) and a bottom frame (info) the menu is always visible in top and I need to control flash movies one and two in the bottom frame (info).

Thanks in advance fro any help with this.

rangerover

Transfering Variables From One Movie Clip To An External Movie Clip.
i have two movie clips. one is supposed to recieve the value for the variable and pass it on to the other movie clip, which is called into the 1st one via the loadMovieNum() command.

I was trying to use global variables but i'm not able to get this to work because the 2nd one is tracing undefined when i use

trace(variable);

any suggestions?

Variables In A Movie, Within A Movie?
my fellow boardsters...

okay, i have a movie (stop me if you've heard this one before...) and different content movies are loaded into it, into an empty movieclip which acts as a holder. blah, blah, blah...

so, one of these content movies contains buttons, whose text and URL links are determined from variables in a simple external text file.

when i Test Movie this all works fine and dandy, super, gorgeous-lovely.

when i test the whole site in a browser, however, the text and links are nowhere to be seen.

i'm assuming this is because the content movie is within another movie- i've had problems all the way thru this project with determining levels and syntax.

but where should i be altering my actionscript or text file to make the variables turn up in the right place?

please! please! help me!
louise
[Edited by LCTaylor on 09-13-2001 at 11:46 AM]

Movie To Movie Variables
Hi!!!

I need to make a randomizer (again), but this time I do not want the movies to reéat themselves, how could I make this?

I was thinking in a matriz, where I make a randon chain of movies, then it begins, how should I make it so the target movie knows who it is and so when it goes back it tells the loader that it should not be called again?

Thanks

Variables In A Movie
is there any way of gretting flash to tell me what variables are in a movie clip?

It is using databse interaction so I can't use flash debug as it has to be done in a ctive browser window.

ideally I want to tell flash to populate a text box with all the variables in _root.movie.samplemovie

hope you can help

Variables Throughout Whole Movie
I am trying to find how to make a variable which I can use and edit anywhere in the movie, and from any movie clip. (I am using Flash 5)

I need to declare the variable within a movie clip that is on the main timeline, and access it and change it from movie clips within that movie clip.

Ex:
Main Timeline
. >Movie clip I want to declare the variable in
. . >movie clip I want to read and change the variable in
. . >movie clip I want to read and change the variable in
. . >movie clip I want to read and change the variable in
. . >movie clip I want to read and change the variable in
. . >...

Please leave some info.

Hm, Variables From One Movie In Another
Yo guys, simple question! I have two movies, A and B, A loads B, got it?

So B has 4 buttons, each that set a variable to something different, A needs to see these variables, as the button triggers an animation, and on frame 15 or so the frame gets a command that involves that variable, in my case it's loading another movie, so my AS looks like this


Quote:




on(press){
Global.image = "image2.swf"
_root.loaderctrl.gotoAndPlay("go");
}




So the _root.loaderctrl is the MC inside movie A, keep in mind that this button is in B. That MC has this in it


Quote:




loadMovie(image,"_root.holder")




so as you can see the button changes the directory and filename of the movie to load.

But why doesnt this work? the variable doesnt seem to go thru

Help With Movie Variables
Hello, I am trying to get the width of a movie to determine if I need to add buttons to show the rest of the movie. My stage is 750 wide the movies I am loading in are anywhere from 750 to 750(n) wide. Everytime I tried to get myMovie._width it returned 0. I was looking around and found this bit of code but I can not get the values out of the function into another variable. Below is my code. Please help.

var myMovie:MovieClip = this.createEmptyMovieClip("myMovie", _root);
var mcListener:Object = new Object();

mcListener.onLoadInit = function(target_mc:MovieClip)
{
mcWidth = target_mc._width;
numFrames = Math.floor(mcWidth/750);
trace("This clip has " + numFrames + " frames");
return(numFrames);
}


var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(mcListener);
mcLoader.loadClip("history/1960s.swf", myMovie);
var myText:TextField = this.createTextField(myText, 2, 0, 360, 100, 30);
myText.text = numFrames;


P.S. I am a complete noob to A.S. and I may not even be close to having efficent code, but it was a start.

Variables In Movie Clips
Hey, it's me again.
I have an other perdicament. This time it's conserning variables. In my main timeline I have a frame that sets a variable.
Code:
set (app, "1");
Later on in that timeline, I have a movie that has a button in it. In the action script of that button I have the following code:


Code:
on (release) {
if (app = "1") {
getURL ("www.1.com");
}
if (app = "2") {
getURL ("www.2.com");
}
if (app = "3") {
getURL ("www.3.com");
}
if (app = "4") {
getURL ("www.4.com");
}
if (app = "5") {
getURL ("www.5.com");
}
}
That's just an example but for some reason when I press the button after the variable "app" has been set in my main timeline
absolutly nothing happens. Can someone out there help?

Thanx

Variables From A Movie Clip
hey all,
i have a little problem. I'm trying to make a nice little menu, that changes depending on your selection on the menu. blah.

right the problem i'm having is:
when i have a Go button (to make your selection on the menu to go somwhere)
(which is in the main movie not the movie clip. it cant gather the variables from the movie clip.

not sure if that makes sense...
when you select somthing from the menu it sets a variable (but in the movie clip.) is there a way i can either get these variables from the movie clip and use them in the main movie or is there a way that when i make a selection in the movie clip it changes variables in the main movie???


if that makes no sense then my menu is doomed.

thankyou very much for any help.

matt

Passing On Variables From One Movie To The Other
Hi there,

I would like to load a movie into
my main.swf (no problem here)

I need to enter stuff into a variable
based in the loaded movie

loaded movie unloads and we return to main.swf

At the end of the main.swf I would like to display
the value of the variable in the loaded movie


Thanks

How To Load A Movie With A Variables Name?
hi, it's me again!

usually i am just scripting flash 5, now flash 4 troubles me a lot:

if i define a variable called _level0.etage on any timeline (lets say _level0.etage="00entrance"), how can i then on any other timeline load a movieclip called 00entrance.swf into an existing placeholder movie called placeholder?

loadMovie (_level0.etage + ".swf", "placeholder");

does not work, output window:

Error opening URL "file:///ELASTO/PROJECTS/076%20HOCHHAUSSTUDIE/4%20page/0"

Loading Variables Into A Movie
I need my movie to load in a text file with some variables in it. No problem there, but I need the text file to be different depending on who is looking.

The user will have a cookie on their machine and their own text file on the server. Basically I need a way of telling the flash movie to load username_preferences.txt where username is retrieved from the cookie.

Can this be done?

GET Variables Into Flash Movie
I'm building a flash movie that needs some state information passed to it- like a username. When the flash opens, I need this variable available to the flash.

I'm using a get statement in the html (mymovie.swf?user=eddie) which works in explorer, but not netscape. It has to work for all browsers, so no javascript.

Passing Url Variables To A Movie
hi,
was wondering if it was possible to pass variables to a movie by attaching them to the page url?
i have a main movie that loads smaller clips and its these clip names i want to pass on

Variables And Movie Clips....... Help
ok heres the problem I have on scene 1 a movie clip with a button on it to make it run. also this button needs to run another movie clip after the first one and it does it. but the problem comes in on the second movie clip. it has a dynamic tex that I need to show up on the end of it. now everything works fine click the button first movie plays then the second movie plays unless I have put text into the input box that is suppose to show up on the dynamic tex box. If I input anything into it then it jumps back to frame one showing the input box????here is the code I am useing.
this one is for the button to play the movies.on (release) {
with (du2) {
play ();
}
}
on (release) {
with (prize1) {
play ();
}
}
this one is on frame 2 to display the variable
prize1.out = prize1-1;

my second movie that the dynamic text is suppose to show up in is called prize1, the the dynamic text box is called out and the input box is called prize1-1. thanks for any help

Variables Being Ignored By Movie Clip ?
I am setting some variables in the first frame of a movie thus:

FPStop = "51";
MBStop = "8";
ValuesLoaded = "OK";

On the eighth frame, a movie clip is established which plays to a frame determined by the variable FPStop (in this case 51 out of the 100 frames of the clip).

90% of the time it works fine. Every now and again though, the movie clip seems to ignore the variable and plays right up to its final frame (100).

I've tried loading the variables from an external text file but it seems to make it even more unreliable.

Anyone think what might be wrong?

I'm tearing my hair out !!!

Passing Variables From One Movie To Another
If I have a main movie (movie1) that calls other movies (movie2, movie3) within it, how do I send a variable from one to another embeded movie?

For example send a variable from movie2 to movie3. Should I store the variable into the main movie first then movie3 can call thre variable from there?

like this?
movie2
------
_root.id = "10";

main movie
----------
loadMovie("movie3", 1); // loads movie3 directly onto same level as movie2 was.

movie3
------
id = _root.id;

This doesn't seem to work? Am I close to the answer?

Resetting All Variables In A Movie
Hi

Is there a command which can allow you to reset all variables to 0 at once in action script? I'm creating a game, and in order to start again, I need to be able to reset all the variables. Some of them are nested in seperate movie clips and I don't want the hassel of starting them all again.

Any ideas?

Thanks

Noel

Using Variables In Movie Clips
i am trying to create a slot machine type game in flash. i have the main movie which contains a button, and when pressed spins the three reels and generates variables of random numbers. the reels are three seperate movie clips which spin (play) when the button is pressed. the plan is to have the movie clip stop on the correct frame using script inside the movie clip using the random variables.

when i press the button to create variables as random values it works, but when i try to use these variables in a script contained inside a movie clip it doesnt seem to hold any value for that variable.

Below is an example of the scripting used in the movie:

The button:

on (release) {
// set variables with random number value (1-10)
reel1_stop = random (10) + 1;
// spin reels
tellTarget ("reel1") {
play ();
}
}

The Movie Clip (reel1):

Each frame has script similar to this. using the variable it should stop on the correct frame. there are ten frames in the movie clip and it has loop playback.

if (reel1_stop==1) {
stop ();
}

the variables hold no value in the movie clip and only seem to work if i use them on the base level of the movie (and not within movie clips which is no use). is there a way to load the variables and there values into the movie clip. Thanks

Variables And Movie Clips
I have a frame in my main timeline that sets a variable. I have an if in a movie clip in the main timeline. The variable doesnt seem to work, do I have to do a tell target with the variable in it??

thanx

Variables In Movie Clip
Hello,

Into a scene I have loaded a movie clip that needs to display a number of prices which are loaded from an external file using the loadVariables command. In the movieclip are dynamic text fields with the appropriate variable names associated. If I put the loadVariables into the movieclip and export only that clip for testing ("Test Scene" while editing the clip), the prices load and show up just fine. However, they do not show up when viewing the whole movie. Everything else in the movie clip shows up just fine, but no prices.

Where do I need to put the loadVariables to be able to use the variables in the movie? Do I use a level or a target for the loadVariables? If a target, do I target the movie clip by name or by its instance name?

Other information that may or may not matter: These variables will not change during the run of the movie, but I want them to be loaded externally, so that they are easy to change when needed and integrated better into our database.

Thanks for any help,
Joe

Add Variables Of 2 Different Movie Clips
I have a flash file in which i like to add up two variables which resides in two different moive clips.

for e.g.

variable "num1" resides in the root scene
variable "num2" resides in a movie clips "MClip1"

now i like to add num1 and num2 and display the result in the third variable "result" which resides in the main scene.

The Script i wrote doesn't work

--------
tellTarget ("../") {
result = num1+num2;
}
trace num2
-------

In this script tellTarget points to the root scene.. the script is written in the mclips1 so num1 can be pointed in this way.. but i am not able to take the value of num2 as it's not in the root.. it's in the movie clip where this script is written..

Trace command also executes properly and displays the value of num2 as it's written outside telltarget block..

Please Help me out...

Variables And Movie Clips
In a program I am writing, I am trying to take information input into the program through Input Text boxes, manipulate the data using actionscript and then output the data in a dynamic text box. However, I am having troubles when the input text box is located inside one movie clip and the dynamic text box is located in a different movie clip that appears later on the time line.

Any help would be appreciated.

Thanks

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.

Variables And Movie Clips
Is there any way to reference a variable that is defined within the main timeline from within a movie clip?

I have a variable named position on my main timeline. I also have a slider bar with a slider pointer in it with this code on it:

on (press) {
startDrag (this, false, 0, 10, 310, 10);
with (_root.january) {
gotoAndStop(position);
}
}
on (release) {
stopDrag ();
}

Variables And Movie Clips
hi,
I hope someone out there can help me.
I have a movieclip with scrolling buttons which I want to control from buttons on the stage.
I figured my best way was to have a variable, if you click the right button it sets a variable up called dir to 1, the left sets dir to -1.

on the movie clip I have a stop command, then if dir > 0 next frame
and
if dir < 0 then previous frame

but it doesnt work.
Ive used trace and although the variable has the same name and I believe that flash has global variables by default it sees the variable as two different ones (one on the button, one in the movie clip)with nothing to link them.
So my question to anyone that can help is. How do I get my movie clip to recognise the variable thats being used outside the clip?
TIA
joel

Passing Variables To Another Movie
Hi Gang,

I need to send the variables from the flash form in my movie form.swf (in form.html )and then pass that to another movie which is called end.swf a (in end.html)

... basically how do you do that?

Cheers

Planet House

Pass Variables To Movie
i am going through an array and want to assign a movie clip for each element. i also want to pass in strings for dynamic text fields.

this worked originally but when i tried to make it so there was animation with the text fields, it all fell apart.

is there a way i can assign variables in the movie clips and on the onLoad function for the text fields, set the value to the variables?

Variables In Movie Clips
this may get complicated. i have a button on the main timeline that i want to check to see what the value of a variable is in a movie clip. any help?

to explain, i have the button and i want it to play a page transition if the transition isn't already loaded (variables being located in the transition mc). but, if it is loaded, i don't want it to play. i can get it to play. i can get it to not play. i just can't get it to do those things when they're supposed to happen. it's one or the other.

any help would be appreciated. i'm sure there's a simple solution

Control Movie By Variables
hi all!
i want to control a movieclip with a button. now the movieclip (antwort1) has another movieclip in it (a1). my button is placed one layer above the movieclip (antwort1).
movieclip a1 has three frames, each with stop action, on the second frame i set a variable: behave = false, on the third frame, i got: behave = true
this is the movieclip i want to control with my button on which i got following script:

on (rollOver) {
antwort1.a1.GotoAndStop(2);
}
on (release) {
antwort1.a1.GotoAndStop(3);
}
on (rollOut) {
if (antwort1.a1.behave = true) {
antwort1.a1.GotoAndStop(3);
}
if (antwort1.a1.behave = false) {
antwort1.a1.GotoAndStop(1);
}
}

i set the variables to check wether the user clicked or not.
by click it should go to frame 3; if not clicked, it should go to frame 1.
i think my bug is how i want to attach my variables?!
any help would be great
cheerio

Attach Movie Using Variables
I want to dynamically call certain symbols from the library based on the sequence. The values or names of the symbols required are passed form a flat file.

say(&icon = readicon)
can I attach movie using the folloing code after loading the value using loadVariableNum.

attachMovie(icon, "new"+icon, 0)

when I give this the movie is not loading. I checked if the value for icon is loading by giving the trace and it is loaded. Please help me out.

Load Movie With Variables
How to pass variables to movie that will be loaded by loadMovieClip(...) command ?

Thank you.


Eldar52

Load Variables Into Movie
ok, I am lost, I have a stand alone that I can type in the information I want and send it to a cgi script. then I have a another stand alone that I call viewer and it brings the variables in just like it should and it works great. But now I am trying to do the same thing except that in my viewer I want to have buttons that when clicked shows the variables it is bringing in. This to does work if I edit my buttons and on over place the dynamic text box so it becomes part of the button but I don't want to do it this way. What I want to do is make a dynamic text box give it the variable name to it then make it into a movie so that when say button one is clicked I can use a code such as:
_root.text.gotoAndStop(2); I am doing this because frame one of the movie would be blank so you only see it when you click on button one. I have this part working fine except I can not get my variable to go into the movie text. Other words click button one and the text movie comes up but no informatoin is in it. Hope somewere in my rambling you can understand what I am talking about. Thanks for any help you can give on this matter.

Movie Clips And Variables
ok, I posted something yesterday on this and got no responce so thought I would try wording it diffrently.

My problem is this. I have a movie clip called time this movie clip has a dynamic text frame with a variable called times. On frame one of the movie clip I have a stop command and nothing else so that it sits out there invisable. on frame 2 I have this action:
onClipEvent (data) {
loadVariables ("http://www.mydomain.com/cgi-bin/readvisitor.pl", "times", "GEST");
}
in the main movie I have a button that has this command:
on (rollOver) {
_root.time.gotoAndPlay(2);
}
on (rollOut) {
_root.time.gotoAndStop(1);
}
Now my problem is that it does not show the variables that I send to it through my cgi scrip. I do know my cgi script does work because if I just put a dyanmic text box on the page and not in a movie clip then all the information come through just like it should. Also I know that it is sending a request to the cgi script from the movie clip because I watch my firewall and see the data request go out. the problem is that is does not show the data in the dynamic text box when it is inside a movie clip? What am I doing wrong. Please some one help me. Ok, so I have resorted to begging LOL. pleae if some one knows how to do this please let me know.
Thanks for any help anyone can give me on this.

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