Shockwave Flash/as2 and 3
Expert: Vishal Arora - 10/31/2008
QuestionQUESTION: hi. i am trying to impliment and avatar service into a flash cs4 file using AS3. is this even possible.?
can flash cs4 handle both AS2 and 3 in one file? or if not, do you have any suggesstions in how i might go about using AS2 and 3 together.
thanks
ANSWER: It depends on the service and how you're interacting with it. In general, it should be possible. But the specifics of the service's API will determine if it is or not (and how economical it is).
You can't mix ActionScript 2 with ActionScript 3. If there is a SWF created with AS2, you can certainly import it into AS3 though. But, you can't actually mix the code.
---------- FOLLOW-UP ----------
QUESTION: thanks for getting back to me quickly.
so what i am understanding is that i can make my AS2 files that have my avatar ( that works with AS2), save these files, and take the swfs and import them into my "main" flash CS4 file using AS3?.. right?
AnswerThat's correct. That's exactly what you'll have to do. In fact, it doesn't really matter what version of ActionScript the avatar uses. When you import something, you're not importing ActionScript, you're importing the SWF file.
So, you can import a SWF coded in any language using AS3, but your code will all have to be AS3.