I'm currently trying to call up one swf to another using this method, kindly suggested by Northcode, without any success. I have looked at documentation on it and I've been trying out a tutorial but it's not working for me. I have seen some third party apps that do what I want, but I'd like to understand what's behind it, once the theory is understood I'll probably purchase an swf2exe app.
I've attached the two files created from the tutorial, any help on this would be appreciated.
This is great, once again you switch the light on.
I think I understand what's going on here:
lc = new LocalConnection();
lc.send("simple_lc", "methodName", send_txt.text);
It's like MSN,
but what if I wanted it to bring up an entire swf, would I use something other than "send_txt.text"?
I've tried a couple of things but they don't seem to work.
Also I see that in order for this to function it has to have both the sending swf and receiving swf in the same movie, otherwise it won't work.
Is that right?
I've managed to call it up in a mc_holder in the same movie.
But cant seem to get the second movie to load into it, only the speech.
Keep the SWF you want to load external to the sender and receiver but in a place where they can both access it. Then just send the name of the SWF via the local connection and have the receiver load the SWF that the sender tells it to. Will that work for what you're trying to do?
by "external" do you mean not loaded in the sender?
If you look at the attached zip in my last post, I have not loaded the
picture swf into the senders mc_holder, only the receiver loads in.
Parent Movie ------ mc_holder------receiver loads into parent movie, into holder
Picture movie ---- should only load when called through the picture button
in this instance it is external or not with-in the Parent Movie
or do you mean
in a another folder external from the loaded receiver?
If the receiver SWF contains all the movie clips you want to load and the sender just sends a trigger (the name of the asset to load) then that will work but you can't send a movie clip or a SWF to another SWF via LocalConnection (as far as I know).
Effectively what I want to do can't be done through LC.
Calling swfs up through a button.
But
If I some-how include all the movie clips into the receiver
and then use buttons from the receiver to call up those movies it should work.
How would I include multiple movies in the one receiver swf with-out having them on the stage? Would I put them at intervals along a timeline?
If so the triggers would need a path to link to?
It can be done, you just need to wrap your head around the possible solutions instead of the "perfect" solution you'd like to use Flash doesn't give you a way to transfer a movie clip from one running SWF to another so need to find a solution that Flash will let you get away with. There are two that I can think of... (1) you can import the SWFs to your library as movie clips OR (2) you can leave them on disk and load them by name. Either way the receiver is doing all the heavy lifting and the sender is just telling it which asset you'd like it to load and where it should find it. With the first solution the receiver has to have all the SWFs inside it (can make for a heavy SWF). With the second solution you don't need to modify your receiver every time you want/have to change one of the SWFs that needs to be loaded.