0% found this document useful (0 votes)
39 views6 pages

Reviewer For Computer 9th

Uploaded by

Mark Palomar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views6 pages

Reviewer For Computer 9th

Uploaded by

Mark Palomar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

UNIVERSITY OF SAINT ANTHONY

( Dr. Santiago G. Ortega Memorial)


City of Iriga

REVIEWER
FOR EVERY
SUBJECT (COMPUTER)

This is only suitable for the 9th monthly exam. I am qualifying this
reviewer to be used by others, but copying this piece without my
approval is not permitted. The shown information is from the book and
PowerPoint. I sincerely apologize if there is any typographical mistake
within the encoded details.
LESSON 12: GETTING STARTED WITH
REVIEWER ACTIONSCRIPT 3.0

ActionScript 3.0 (AS3) - scripting or programming language used


to create interactivity and object movement in Flash.
a) interactivity
b) playback control
c) data display
ActionScript - an object-oriented programming language. It tells
the Flash movie, even web browser or computer, what to do. But
for the most part, they only control what's inside the Flash movie.
Object-oriented programming (OOP) - type of programming that
focuses on "objects" rather than the logical construct of actions as
with the structured programming.
Shortcut Key F9 - shortcut to display action script panel.
Actions Panel - where you place lines of codes in order to add
interactivity to the animation.
ActionScripts - lines of code is referred to in Flash.
JavaScript - programming language that adds functionality to
webpages.
ActionScript Uses:
1. ) Menu Organizers
2. ) Movie Clip Players
3. ) Variable Checkers
Computer programming - process of writing code to facilitate
specific actions in a computer, application or software program,
and instructs them on how to perform.
Examples of OOP Programming Languages:
1. ) Ada 19.) R
2. ) ActionScript 20.) Raku
3. ) C++ 21.) Ruby
4. ) Common Lisp 22.) Scala
5. ) C# 23.) SIMSCRIPT
6. ) Dart Eiffel 24.) Simula
7. ) Fortran 2003 25.) Smalltalk
8. ) Haxe 26.) Swift
9. ) Java 27.) Vala
1
10.) JavaScript 28.) Visual Basic.NET
11.) Kotlin
12.) logo
13.) MATLAB
14.) Objective-C
15.) Object Pascal
16.) Perl
17.) PHP
18.) Phyton

Basic Terms in AS3


1.) Class - code that defines an object.


2.) Object - an instance of a class.
3.) Variable - name that represents a value.
4.) Method - an action that can be performed by an object.
5.) Function - refers to a block of codes that can be reused in your
program.
6.) Event - an occurrence in a Flash movie that ActionScript is aware
of and responds to accordingly.

Script Assist - in the authoring environment, it can simplify the


coding process.
Variables - spaces are not allowed in variable names. It is
recommended to start the name with a lowercase letter and then
use uppercase letters for succeeding words. A variable name can
only contain alpha-numeric characters and underscores.
a) userName
b) timeOfDay
2
Data Types - indicates the range of valid values a variable is
capable of storing. Allowable values are integers & strings.
Conditionals - statement that carries out commands depending
on certain conditions.
Example:
if ( checkNumber == 7 ) {
stop ();
} else {
play ();

Loop - permits a set of instructions to be repeated until a


condition is reached.
Five looping constructs that are possible in repeating actions for
the creation of instructions in Flash:
1. ) for
2. ) for in
3. ) each
4. ) while
5. ) do-while

Five Looping Constructs


1.) For loop - instructs flash to repeat actions for a specific number of
times.

2.) For in loop - iterates through the properties of an object.

3.) Each in loop - bit similar to the for in loop but unlike the for in
loop, the iterator variable in for each in loop contains the value held
by the property instead of the name of the property.

4.) While loop - will continue to perform the defined action until the
condition no longer holds.

5.) Do-while loop - similar to the while loop but the main difference is
that the do-while loop will perform at least one iteration, then it will
evaluate if the condition still holds.

importflash.display.MovieClip() - imports the code necessary for


the Movie Clip class.
not_set_yet.stop() - stop action itself. The code is not yet set &
indicates that you need to finish the code and this where the
Script Assist comes in.
Event handling - specify certain actions that should be perfor
3
med in response to particular events.

Three Elements of Event Handling


1.) Event source - which object will start the event? For example,
which button will be clicked?

2.) Event - what is going to happen, what interaction do you want to


respond to? identifying the event is important because an object can
start and listen to several events.

3.) Response - what actions do you want to performed when the


event happens?

Event listener - program to know which events are important.


This program is executed by Flash Player in response to specific
events.

Two Processes of Adding Event Listener


1.) Listener function - creating a function or class method for the


Flash Player to execute a response to the event.

2.) addEventListener() - method used to connect the listener function


with the target of the event. It tells Flash what object to listen to,
what event to listen for, and what function to execute in response.

Code snippets - can add a code to your Flash file to enable


common functionalities.
Code Snippets Panel - by accessing this panel, you can use
ActionScript very quickly without knowledge of programming.

Code Snippets

1.) Drag & drop - users can drag the symbol around the Stage.
2.) Move with keyboard arrows - users can move the symbol with the
keyboard arrows.
3.) Click to go frame & stop - playhead will move to a specific frame &
then stop when users click the symbol.
4.) Click to play/stop around - sound will play when users click the
symbol.

Additional Info:
1. ) By learning AS3.0 & Creativity, you can do more with your Flash
documents.
2. ) Most programmers will notice ActionScripts similarity to Jav
4
aScript.
3.) Integers (positive and negative whole numbers), floating
number (numbers with decimal values or fractional parts), and
strings (alphanumeric data) are the only allowable values.
4.) You do not have to be a programmer to take advantage of AS3.
5.) Each time you selected a movie clip, the Properties panel
showed characteristics you can change, such as width.
6.) You can also make color adjustments such as changing the alpha
transparency.
7.) Modifying a movie clip symbol in the Flash authoring
environment can also be done in ActionScript.
8.) In ActionScript, you use the methods of the Movie Clip class to
manipulate or change the properties of your movie clip.
9.) In the Script Assist mode, you can add ActionScript to your Flash
document without the code yourself.
10.) Syntax or grammar of ActionScript will not be a problem in
Script Assist.
11.) Classes are organized into packages.
12.) If you want to add stop() action to a movie clip, you must locate
the Movie Clip class.
13.) Movie clip call - part of the Flash Display package.
14.) The completed script for the stop method will appear in the
script pane. This code will cause your movie to stop playing at the
end of the movie.
15.) Insert a target path button - display the dialog box.
16.) Pressing F9 will open the Actions panel.
17.) Clicking the Object field in the parameters area of the Actions
panel will enable the Target Path button.
18.) The keyword Void indicated that this function does not return a
value.
19.) Flash Help has all the information on the other code snippets.

You might also like