all groups > flash actionscript > july 2007 >
You're in the

flash actionscript

group:

Load SWF B from SWF A - pass values


Load SWF B from SWF A - pass values drzeller
7/30/2007 6:21:17 PM
flash actionscript: I am modifying a template that loads SWF B from within SWF A using:
loadMovieNum("B.swf", 1);

I want re-use SWF B in multiple places and leverage a variable, call it
myValue, within SWF B that is sent from SWF A.

What is the best way to accomplish this? I cannot figure out how to pass (and
use) the value.

Thank you,
D.

Re: Load SWF B from SWF A - pass values kglad
7/30/2007 6:59:49 PM
Re: Load SWF B from SWF A - pass values drzeller
7/30/2007 7:20:04 PM
I've been playing with a dozen different ways - GET, POST, localconnections, etc. This is exactly what I thought I should be able to do. Thank you very much.

Re: Load SWF B from SWF A - pass values kglad
7/30/2007 7:48:09 PM
Re: Load SWF B from SWF A - pass values drzeller
7/30/2007 8:02:01 PM
Drats! It works on the first call, but on subsequent calls, it retains the
value it got the first time.

I have trace's the value, and just before the second call, passVal has the
correct value. Here is the sequence of events:


Click button for gallery1 in SWFA
set value of passVal to 01
open SWFB
set localVal=_level0.passVal
SWFB gets _level0.passVal correctly
Click on button for gallery2 in SWFA
set value of passVal to 02
open SWFB
set localVal=_level0.passVal
SWFB still has 01 as value for passVal and localVal

Any ideas?

Re: Load SWF B from SWF A - pass values kglad
7/30/2007 8:15:28 PM
AddThis Social Bookmark Button