Flash - Intro to ActionScript and Arrays

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
800 views
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Sep 29, 2010

This is an introduction to scripting in Flash CS 5 using ActionScript 3.0. I briefly go over the interface and then show how to use Code Snippets in Flash as well as some found code to start making things happen based on KeyboardEvents. We also start to learn about Arrays and how to write to get code to cycle through the items of an array - a common task in coding.

Category:

Education

Tags:

License:

Standard YouTube License

  • likes, 0 dislikes

Link to this comment:

Share to:
see all

All Comments (2)

Sign In or Sign Up now to post a comment!
  • import flash.events.KeyboardEvent;

    var myColours:ColorTransform = mcDisplay.transform.colorTrans­form;

    var id:int;

    var coloursArray:Array = new Array( );

    coloursArray = ["#711B06", "#510572", "#D36D0A", "#D6075A"];

    stage.addEventListener(Keyboar­dEvent.KEY_DOWN,colourChange);

    function colourChange(event:KeyboardEve­nt):void{ if (event.keyCode == 81);{ id++; if (id > 2) id = 0; myColours.color = coloursArray [id]; mcDisplay.color.colorTransform = myColours;}}

    thanks! :)

  • hii i wonder if u could help? ive tried using this code to change the colour of a movie clip but keep getting this msg 'TypeError: Error #1010: A term is undefined and has no properties.at ActionscriptProject1_fla::Main­Timeline/colourChange()'

    the code that i used is:

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more