:) shouldnt the array be called 'letters' :) var letters = new Array....
amir Am 09:43 PM 7/8/2007 schrieben Sie:
Content-Transfer-Encoding: 7bit Content-Disposition: inline hello: I've found a tutorial here:http://www.adobe.com/designcenter/video_workshop/ named writing ActionScript for Components. I have done all it wants me to do it but i got the following errors: 1120: Access of undefined property letters. var randomIndex:uint= Math.floor(Math.random()*letters.length); 1120: Access of undefined property letters return letters[randomIndex]; Can anyone tell me what is wrong? The code: var letter:Array= ["A","B","C","D","E","F", "G","H","I","J","K","L", "M","N","O","P","Q","R", "S","T","U","V","W", "X","Y","Z",]; function getRandomLetter():String { var randomIndex:uint=Math.floor(Math.random()*letters.length); return letters[randomIndex]; } import fl.controls.Button; var i:uint=o; var j:uint=0; var posX:uint=o; var posY:uint=0; var buttonSize:uint=25; while(posY<stage.stageHeight){ posX=0; j=0; posY=i * buttonSize; while(posX<stage.stageWidth){ posX= j * buttonSize; var b:Button= new Button b.setSize(buttonSize,buttonSize); b.move(posX, posY); b.label=getRandomLetter(); addChild(b); j++; } i++; } _______________________________________________ [email protected] To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
_______________________________________________ [email protected] To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com

