Solved

Blending AS1 & AS2

Posted on 2006-11-13
2
337 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 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
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 how to record live broadcast.
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.

749 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