Popular in Course
Popular in Education
This 3 page Class Notes was uploaded by Yvette Abbott Sr. on Friday October 30, 2015. The Class Notes belongs to IT 621 at SUNY Potsdam taught by Staff in Fall. Since its upload, it has received 28 views. For similar materials see /class/232394/it-621-suny-potsdam in Education at SUNY Potsdam.
Reviews for AUTH
Report this Material
What is Karma?
Karma is the currency of StudySoup.
You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!
Date Created: 10/30/15
Flash 8 ActionScript Chapter 1 Introduction to Actionscript 20 Training from the Source 0 What is actionscript O Actionscript syntax and terms 0 Events 7 something occurrs clicking mouse every script is triggered by an event 0 Actions 7 any line of script that instructs ash to do something setting a variable 0 Operators gt lt ampamp etc assigning a value to a variable 0 Keywords 7 words that have speci c purposes in actionscript they are reserved cannot be used for anything other than their intended purpose if else break var etc 0 Data 7 this gets updated created or used during dynamic scripts ie a variable MVariables are case sensitive in actionscript O Curly Braces 7 usually holds actions that will be triggered and executed O Semicolons 7 seperate actions in a script 0 Dot Syntax 7 used in a couple of different ways 0 denote the target path 0 invoke a method of an object 0 change the properties of an object ie wheelimcgrotation 45 Parenthesis 7 parenthesis are used to set up values for a function 0 Quotation Marks 7 used to denote textual data called a string the only way for ash to know differentiate between data and actual text is to use a string 0 Comments 7 ash ignores comments ie or ltcontentgt O Indenting amp Spacing 7 good habit to get into when developing with ActionScript Actions Panel 0 what is the actions panel 0 simply allows you to add and edit actonscript to your FLA and relects the code of what is selected ie a keyframe or an object on the stage 0 practice using the actions panel 0 Actions Panel Parts 0 script pane 7 allows you to edit the actionscript toolbar 7 become familiar with all the toolbar buttons actions panel menu 7 become familiar with the options in the menu toolbox 7 where ash keeps all ofthe classes that you can use to develop script navigator 7 a quick and easy way to View all the scripts that are in your FLA more efficient because you dont need to hunt for your actionscript Creating Varlables 0 what are variables 0 Variable syntax 0 var ltVariable namegt lttypegt ltValuegt O Strict Data Typing 0 what is strict data typing 0 What data types can be used ActionScript Code Placement O ActionScript can be placed in all of the following locations in a FLA le 0 Keyframes cannot be placed on unpopulated frames or regular frames 0 Button Symbols code must sit within a button event handler O onrelease code 0 button events include 0 onrollover O onrollout O 0nrelease O MovieClip Symbols actionscript can be added to a movieclips timeline keyframes actionscript can be added directly to a movieclip instance actionscript that is added to a movieclip instance must go within a clip event handler ie load enterFrame mouseDown mouseUp onClipEventmouseDown code Best ActionScript Practices 0 what is a best practice in terms of actionscript 0 An idea or procedure that is generally accepted as a good way to approach a certain task 0 Best Practice 1 O No code should ever be placed directly onto a button or movieclip instance 0 Best Practice 2 O Actionscript should always be placed on its own layer The layer should then be named actions Ob ects and Classes 0 Just an introductory overview 0 what is an ojbect 0 an object is a container 0 when a new object is created it is an empty container 0 a variable that lives in an object is a property of that object O a function that lives in an object is a method of that object O a function is a group of code which is given a specific task and a name 0 a Class is a blueprint for a custom object 0 ash has a lot of builtin classes movieclip string number boolean button etc 0 some classes have assets that can be seen on stage but many do not 0 Time Based vs User Based Actions 0 there are a couple of methods of applying actionscript in your FLA 0 user based actions actions that are triggered by the user 0 time based actions actions that are triggered by time and are added to keyframes ActionScript Tips 0 label frames for easier identi cation inside your actionscript Stop on Frame 0 add a new layer and name it actions 0 add a blank keyframe to the actions layer on frame 1 0 open the actions panel and add the following code on line 1 stop Controlling MovieClip Instances O remember that MovieClips are not tied to the main timeline they contain their own timeline which can operate independently from the main timeline 0 How can we control movieclips from the main timeline Create a movieclip symbol drag an instance of it onto the stage and go into the movieclip instance timeline to edit it On the movieclip instance timeline add a simple motion tween exit the movieclip instance timeline so that you are now back on the main timeline create a simple button symbol and drag an instance of the button onto the stage select the moviclip instance and name it in the property inspector this is the only way that you can reference the movieclip from the main timeline select the button instance open the actions panel and add the following script 0 on release thisltname of your movieclip goes heregtstop test your movie by pressing control enter and you should be able to use the button to stop your movieclip from playing
Are you sure you want to buy this material for
You're already Subscribed!
Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'