Solved

Blending AS1 & AS2

Posted on 2006-11-13
2
334 Views
Last Modified: 2008-02-20
I maintain a Flash-based app comprised of a fairly large number of individual swfs. In a nutshell it flows from a login management branch to a menu generation branch and finally hundreds of different content movies at the bottom.

Eventually I'll be dragging everything to AS2 but that bottom layer is going to take quite awhile...in fact, it'll probably be better suited to wait long enough for player adoption and go straight to AS3. In the meantime i have a number to needs driving an attempt to get the Login & Menuing systems updated to AS2 asap.

I understand I can't blend as1 & as2 in the same movie but it seems like i should be able to count on using popups to segregate the clips enough to create a stable, blended app. So that the Menu (running under AS2) fires the AS1 Content clips into a seperate popup. The complication will be that the content clips expect some values to be found in the Global and specific layers space.

Again, I'm sure a workaround is feasible - & that i'm not the first to face this need. Looking for an overview and others' experiences.

0
Comment
Question by:juststeve
  • 2
2 Comments
 
LVL 5

Accepted Solution

by:
blockage1 earned 250 total points
ID: 17969736
To a certain extent you can blend AS1 and AS2 without any problems - even when set your publish settings to AS2 you'll find that most AS1 still works (I'm not aware of any that wont).

If you use AS2 classes, then all code inside the classes must be AS2. In your main movie you can import AS2 classes and use them along with any AS1.

The only realy problem with having a mixure of AS1 and AS2 is that you'll lose some of the advantages of AS2 - things like typed variables are very useful but less so if they're not used everywhere.

If your targeting older versions of the player you still need to watch out for specfic features, e.g. if you're targeting the v6 plugin you can't use getNextHighestDepth() with either AS1 or AS2 as it didn't come in until v7.

It's also worth noting that AS2 and AS1 compile to the same code - it's only with AS3 that thing get more complicated.
0
 
LVL 5

Expert Comment

by:blockage1
ID: 17970243
Something on another forum just reminded me of one bit of AS1 that wont compile as AS2 - the slash notation. In AS1 you could do stuff like

/:myVar

In AS this has to be changed to...

_level0.myVar
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question