I’ve been trying for the past 2 days to pass variables
between two swf files. I can now use a LocalConnection to do this
if I simply link the two swfs, but not when I try to embed one swf
in the other. The code below works if I comment out the following
line and place the localConnection.send method immediately below it
(as long as the second swf is already running).
conn.send("myConnection", "lcHandler", parameters.loginID);
However, if I switch the comments,
//conn.send("myConnection", "lcHandler", parameters.loginID);
the second swf loads into the first swf, but I get errors as
soon as I try to interact with any of the menus/ buttons in the
embedded swf. Here’s the error message:
TypeError: Error #1009: Cannot access a property or method of
a null object reference.
I think that the components have not loaded fully in the swf
but don’t know how to test this or write an appropriate event
handler. Below is my full code in the main file.