This content has been marked as final. Show 7 replies
I don't think I've ever heard of loading as3 into an as2 project. I don't think its possible.
It is possible to do it the other way around. But the loaded as2 swf cannot communicate with its parent as3 swf directly. I believe you need to use the LocalConnection with in each swf.
I've not done it... others who have may know more may be able to offer more detailed advice (or correct mine if its wrong)
you can load an as3 swf into an as2 swf, but the as3 actionscript won't execute.
kglad: great to know (and you made me pleased that I included a disclaimer above ;-) ) . I realise your answer is factual (i.e. you are stating that is is possible) and doesn't necessarily reflect what you would choose to do... but could you ever conceive of a good reason to do that? I guess it could arise out of need with assets coming from different sources. I can only think of it as a potential solution to a problem, but I can't think of a good reason for choosing to do it by design.
Marco: I think kglad's answer basically gives you a "no". Because without actionscript 3 in an as3 swf, you don't have the 'power' you were talking about even in you can load it into an as2 container.
you wouldn't mix as2 and as3 swfs unless you had no other choice or the alternative (converting as2 to as3 or vice-versa) is more work than it's worth. and you certainly wouldn't do that by design: there are no advantages to mixing and plenty of substantial disadvantages.
> you wouldn't mix as2 and as3 swfs unless you had no other choice or the
> alternative (converting as2 to as3 or vice-versa) is more work than it's worth.
> and you certainly wouldn't do that by design: there are no advantages to
> mixing and plenty of substantial disadvantages.
My advantage would be that I use AS2 for a longer time and I'am used to
combine scripts and movieclips. But AS3 often runs faster. On the other
hand it usually has more declarations and is more orientated to only use
classes. As I mentioned AS2: simple, AS3: faster, object orientated. I
wouldn't describe it as 'no advantages'.
If your case is only that, "AS2:simple", than you are fighting a loosing battle here. There are so many disadvantages to mixing the two together, that "simple" is not strong enough to support the cause. If AS2 is so simple for you, you should really have no problem swing over to AS3. This is not a case of peanut butter and jelly, it's more like mayonnaise on chinese food. The two just don't mix.
> If your case is only that, "AS2:simple", than you are fighting a loosing battle
> here. There are so many disadvantages to mixing the two together, that
> "simple" is not strong enough to support the cause. If AS2 is so simple for
> you, you should really have no problem swing over to AS3. This is not a case
> of peanut butter and jelly, it's more like mayonnaise on chinese food. The two
> just don't mix.
Jeylly, penaut butter, chinese food, WHAT? Come on, do you thing this is
a question of taste here?
It is just about calling functions from AS2 that are defined in AS2 (as
public), thats all nothing more. I don't see your point here. Is it that
you just want to tell me that it is not possible? If it isn't working
thats ok. But you might get the point that the property names changes a
lot from AS2 to AS3 and you have to program most of things in classes.
And yes it is a good thing to learn AS3 but you have to program in a
compete different way. No more scripts attached to movie clips directly
but scripts that you have to program yourself the scripts on these
movieclips. Of course I can but I was looking for a way to use a step
between. No jelly, no peanut butter and no mayonnaise at all.
Thats all ok if it does not work, but no discussion about cars, food or
anything else but scripting and programming language. Please.