VirtualMV/Flash12 (CS6)/Quick reference/Content
From WikiEducator
< VirtualMV | Flash12 (CS6) | Quick reference
Contents
Overview
This page provides a quick reference guide to:
|
Creating a template
- Before you do any of the examples select:
- Window → Workspace Layout → Default (Flash9 CS3)
- Window → Workspace Layout → Classic (Flash10, Flash11)
- Create first two layers as Layer 1 = Labels Layer2 = Actions.
- To create a label click on the frame in the Labels layer, insert a keyframe the give it a label.
- Always leave some "free frames at the start of any flash movie. These can be used later to preload content. (Reinhardt & Dowd, 2002)[1]
Useful key shortcuts
- F9 = Takes you to the script layer.
- [Ctrl]+[Enter] = Test Movie
Working with frames and layers
- To extend a media asset.
Click on the frame that you want to extend it to, then right click and select Insert Frame - To remove the contents of frames use Right Click + ClearFrame
Working with buttons
- To add a button
- Create a button layer, and click on frame(s) where you want it to appear
- Windows > Common Libraries > Buttons .. select the button and drag onto the stage
- Click the button on the stage, then [F9]
- In the ActionScript pane,
choose “Movie Clip Control”, and double click “on”, use the popup to choose release.
Finally enter the code egs. (following)
ActionScript 2.0
gotoAndPlay("intro"); gotoAndStop("intro"); loadMovie("jnlText.swf",0);
ActionScript 3.0
btnHome.addEventListener(MouseEvent.CLICK, clickHandlerHome); function clickHandlerHome(event:MouseEvent):void { this.gotoAndPlay("Home") } btnJ1.addEventListener(MouseEvent.CLICK, clickHandlerJ1); function clickHandlerJ1(event:MouseEvent):void { this.gotoAndPlay("J1") }
ActionScript 3.0: Basic scripts
- Quit a running movie (note only works with a flash exe file as otherwise you would close the browser window that is containing the swf file).
btnExit.addEventListener(MouseEvent.CLICK, clickHandlerExit); function clickHandlerExit(event:MouseEvent):void { fscommand("quit"); //works when run as an exe file }
Cite error: <ref>
tags exist, but no <references/>
tag was found