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








Passing Variables Between 2 Movies


I have two movies. I load one of them in the main movie. The secondary movie has a button who has to change the text in a dinamic text box, something like this:

on(release){
_root.form.data1.text="mytext";
}

Where form is a movieclip in the main movie and data1 is the dinamic tex box.

This is what i´m doing but doesn´t work, can you help me?




Ultrashock Forums > Flash > Flash Newbie
Posted on: 2006-01-30


View Complete Forum Thread with Replies

Sponsored Links:

Passing Variables Between Movies
hey all...

i am a programmer who is new to flash and i am pretty confused about scoping of variables. the immediate problem is as follows:

we have a main movie which calls another movie. the user can then select somethings in the sub-movie. we want to write those choices to a variable in the main movie. the movies are separate to keep the size of the main movie down.

is there any way for movies to share variables other than using text files and a load varaibles call? we tried using javascript and cookies (an ideal situation) but had trouble with ie om mac (we will need to use the setvariable call rather than using javascript to write the page and reloading it).

i am sort of new to flash terminology, so i trying to be as clear as possible.

thanks in advance!

og

View Replies !    View Related
Passing Variables Between 2 Movies
I need to pass a single variable from one flash movie to another. they are both on seperate html pages. I have done this before using ASP and I know it can be done with most other backend languages too. The trouble is I am limited by the clients crap intranet.

I have html, flash and javascript at my disposal. Anyway it can be done?

View Replies !    View Related
Passing Variables Between Movies
hello fellow flashers,

In need of your wisdom, yet again.

I want to declare a variable which can be accessed in another movie. I have a movie loading in an MC. In that movie there is a link to another movie, which has several sections. I want to target a specific section. This is what I have on the link in the first movie:

on (press) {
_global.section = "sales";
gotoAndStop(27);
loadMovie("investor.swf", _root.dropmenu);
}

Then in the investor.swf (the movie with all the different sections), I have in the frame action:

if (_global.section eq "sales") {
gotoAndPlay("sales");
}

Nothing happens.

I hope this is enough info.

Thanks in advance!!

View Replies !    View Related
Passing Variables Between Movies
Hi

I have one EXE Flash file and one SWF file... I call the second one from the first one... I'd like to pass variables from the first to the second without using text files... how is that possible? I hope that's clear!

nico

View Replies !    View Related
Passing Variables Down Through Movies
So, I'm creating an interactive test.

