Flash:QuickReference

From virtualMV2015wiki
Jump to: navigation, search
 Home  Flash11 (CS5) | Flash10 (CS4) | Flash9 (CS3) <

This section is provided as a quick reference for the chapters following.

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
  }

Icon References.png References

  1. Reinhardt,R. & Dowd,S. (2002) Flash MX Bible. Wiley Publishing Inc, Indianapolis, Indiana. p584

Flash:QuickReference. (2017). In virtualMV's ( Michael Verhaart ) wiki. Retrieved December 13, 2017, from http://www.virtualmv.com/wiki/index.php?title=Flash%3AQuickReference    (zotero)