[swfmill] Accessing frames in AS3
Trevor Burton
trevor.burton at virtuefusion.com
Mon Nov 12 23:39:39 PST 2007
LocalConnection is very easy to set up and utilise. It can be quite slow if you use it heavily - and you wouldn't be able to send an image over it as such.... it's more like an rpc setup.... You declare a LocalConnection with the same name in both of the swfs and then call the connection and pass the name of the function you'd like to call on the other swf and pass the parameters along with it.
The data size limit is documented somewhere - it's reasonably well-known.
Something that isn't documented about it (as far as i know) is an issue with multiple browser windows. The LocalConnection will only work in the first browser window that's opened containing your swfs. So if you open a browser window to test your swfs you'll seei t working, if you then open another browser window it won't be working. This can cause confusing when you're testing - you open it in IE and it works, you open it in FireFox and it doesn't work.... i remember having great fun trying to explain this to a client who was adamant it didn't work in FireFox, but was caused by this 'Security Feature'
T
-------------------------
Trevor Burton
Flash Developer
VirtueFusion
14-16 Betterton Street
London, WC2H 9AH
t: 0207 420 6420
m: 07954 239 024
________________________________
From: swfmill-bounces at osflash.org on behalf of Joel Poloney
Sent: Tue 13/11/2007 04:37
To: swfmill at osflash.org
Subject: Re: [swfmill] Accessing frames in AS3
That's interesting that Adobe doesn't formerly announce a data size limit like that. Is that a data size limit per transaction? What would happen if I tried to send an image over the LocalConnection? would this fail if the image was larger than 32k?
I would be loading arbitrary AVM1 swfs in the following manner (from the first post in this thread):
I've been trying to use swfmill to generate a movie in which I can access the specific frames (eg: gotoAndStop(2) for frame 2) in AS3. But, I haven't been successful yet. Is this possible? For example, I want to create a movie with 10 frames, and on each frame there's an image, text, etc.
I already have existing swf files (more than I would be willing to manually add code to) and I am looking to make this process automated. So, the wrapper idea would be favorable. Actually, being able to compile into AVM2 would be most favorable... but this LocalConnection wrapper/hack works too I suppose :)
On Nov 12, 2007 8:03 PM, Hudson Ansley <hudsonansley at gmail.com> wrote:
the data size limit was from experience, not sure of the exact number.
Are you loading arbitrary AVM1 swfs or could you recompile them with
some added code?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 6002 bytes
Desc: not available
Url : http://osflash.org/pipermail/swfmill_osflash.org/attachments/20071113/046e5a39/attachment.bin
More information about the swfmill
mailing list