Home | Careers | IT Counseling | IT Jobs | IT Resources

 

 

 
About Us | Advertise | Feedback | Contact Us | Bookmark this page now|
Have any doubts regarding how to Search IT Training Courses?...Click here for Quick Search Tips Search IT Courses
Have any doubts regarding Keyword Search?...Click here for Quick Search Tips keyword
Have any doubts regarding Institutes Search?...Click here for Quick Search Tips institutes
Have any doubts regarding Specialization Search?...Click here for Quick Search Tips specialization
Have any doubts regarding Fees Search?...Click here for Quick Search Tips fees
to
Have any doubts regarding Duration Search?...Click here for Quick Search Tips duration

IT dart Tips

Which IT course ?

Venture Capital

Online Education

Exams Required for US of A

Overview of Admission Process

Test Preparation

Financial Aid

TOEFEL Examination

Cool Interview Tips

Skill Check

Resume

GRE Examination

GMAT Examination


IT dart News Letter
Get ITdart.com weekly headlines before it's published on our site! Subscribe and receive the articles delivered to your inbox!

Flash 5.0 Tips Working With the New ActionScript

Expert and Normal Mode
The new Actions panel sports a flexible design to fit the needs of coders and designers. For coders comfortable working with script in a freeform environment, the Expert mode displays the Actions panel as a simple word processor. For beginners or Flash 4.0 users who prefer the old interface, Normal mode provides a more rigid environment for scripting.

You can set the Actions panel mode in detail, varying from object to object, or you can set a global preference. Click the Edit menu and select Preferences. The Preferences dialog box appears, and at the bottom of the General tab, you can choose either Normal mode or Expert mode as the Actions panel default.

Color Coding
ActionScript now more closely resembles JavaScript than its Flash 4.0 version, and the added complexity warrants the need for usability improvements. The new color-coding feature in the Actions panel makes it easier to write, read, and troubleshoot scripts.

To turn on the color-coding, open the Actions panel. Click the Reveal menu and select Colored Syntax if it is unchecked. The colors will be displayed in both Normal and Expert modes.

External Script Files
Flash 5.0 responds to the need for more collaboration and workgroup support. Especially frustrating in script-heavy projects, the single-user construction of Flash 4.0 caused bottlenecks when programmers and designers needed to work on the same file. In Flash 5.0, the ActionScript #include directive tackles the problem, letting you store scripts in external text files that are drawn upon during export. Programmers can now edit the script files independently while animators or artists work on the FLA file.

To use an external script file, select the frame or object you want to add the script to, open the Actions panel, and type in the existing script:

#include "filename.as"

Never end the line with the evaluate (;) operator, because it yields an error. You can name your text files anything you like, but .as is the recommended extension and denotes that the file contains ActionScript code.

Learning the New Dot Syntax
Up to version 4.0, Flash used a particular form of notation known as Slash Syntax. Slash Syntax closely resembles the system of notation used in URLs and the Unix or Windows file systems. Flash 5.0 ActionScript ditches Slash Syntax in favor of Dot Syntax, matching the standardized system used in Java and JavaScript.

To come to grips with the new way of writing scripts, here is a sample conversion table:

The Old Way What It Means The New Way
/ The main timeline in the current level _root
ObjectA/:MyVariable A variable attached to a particular timeline ObjectA.MyVariable
GetProperty("ObjectA","Height") Reading the property of an object ObjectA._height
/ObjectA/ObjectB An absolute object path _root.ObjectA.ObjectB
../ObjectA/ObjectB A relative object path _parent.ObjectA.ObjectB
Tell Target("ObjectA")
Play
End Tell Target Invoking Movie Clip methods ObjectA.play()

As you can see, the new language bears little resemblance to previous versions. Once you get the hang of the new system, you'll find that it's more direct and simple to use.


One Click Courses

Advanced Certiflcate in Java Application Development

Advanced Cisco Router Conflguration

Advanced Course in Object Oriented Programming (Coop)

C#

C# with ASP.Net

CAD/ CAM

Certfication in Unix, C, C++ (CUCC)

Certificate in Advanced System Programming

Certificate in Java & E-commerce (CJEC)

EI -Strategiest

Object Oriented Developer and Designer

Specialization in 3D Graphics & Animation

Wap@Asset


Firewalls: What To Block

Windows System Architecture (WSA)

Operating System (OS)

Data Access Technologies

Functional menu-level blocking

Data Access Methodologies

ODBC Architecture

Learn Java from the ground up

Internet Security

The Day I Learnt JavaScript



ITdart Updates:
Computer Security | Computer Services | CRM | Database | E Commerce | Graphic & Design | Internet | Java | Knowledge Management | Linux | Online Marketing | Open Source | Operating System | Robotics | Semi Conductors | Software Downloads | Virus Info | WAP & 3G | Web Development | XML and Metadata
Home | Careers | IT Counseling | IT Jobs | IT Resources

© Copyright 1999-2000 ITdart.com. All rights reserved.
All brands are Trade Marks of Respective owners. Disclaimer    Legal    Privacy Policy