Added: 1 year ago
From: bryanleister
Views: 793
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

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