开发者

Send a movieclip from as3(parent) to as2 in flash

I have a as3 movie which loads an as2 in it.

I create a movieclip in as3 and i want to pass this created movieclip to as2.

There are some problems:

1 - How to send it from as3 to as2?

2 - How to create a movieclip in as2 with this received data? ( the loadMo开发者_开发问答vie function has just a url parameter, not data )


As3 runtime cann't operate with code in as2 swfs because they are executed in different AVM runtimes (http://help.adobe.com/en_US/as3/learn/WS5b3ccc516d4fbf351e63e3d118a9b90204-8000.html). No way to pass display object.

However I think it is possible to pass raw data via:

  • LocalConnection (sample http://gskinner.com/blog/archives/2007/07/swfbridge_easie.html);
  • usign specific url while loading swfs. For example, as3.swf loads as2.swf?param=paramValue. Then try to read _root._url


the only way i know is to try using LocalConnection, however i'm not sure you can pass a DisplayObject through it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