Skip to main content
Inspiring
October 22, 2008
Question

Embed AS3 swf into a AS2 FLA?

  • October 22, 2008
  • 11 replies
  • 1327 views
HI, I have a flash site designed in AS2 and want to embed a AS3 video player in it. If I republish the AS2 site to AS3 the website doesnt function, and if I load the AS3 swf into the website, the Player doesnt function.

I need the AS2 functionality on the website and I need the advanced AS3 functionality on the video Player.

Is there any way to get these two guys to talk to each other?
This topic has been closed for replies.

11 replies

kglad
Community Expert
Community Expert
October 30, 2008
that's quite a bit more complex than you need, but it does load a swf.
lam08Author
Inspiring
October 30, 2008
kglad
Community Expert
Community Expert
October 30, 2008
use the flash help files. check the loader class. there will be an example showing how to use it to load another swf.
lam08Author
Inspiring
October 30, 2008
Although Im sure what youve written is completely accurate - but as a new person to flash I just dont understand it.

Do your or anyone else reading this know of a link to a webpage I can be directed to that will explain this at all?
kglad
Community Expert
Community Expert
October 30, 2008
there's not much to explain. create an as3 file, us a loader instance to load your as2 file and go from there.

if you want the button that loads the as3 video to be in the as2 file, you'll need to use the localconnection class to direct the loading as3 file to load the video, but if you can accept a button in the loading as3 file to load the video, you don't need to use the localconnection class.
lam08Author
Inspiring
October 30, 2008
Could you explain what you mean? Obviously if its not a hassle, then I want to use it...
kglad
Community Expert
Community Expert
October 30, 2008
you can't do that.

and i don't see any difference updating using an as3 loader and not using a loader.
lam08Author
Inspiring
October 30, 2008
Creating a 3rd fla, to load the AS2 Fla and the AS3 FLA just aint gonna fly. This website is updated daily and its just too much of a maintenance nightmare.

However, I do want to use Wabbits suggestion but I dont know how to create a web object.

The GetURL function opens the swf on its own, which I dont want to do. I want it to open the AS3 SWF in a small window within the page.

Can someone help please? Thanks in advance,
kglad
Community Expert
Community Expert
October 30, 2008
the answer to your original question is no.

but you could create an as3 swf that loads your as2 swf and your as3 video player.

or you could, similar to wabbit's suggestion, use getURL() to load an html page that embeds your as3 video player.
lam08Author
Inspiring
October 30, 2008
.... anyone know how to create a web object? Been playing around with this for days now......