Introduction to Alice - Teaching Multimedia

Introduction to Alice - Teaching Multimedia

ActionScript: Classes, Properties, EventHandler Methods, Datatypes & Control Structures MMP 220 Multimedia Programming This material was prepared for students in MMP220 Multimedia Programming as as part of a curriculum redesign project funded by National Science Foundation grant #0511209 Co PIs Christopher Stein and Jody Culkin BMCC CUNY http://teachingmultimedia.net

Interface of Flash ActionScript Window Concepts we learned in Alice and will be using in ActionScript: Classes Properties

Event handler methods Control Structures Datatypes Classes A class is a blueprint for an object. When you create an object of a particular class, you are creating an instance of that class. Example in ActionScript: MovieClip class

Properties Properties are attributes of an object. Each object has specific properties that have to do with the nature of the class of which it is an instance. Properties of the MovieClip class include _alpha (opacity), _width, _x (horizontal position), _y (vertical position).

Event Handler Methods: Event Handler Methods are specially named methods that can be used with certain objects when the corresponding event occurs. example: circle_mc.onRelease function():Void{ circle_mc._x += 10; } Control Structures

control the flow of code execution. If statements, while, and for loops are examples in ActionScript. example: if(circle_mc._alpha > 0){ circle_mc._ alpha -= 2; } Datatypes datatypes refer to what type of values various types of data might hold. In ActionScript, there are primitive datatypes and reference

datatypes. Primitive datatypes include number, string, boolean. Reference datatypes include all objects, such as MovieClips. Alice/ActionScript Alice Examples ActionScript Examples

Classes Penguin, Bunny, IceSkater MovieClip, TextField, Button, Math Properties color, opacity,

isShowing _xScale, _y, _visible, _alpha Event Handler Methods When Enter is typed, do Cow.walk times=1 speed=2

square_mc.onEnterFrame=function():Void{ square_mc._x+=10; } Control Structures if/then, do in order, while

if, while, for loop Datatypes Object, Number, String Object, Number, String

Assignment Read Chapters 2 and 3 of the Flash ActionScript Bible Make a movie in Flash where you click something and something happens- using ActionScript. You can change properties, such as _x and _y, change size and opacity.

Recently Viewed Presentations

  • 计算科学思想 (4) - Sjtu

    计算科学思想 (4) - Sjtu

    人工智能的历史和启示: 人机对弈作为案例 赵 海 [email protected]
  • Epicardial Ablation: be arrhythmia free Another route to

    Epicardial Ablation: be arrhythmia free Another route to

    B, Right anterior oblique view of left coronary angiography shortly after onset of hemodynamic collapse and ventricular fibrillation. There is profound spasm (arrows) involving diffusely the left main (LM), left anterior descending artery (LAD), and circumflex (LCx) arteries with no...
  • Intelligent Rooms Perceptual User Interfaces Smart Rooms ...

    Intelligent Rooms Perceptual User Interfaces Smart Rooms ...

    Multimodale Räume "Smart Rooms" "Intelligent Environments" Seminar SS 03 User Interfaces In the beginning: Wimpy Computing Windows, Icons, Menus, Pointing 2nd Generation:Human-Machine Interaction "Perceptual" User Interfaces Perceptive human-like perceptual capabilities (what is the user saying, who is the user, where...
  • d3jc3ahdjad7x7.cloudfront.net

    d3jc3ahdjad7x7.cloudfront.net

    He then gets tired and asks to sleep but the King and Queen urge him to keep going asking if he's met any of the Greeks that fell in Troy in Hades. He talks about his encounters there. He met...
  • Course Outlining & Midterm Preparation JESSICA L. WEST

    Course Outlining & Midterm Preparation JESSICA L. WEST

    Continuing the conversation about law school success strategies, this workshop will focus on strategies for achieving and maintaining balance and wellness in the midst of a law school environment. This workshop is for all (1L, graduate, MJ, and upper-level JD)...
  • Ocean Currents, Waves, and Tides

    Ocean Currents, Waves, and Tides

    South Equatorial currents. Peru Current, KuroshioCurrent. Gulf Stream. Ocean Waves. ... What are waves? Constant up and down movement of ocean water . Crest- The highest point of a wave. Trough - The lowest point between two crests. Wave height...
  • Question words AKA PALABRAS INTERROGATIVAS

    Question words AKA PALABRAS INTERROGATIVAS

    Question words AKA PALABRAS INTERROGATIVAS Palabras interrogativas As you know already, there are many different ways to ask questions. In Spanish (just like in English) you use a rising intonation to imply a question.
  • Forex System Development Workshop How I doubled my

    Forex System Development Workshop How I doubled my

    FX Renew is not liable for any loss or damage, including without limitation, any loss of profit, which may arise directly or indirectly from the use of or reliance on such information. ... Draw up major horizontal levels of Support...