-
I have searched and searched but to no avail.
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 ?
-
Do you want to go from one movie to another, passing a variable to the second when it loads, or pass a variable from one active movie to another active movie?
-
per MusicMan
Razor;
I'm HUMBLY submitting a response. I know from reading your posts that you're very knowledgeable, but I'm hoping I can help.
MusicMan helped me with this same issue before, and here's what I ended up with. I was sending from an HTML page, a topical index that linked to specific frames in my distance learning app. The tag looked like this:
<A HREF="../module03/final/module03.html?myLesson=m03_l05.swf&myFrame=7">
On the HTML page that had the swf embedded, I had to change the object tag as follows:
<script LANGUAGE="JavaScript">
<!--
document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" ID=module03 WIDTH=800 HEIGHT=475> <PARAM NAME=movie VALUE="module03.swf'+location.search+'"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#CCCC99> <EMBED src="module03.swf'+location.search+'" quality=high bgcolor=#CCCC99 WIDTH=800 HEIGHT=475 swLiveConnect=true NAME=module03 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED></OBJECT>');
//--></script>
I really hope this helps.
--Rissa
-
I'mFine, Stickman
thats helpful in a way but what I need to do is basically this:
I have a movie ast in a normal html page. it uses a geturl to load another html page which contains a completely different flash movie. the problem I want is that there is a vertical scroller on this second movie that has the following code:
Code:
onclipevent (load){
_root.newposition = 300;
}
what I want is something along the lines of
Code:
onclipevent(load){
if (passedvar == "true"_{
_root.newposition = 0;
}else {
_root.newposition = 300;
}
basically, the movieclip is set to a different position depending on a variable passed to it. So if we came from url a for example, the start position of the mc would be 300 whereas if we came from url b, the start pos of the mc would be 0.
I'm not sure of how to go about this. i will try i'fines example but using a geturl instead of a html anchor.
cheers for the replies anyway?
you got any ideas stickman
[small]you whore!!![/j]
:):):):):):):):):):)
Bruce
-
getURL
yeh, that's what I was thinkin', use getURL in place of the HTML tag. You should still be able to pass the variable(s) that way. Then the documentwrite bit should catch the variable(s) so your next movie can use it.
If Musicman is around today, I expect you'll get some better insight. W? You here?
--Rissa
-
From the sound of it, the URL encoding with getURL should be exactly what you need. Just append the value to the URL of the file, for example:
Code:
getURL("myfile.swf?menuPos=300")