Director vs. Flash

For those who have programmed in Lingo before but never ActionScript, you may ask, "What is the difference? Which one is better?" This section will present differences and similarities in both programs. Previous programming experience is helpful, as ActionScript 3.0 is more similar to Java. Most of the information on this page are parsed from the sites listed in the Resources section, as well as my own experience.

Function

Director was created in 1988 for authoring 2D and 3D multimedia applications for CDs. With the growing popularity of the Internet in the mid to late 90's, Flash was designed to create web content and applications that were lighter and faster than Director applications, and as a result, is better suited for mass distribution. We associate Flash today with internet ads, animations, movies, and games.

However, Director is still strong when it comes to creating larger applications and projects. Its native 3D rendering and animating capabilities, as well as joystick and stylus support, make it a better choice for non-web applications. It is ultimately up to you to decide which application will better suit your project.

Code

Lingo and AS3 are both scripting languages, which means that they are used to control software applications. The main difference between AS3 and Lingo is that AS3 is more like Java/Javascript/C++ in syntax, so it is more intuitive for those already familiar with object-oriented programming languages. In Flash CS3, unlike Lingo in Director, ActionScript code cannot be placed anywhere - only in frames, while in Director, a Lingo script can be attached to sprites, cast members, or frames.

Here are some basic code differences between Lingo and AS3. There are many more differences and complexities to code, which can be discovered through learning and research. These can be also found in the links in the Resources section.

Lingo:
AS3:
Variables
global scoreNum
scoreNum = 0
var scoreNum:Number = 0;
Comments
--comment
//comment
Message/Output
put scoreNum
trace(scoreNum);
Comparisons
if a = 5 then
-- code
end if
if (a == 5) then {
// code
}
Incrementers
a = a + 1
a++;
Loops
repeat with i = 1 to 10
-- do something
end repeat
for (var i = 1; i <= 10; i++) {
// do something
}
Handlers/Functions
on mouseUp
someFunction
end
addEventListener(MouseEvent.MOUSE_UP, someFunction);
function someFunction(e:MouseEvent):void {
// definition
}
Strings
stringVar = "a" & "b"
var stringVar:String = "a" + "b";
Sprite locations
sprite("red").locH
sprite("red").locV
red.x;
red.y;
Moveable sprite
sprite("a").moveable = true
a.startDrag();
a.stopDrag();
Collision detection
Lingo:
sprite("a").intersects someSprite
AS3:
a.hitTestPoint(someSprite.x, someSprite.y);
or
a.hitTestObject(someSprite);