Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing Variables between two Flash Movies

Status
Not open for further replies.

northernbeaver

Programmer
Jul 9, 2001
164
CA
I have three flash movies. Systems.swf, productDetails.swf, placeorder.swf

The first one (systems.swf) loads variables from an ASP page and loads nine records into the movie and displays everything I wan beautifully. for each record there is a button on the movie that says "more info" this button calls the second movie (productDetails.swf) it uses loadMovieNum ("proddetails.swf", 0, "GET");

this page calls an ASP to get more details from the table on the selected system. It succesfully passes variables about the selected system to the second movie which in turn, passes it to the second ASP page and displays the the details of the system. On this move there is a button, to purchase the item. It uses the same
loadMovieNum ("placeorder.swf", 0, "GET"); to call the third movie. this is where the problem happens. the second movie doenst work. The screen goes blank, through troubleshooting Ive figured out that it doesnt get to the first frame of the third movie. its as if passing the variables the second time seems to kill the movie and it sits dead in the water.


Im using Flash 5 if it makes a difference. If anyone has any idea of whats going on please let me know.


 
Alors Sharky? Toi le spécialiste de l'ASP!

Regards,
new.gif
 
Ok, didn't see it first time online OldNewbie ;-)


Hi RagenPride.

First: i need ALL of the names of your files (you said 3 and there's more "proddetails.swf" or is it misspelled???) the ASP pages names too.

Second: did you double checked your ASP pages??? By themselves???

Third: answer first & second to start LOL


I'm not a specialist... ;-)

Have Fun...

Sharky99 >:):O>
 
ok, sorry about that my spelling is horrible.

the three SWF files are named
systems.swf, Productdetails.swf,placeorder.swf

systems.swf loads variables from an ASP page called systems.asp. the asp page connects to the access backend and gets the records needed and passes them to the systems.swf file. this works fine.

when the user clicks on a button (more info) the systems.swf passes its variables to the Productdetails.swf. This works fine.

the Productdetails.swf then calls an ASP page called productdetails.asp. Using the variables that were passed by the systems.swf to the Productdetails.swf the productdetails.asp page goes back to the backend and gets the information required and passes it back to productdetails.swf. This again, works fine.

now here is where it begins to break down and Im not sure why......

on the productdetails.swf there is a button (purchase) this button calls the third flash movie called placeorder.swf. It passes the variables using "GET". but when the pages are run, it wont pull up the third movie. This is the code that fails:

on (release) {
loadMovieNum ("placeorder.swf", 0, "GET");
}

I have tried changing the "GET" to "POST" but it does the same thing. when the button is pressed, the page goes blank. it doesnt load the the movie properly (the first frame of placeorder.swf doesnt even get to the screen) Im assuming that a variable isnt being passed properly, or the combination of flash variables and ASP variables are getting messed up or something like that. I should probably mention that IF I don't send variables the movie will load but because it doesnt have the info needed it loads up blank text files.

any ideas? I hope I explained it better this time.

 
Would be better if you post a link to your 2nd and last fla, your ASP pages 2 & 3.

Are you always loading on level0??

How many variables are you using?? r u using loops??

So many things..., would be easier with files in hand.

Up to you!! Have Fun...

Sharky99 >:):O>
 
I wish that I could send you the url to it,because your right theres to many variables to think of and to many to list here. but I have actually changed the third ASP page so that I only require one variable to be passed between the second swf (productdetails.swf) to the thrid swf (placeorder.swf) so this is my new plan.

I need a bit of help learning how to pass variables between the two SWF files. just so you know I am only using level 0
so I have set a variable called newurl I want to put the url of the third movie with the variable being passed into it this is what I have so far

on (release) {
newurl = "placeorders.swf&chosenid="& chosenid;
loadMovieNum (newurl, 0, "GET");
}

now I know there is something wrong with the way Im writing that code. any help would be appreciated. thanks

 
I also should have noted that in the following code

on (release) {
newurl = "placeorders.swf&chosenid="& chosenid;
loadMovieNum (newurl, 0, "GET");
}


that the second chosenid in a variable name that is being set in a text field on the second movie.
 
i guess what my real question is as follows.

I have one movie with a whole bunch of variables set to it. How do I only send ONE of those variables to another swf file using the loadmovie command?
 
Ok, sorry i couldn't respond earlier, seems like Tek-Tips is experiencing server problems i was writing this reply and couldn't send it?? Even a new window couldn't display the home page???


The important thing is how you send and receive those variables, the best way for me to figure out what's wrong would be to look at the files (like i said earlier).

If you're able to use variables in the first two actions, howcome you're not in the third one???

I can check and edit your code and send the results by email


Interested???

If you are just click here--->sharky___99@hotmail.com


If not then post all the code from: Flash files and ASP files.


p.s By seeing the way you coded, a more "personal"(based on actual code) version of solution will be given.

It's up to you... Have Fun...

Sharky99 >:):O>
 
Hi, i had to finish some(email received before yours, sorry, first come first serve)

Ok first, did you test all your ASP files??? (without flash)to be sure they return what you want???

I couldn't test them since i don't have access to a server with your <!-- #INCLUDE FILE=&quot;./adoagbios.inc&quot; -->
i don't have this file on my IIS...so i can't check them out.

I'll check out the .fla while i'm waiting for your response.


Have Fun...

Sharky99 >:):O>
 
Hey Sharky, thanks for the reply, Ill get this right yet. I have tested all my ASP files without flash and they return the desired results so I know it has to be something within flash, Ill email you the files that you need to run them. hope this info helps.
 
One more thing, can you send the system.asp file?

By the way, do you really need all in dif. .swf?? You could have use only one .swf. Just a thought...

Have Fun...

Sharky99 >:):O>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top