PDA

View Full Version : Confused: Loading AS 2.0 in AS 3.0



Groady
June 28th, 2007, 11:59 PM
So I'm having trouble loading in AS 2.0 based swf's into a AS 3.0 gallery site I'm building. From what I've read you can't communicate between AS 3.0 and AS 2.0 without using LocalConnection. What's confusing is some swf's I have successfully loaded without the need for LocalConnection so I'm not 100% sure where you need it. I can understand if you needed to pass variables from the AS 3.0 holder to the loaded AS 2.0 swf but I don't as they are all self contained.

I have some banner ads that utilize keyboard input and mouse drags etc. I've found that I'm getting mixed and inconsistent results from loading different files. What's even more weird is I have a fairly complex AS 2.0 game which I've tried loading and loads fine with all keyboard input, custom cursors etc working fine. (This is all without LocalConnection too by the way).

Was wondering if there was any tips and things to check when loading AS 2.0 based swf's into AS 3.0?

senocular
June 29th, 2007, 07:48 AM
"communicate" means passing variables and things like that, not loading or having AS2 movies play. You dont need local connection for that.

Groady
June 29th, 2007, 08:02 AM
Sure, makes sense. So just to clarify I'm not using LocalConnection at all. Simply trying to 'play' pre-existing Actionscript 2.0 based swf's in an Actionscript 3.0 file. They are basically banner ads. Some load fine while others don't. Haven't quite figured out what the ones that don't load are doing to cause them not to work.

Groady
June 29th, 2007, 09:09 AM
Update: So by changing all the paths inside the Actionscript 2.0 file to relative paths rather than absolute I get less problems. In fact the majority of the banner now works with the exception of one bug I'm still trying to figure out.

Groady
June 30th, 2007, 06:39 AM
As mentioned before, the AS 2.0 game loads into the AS 3.0 swf and plays fine... through test movie. I've since discovered it's not capturing keyboard input when it's loaded in a HTML page. This is becoming frustrating.