[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Blending AS1 & AS2

Posted on 2006-11-13
2
Medium Priority
?
343 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 1000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
Suggested Courses
Course of the Month19 days, 23 hours left to enroll

873 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