?
Solved

Blending AS1 & AS2

Posted on 2006-11-13
2
Medium Priority
?
339 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
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 record live broadcast.
Suggested Courses

770 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