Skip to main content
December 27, 2007
Question

Communicating between 2.0 and 3.0

  • December 27, 2007
  • 5 replies
  • 375 views
I have a large project that had been developed in 2.0 and a feature that is better in 3.0, saving a jpeg, is needed. I have the 2.0 swf which has the movieclip in it I want to save. The 3.0 document is being loaded on level and I want the 3.0 document to get the bitMapData from the 2.0 document and save the jpeg.

So far I'm just trying to use LocalConnection and get the 3.0 to execute the function. I can't get that to work. I'm just passing a string of text first but then I'll pass the bitmap data, later.

This topic has been closed for replies.

5 replies

kglad
Community Expert
Community Expert
December 28, 2007
i don't think you can execute any as3 code. just place a trace("HI") in your as3 file and see if you can get it to execute after being loaded by an as2 file.
December 27, 2007
that is definitely not an option.

i'm almost finished with using the local connection. my problem is sending the bitmapdata through the localconnection. i'm not sure how to do it yet. what's the code to capture the bitmap data and pass it as a variable so in the 3.0 i can just do this:

mycode.draw(passedData);

kglad
Community Expert
Community Expert
December 27, 2007
convert the as2 code to as3 or use as2 methods to save the jpeg.
December 27, 2007
so what is your suggestion about how to take a complete site that is 2.0 and give them the option to save a jpeg which is done in 3.0?
kglad
Community Expert
Community Expert
December 27, 2007
as 3 won't execute when loaded by an as2 file.