9 categories, 15 yes/no questions in each category, with total scores (yes's) for each category grouped together (in a separate movie) at the end of the test.

I've made it so that for each category, the number of yes's the user clicks gets totaled in something called "categorytotal"

To limit the stress of download, I've created separate swf files for each category (each question is accompanied by a vocal soundbite, which takes up a lot of room if put into only one file). Somehow, I have to get the "categorytotal" from each separate movie to move on to the final movie in which all totals shall appear.

Basically, the user has to see all of their totals gathered at the end, and somehow, their entries (variables) have to be passed along.

How would I do this?

I'm using LoadMovie to load in each successive swf/category of the test. In the Variables box, I've tried out POST, hoping that this would somehow pass on the new total for a variable such as "musictotal", so that it could eventually be passed on down to the last movie. Do I need to use LoadVariable, too?

Can this even be done???

Any help is greatly appreciated!

Thanks,
Shak

View Replies !    View Related
Passing Variables Between Movies
Is using globals the best way of passing variables from an already loaded movie to a new movie being loaded, or is there a better way? If so, what is it? Tks

View Replies !    View Related
Passing Variables Between Movies
Hi,

I'm loading movie2 into movie1 and want movie2 to use a variable I have set in movie1. I thought it would be recognised as a global variable but it doesn't seem to work.

anyone any ideas?

cheers!
Tammy

View Replies !    View Related
Passing Variables Between Movies
Hi
How can i pass variables between movies like:
nome="Tavares";
Cod_Delegacao="Coimbra";
If i do
loadMovieNum("despesas.swf?Nomes="+Nome+"?Cod_Dele gacao="+Delegacao,1);
don't work (for the variable Cod_Delegacao). How can i do that?
Thanks
Mario

View Replies !    View Related
Passing Variables Between 2 Movies
Hi,

I have 2 separate flash movies on one html page. Effectively there is a menu movie and a display movie. I would like the display movie to react (on mouseover) of the individual menu components.

I have done a fair amount of research on this so far and can not find a simple solution. Perhaps it is too simple and is staring me in the face. Surely there is a way to pass variables from one flash movie to another?

Your help is VERY much appreciated,
Best regards,
Tony

View Replies !    View Related
Passing Variables Between 2 Movies
Okay, this question is fairly simple, but for the life of me I can't figure it out. I'm feeling rather dumb, but it's been a while since I've tried this.

I have two movies on the same page and I need to pass variables between them without having to reload the page. How do I do that?

Thanks!

View Replies !    View Related
Passing Variables Between Movies
ok, I have five swfs in different pages but on the same site. One of them is the main swf that is always open (the other four are beeing opened and closed all the time). What I need is to know how to make the 5 swfs be exchanging variables all the time, in my last try I could only make them oad the variables once, then they wuldnt change again.

View Replies !    View Related
[mx]passing Variables Between Movies
Hi!!

I want to know how I can pass parameters between 2 swf files..

Can anyone help me??

View Replies !    View Related
[mx]passing Variables Between Movies
Hi!!

I want to know how I can pass parameters between 2 swf files..

Can anyone help me??

View Replies !    View Related
Passing Variables Between Movies.
I have a button in one movie with the following script on it:

on (press) {
loadMovieNum("raygun_2.swf", 0);
_global.firstAction = "with (_level0.ScrollBarAbout.scroll) {_y = 14;}";
}
on (release) {
unloadMovieNum(0);
}


It needs to unload itself and send the variable "firstAction" which contains the command :
with (_level0.ScrollBarAbout.scroll)
{_y = 14;
}

to the newly loaded movie "raygun_2.swf" which then needs to execute the "with" action to take the user to an "anchor point" within a text box.

I have tested the "trace" action and it seems to be sending the variable but I can not get it to execute the "with" action contained in the variable.
How do I tell the newly loaded "raygun_2.swf" to execute the action contained in the variable???

View Replies !    View Related
Passing Variables Between Flash Movies
Okay, after trying to sort through the hodge-podge of "tutorials" online, I stil can't find an easy way to pass variables between two different flash movies. Is there an easy way to do this without using PHP or ASP or anything like that?

View Replies !    View Related
Passing Variables To Loading Movies
using loadMovie or MovieClipLoader, how would i pass a parameter to the movie being loaded ?

the reason for this is that i'd like to have images dynamically and externally loaded

thanks

View Replies !    View Related
Passing Variables Between Two Flash Movies.
Problem:
I have 2 flash movies in seperate frames and I want to be able to pass a string variable from one movie to the other? Any suggestion would be greatly appreciated. Thanks

View Replies !    View Related
Passing Variables Between Loaded Movies With Both Of Them On Level0
I have two movies, moviepart1 and moviepart2. when moviepart1 gets done playing and the user clicks on the "next" button it loads moviepart2 onto level0. I need to be able to have a back button on the first scene of moviepart2 to take the user to the last scene of moviepart1. Here is the actionscripting I am using:

This is on the back button on moviepart2:

Code:
on (release) {
jump=1;
loadMovieNum ("moviepart1.swf", 0, "GET");
}
and I have a wait scene at the beginning of moviepart1 to use a conditional to figure out if that variable has been sent or not. hereis that conditional:

Code:
if (_level0.jump == 1) {
gotoAndPlay ("scene3", 1);
} else {
gotoAndPlay ("scene1", 1);
}
I hope that this is enough information to get some help and I would greatly appreciate any help.

Thanks,
Justin
[Edited by therealsyko on 12-18-2001 at 11:20 AM]

View Replies !    View Related
Passing Variables From Dynamically Loaded Movies
Why can't Flash pass data from a dynamically loaded movie to the root timeline?

Here's the code in Frame 1:

_root.loc = "ABC";

//the Left Key traces the variable that is modified by the dynamic movieclip

userKey = new Object();
userKey.onKeyDown = function(){
if(Key.getCode() == Key.LEFT){
trace(_root.loc);
}
}
Key.addListener(userKey);

//the button dups the movieclip and loads a movie into it

_root.counter = 0;

bt1.onRelease = function() {
duplicateMovieClip(mct, "mct"+_root.counter, _root.counter);
loadMovie(counter+".swf", "mct"+_root.counter);
_root.counter ++;
};

Here's the code in the base movieclip (mct), that is duplicated in all sunsequent movieclips:

on(press){
nam = _name;
_root.loc = nam;
trace(nam)
trace(_root.loc);
startDrag(this);
}
on(release){
stopDrag();
}


Basically, I want to duplicate movieclips, load swfs into them, then identify which movieclip/swf has been clicked on, and pass its name to some scripts on the root timeline.

Note that if you comment out the loadMovie line - it works.

Thanks for your assistance.

View Replies !    View Related
Passing Variables And Values Across Multiple Movies
Hi,

I've got this code on a button in a clip called "topHeader.swf" within a parent movie called "mainMovie.swf"


Code:
on (release) {
_root.letsGo = true;
}

Now, I've got this code on this other clip called "bookingClip.swf" within the same parent movie.


Code:
if (_root.letsGo==true) {
gotoAndStop(1);
}

I'd love to know why it isn't working?

Any help would be greatly appreciated.

Blastbum

View Replies !    View Related
Passing Global Variables Between Seperate Movies
Is there a way to do it without flashvar/javascript?

I need ONE tiny variable passed from level0 to level1, but from what I've read so far, there's no other way.

Anyone?

Thanks!

View Replies !    View Related
Passing Variables From Loaded Movies To The Loader Movie
I am loading a swf file into an empty movie clip in the main Flash program (mainApp). I am trying to pass variables by value from the loaded movie to mainApp.

This function is in mainApp:

function read_1_vars(band,qual, lang){
trace("--------------------");
blnBandwidth=band;
blnQuality=qual;
language=lang;
}


This is the code used in the loaded movie to contact mainAPP:

_root.read_1_vars(blnBandwidth, blnQuality, language);


All this code worked just fine when contained in one one single file.

Any ideas? What am I missing? Thanks.

View Replies !    View Related
Avoid Reloading Of Flash Movies When Passing Them Variables From Html
Hi all.
I've created a two-levels flash menu (mainsections each with subsections) which I am using as navigation in a html page. When I go to a different page, the html sends the movie a variable telling it to what section it should be automatically opened. Everything works fine except that when the movie receives a new variable it reloads from zero. Is there any way to avoid this without the use of frames?
Thank you very much.

View Replies !    View Related
Dynamically Loading Movies Into Movies With Variables
This might be a kinda tough one. I'll explain the best that I know how.

I want to load jpg images into a movie/button (movie clip with a button instance inside of it with another movie clip inside the button), but I need to do it dynamically.

I was thinking about naming all of the files the same but just change the numbering at the end. Then I can just use an i value to obtain the next file.


Code:
for(i=1;i<5;i++){
loadMovie("something"+i+".jpg","mv_btn_"+i)
}


so, basically I have 5 buttons with 5 images to import. The buttons already have the proper numbers on them, I just need to import the clips into the corresponding button.

View Replies !    View Related
Passing Info To Movies
hi all,
could anyone please please please tell me how to get this done?
i have a main movie interface which loads other movies into it using the load movie-target action. now, what i would like to know is how do i pass variables to the loaded movie and then pass info back to the main movie from the loaded movie. is this even possible? i'm losing too much hair figuring out what to do.
so, pls let me know. i would be eternally grateful.
thanks in advance.

View Replies !    View Related
Passing Info Between Movies
Ok I'm not entirely sure how to do this, hence posting this.

But basically I have a a main movie which uses buttons to load several other movies.

What I want to do is get some text in the movie that is being loaded and pass it back to main movie.

I guess I will need a dynamic text box in the main movie but I'm not sure the commmand / code to use.

Any help would be greatly appreciated

View Replies !    View Related
Variable Passing Between Movies
Hi,

I want to send a varibale from the current movie to the new movie that I am loading, with the Load movie command. It is not a web based, so using Get or Post methods have not been successful.

Please email me at khushru_kanga@hotmail.com if u have know how.

Thanking you,
Khushru

View Replies !    View Related
Passing Actionscript To Different Movies
I have a page split in to frames. Header frame which contains the navigation swf. Then a left bar which will holds the other flash movie and the mainframe which will hold the html content.

In my navigation I have 6 buttons. In my movie I have 6 different sections corresponding to the buttons. So what I want to do is when a button is clicked it will play the animation in the swf in the left frame and display the html. When another button is clicked I want it to play out the timeframe and then jump to the section in the timeframe that corresponds to the navigation and also display the html content in the mainframe. I was told to use _telltarget? Can someone help me out please.


Thanks

View Replies !    View Related
Passing Information Between Movies
I have found many posts about passing information between movies on this very informative board, but none that directly relate to my problem.

I have a shell movie that uses loadMovieNum("secondmovie.swf", 1) to load another movie. What I am trying to do is stop my shell movie's timeline until the other movie is loaded (using a preloader), then have the shell start playing again. Any suggestions on the correct code to use?

View Replies !    View Related
Passing Movies OnRelease
hey im using the following code for my main four buttons -

Code:
button_array = ["home","plans","terms","contact"];
for (var i in button_array){
this[button_array[i]].onRelease = function() {
_root.fromName = 0;
content_mc.gotoAndPlay(36);
_root.fromName = button_array[i]+"_mc";
};
}
but every button restarts the home_mc clip..

i call it like this in the content_mc clip -


Code:
stop();
attachMovie(_root.fromName, _root.fromName, 1);
it also gets removed due to a slide down menu refresh everytime a button is pressed.

SO i have no idea whats going on

View Replies !    View Related
Passing Data Between .swf Movies.
http://vhektor.com/myoctopus/

Go to 'More Info' and click "Try It" (The leftmost option)

A map of the US comes up and users will select where they work, before getting to the next page, which is a form where they fill out the rest of their contact information. The Submit button sends the form variables to a php file on a different server which then stores their info in a database and will take the "location" variable from the map (in the previous .swf) to send the user the correct demo map.

My vars from the form post to the PHP and a confirmation e-mail is sent to the user etc. etc. this works fine...i'm just confused as to how to send the location variable that was pre-selected to send along with the form.

Thanks!

View Replies !    View Related
Passing Movies OnRelease
hey im using the following code for my main four buttons -

Code:
button_array = ["home","plans","terms","contact"];
for (var i in button_array){
this[button_array[i]].onRelease = function() {
_root.fromName = 0;
content_mc.gotoAndPlay(36);
_root.fromName = button_array[i]+"_mc";
};
}
but every button restarts the home_mc clip..

i call it like this in the content_mc clip -


Code:
stop();
attachMovie(_root.fromName, _root.fromName, 1);
it also gets removed due to a slide down menu refresh everytime a button is pressed.

SO i have no idea whats going on

View Replies !    View Related
Help: Passing Variables (180 Variables) To Function
hi

if i have call function like this

Math.findMax(app1, app2, app3, app4, app5, app6, app7, app8, app9, app10, app11);

but the values i have to app180

i don't want to write all this

Math.findMax(app1, ... , app180); //!!??

how i can to called the function from app1 to app180

Math.findMax(FROMapp1, ... , TOapp180);

thanx

View Replies !    View Related
Slow Movies By Passing A Parameter
If i have an movieclip embedded in a webpage, is it possible to control the frame speed of the movieclip via a parameter passed from a form on that webpage?

Any comments appreciated

View Replies !    View Related
Passing Vairables Between Movies On Different Frames
Is it possible to pass values between variables of two different movies working on two different frames.

View Replies !    View Related
Passing Variables To Swf
hi !

go here :

http://www.guistuff.com/tools/flashdrop/flashmenu.swf




then go here :

http://www.guistuff.com/tools/flashd...5&makenavurl4=



now can any body tell me what i have to do to the fla in order to send varibale to swf and make menu feilds dyanmically- also i want the variable comming from a db .

any help ?

suhailkaleem

View Replies !    View Related
Passing Variables
Owkee, me again

Hmm I have created a preloader with a movie that loops inside it. In that movie i calculate the percentage loaded and bytes loaded. These calculated values are stored in a variable called 'var4'.
Now is it possible to pass that variable 'var4' to the main movie ? And how do I fix this ?

View Replies !    View Related
Passing Variables
Is it possible to pass a variable from a buttonpush that is in an MC that needs to control the _root movie? In other words: rootmovie/MC/button -->variable assigned to control main (root) movie. For some reason I cannot get flash to recognize my requests....here is the code that I am using in the button:

on (release) {
var x = 5;
_root.gotoAndPlay ("monnonego");
}


Here is the code that asks the question, assigned to a keyframe (later down the root movie):

if (x == 3) {
gotoAndPlay ("profile", 34);
} else {
if (x == 4) {
gotoAndPlay ("portfolio", 34);
} else {
if (x == 5) {
gotoAndPlay ("contact", 34);
}
}
}

Any ideas?? Thanks in advanced!!

- Sigma

View Replies !    View Related
Passing Variables
I have some actionscript that doesn't work. I don't see what's wrong. Can anybody help me? It's about the towers of Hanoi. Here is my script:


var intaantal = AantalSchijven;
var intstart = 1;
var inteinde = 3;

function hanoi (n,intstartstaaf,inteindstaaf) {
if (n == 1) {
van = intstartstaaf;
naar = inteindstaaf;
trace(van);
trace(naar);
} else {
inttussenstaaf = ((6 - intstartstaaf) - inteindstaaf);
hanoi(n-1,intstartstaaf,inttussenstaaf);
van = intstartstaaf;
naar = inteindstaaf;
trace(van);
trace(naar);
//trace(inttussenstaaf);
hanoi(n-1,inttussenstaaf,inteindstaaf);
}
}
hanoi(intaantal,intstart,inteinde);
stop ();

I made a program in VB in the same way and the program works. In the program I use byval for the variable n. Maybe that's the reason why it doesn't work but what can I do?

Greetings,
Geerty.

View Replies !    View Related
Passing Variables From PHP (or Whatever)
it's fun and easy!

(found my answer, deleted query)
[Edited by Cakkafracle on 08-15-2001 at 03:58 AM]

View Replies !    View Related
Passing Variables Between Swf's
Hi there,

I've got 2 swf's on one html page, I need to pass a variable from one swf to the other, is it possible ??

thanx

View Replies !    View Related
PASSING VARIABLES TO CGI
I know this may have been answered before, but I cant seem to find it.

I need to know if anyone knows how to get Flash to pass variable info WITHOUT shifting the characters to their ASCII code... (i.e. a comma becomes %2C)

I have a cgi script (free, of course) that is looking for this:

data_order = "news,newscontent,tips"

whereas when i submit it from a flash form, it becomes this:

data%5Forder=news%2Cnewscontent%2Ctips

I'm sure someone out there has gotten this also.

Thanks in advance for any help or pointing me in the right direction.


KEEP FLASHING!

View Replies !    View Related
Passing Variables
Is there a way to pass a variable from one flash movie to another via a URL?

Kind of like http://www.website.com/page.html?score=30 … or something like that?


- FLASHmac

View Replies !    View Related
Passing Variables Instead Of Gas. Is This Possible?
I have a single frame movie as my start movie that I want to use to establish a variable. It's pretty much just saying

var exno = 2;

and then I load a movie.

When I trace it in the first movie, it's fine. It works. Great. But now I want the newly loaded swf movie to recognize this variable as well. How can I do that?

Any help would be appreciated.

Peter

View Replies !    View Related
Passing Variables
Movie1 (_level0) loads Movie2 to the same level. How can I pass a variable from Movie1 to Movie2? I know that it can be done by loading to a different level but is it possible when loading to the same level?

John

View Replies !    View Related
Passing Variables
is it possible to pass variables from movie to movie? If so, how would I go about it? thanks.

View Replies !    View Related
Passing Variables
i really want to pass variables to my flash movie via the url.

someone told me that if i do something like

asdfoi.swf?name=dog

then the name variable text field will show "dog"

this doesnt work.

can someone help me please

View Replies !    View Related
Passing Variables
I need to know how you pass variables to a swf, I know there is a way then you just have to add the variables name and it's value following the *.swf of the embed tag. But i forgot the syntax...

Can someone help please!!

View Replies !    View Related
Passing Variables
Hello all there!
I have created a countdown flashmovie, it counts from x seconds to zero. But the x differs from time to time, it depends on how many time is left.
What I would like to know: How can I pass a variable from my website to the flashmovie?? Propably simple but I need to know how!

Please help!
VinzZ

View Replies !    View Related
Passing Around Variables?
Ok so here is my question. I need to take an html form and pass the variables to a file and then have flash load those variables. I am looking for a tutorial or explanation so I can learn how to do this. Do I need a perl or php script to set and save these variables? I dont know? Anyway any help would be appreciated.

thanks
Carter

View Replies !    View Related
Passing Around Variables?
Ok so here is my question. I need to take an html form and pass the variables to a file and then have flash load those variables. I am looking for a tutorial or explanation so I can learn how to do this. Do I need a perl or php script to set and save these variables? I dont know? Anyway any help would be appreciated.

thanks
Carter

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved