function colourChange(event:KeyboardEvent):void{ if (event.keyCode == 81);{ id++; if (id > 2) id = 0; myColours.color = coloursArray [id]; mcDisplay.color.colorTransform = myColours;}}
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::MainTimeline/colourChange()'
import flash.events.KeyboardEvent;
var myColours:ColorTransform = mcDisplay.transform.colorTransform;
var id:int;
var coloursArray:Array = new Array( );
coloursArray = ["#711B06", "#510572", "#D36D0A", "#D6075A"];
stage.addEventListener(KeyboardEvent.KEY_DOWN,colourChange);
function colourChange(event:KeyboardEvent):void{ if (event.keyCode == 81);{ id++; if (id > 2) id = 0; myColours.color = coloursArray [id]; mcDisplay.color.colorTransform = myColours;}}
thanks! :)
babyginops 1 year ago
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::MainTimeline/colourChange()'
the code that i used is:
babyginops 1 year ago