actionscript 3 - Flash Timer Issue -


so i'm trying create timer in flash, basic timer. have looked @ tutorials on google , found couple of ones. problem i'm running when try create timer on different screen. have made dynamic text box mytext. when try access mytext gives me game screen, layer 'as3', frame 156, line 11, column 2 1120: access of undefined property mytext.

this code looks when calling timer:

import flash.utils.timer; import flash.events.timerevent;  var count :number=60; var mytimer :timer=new timer(1000, count); mytimer.addeventlistener(timerevent.timer, countdown); mytimer.start();  function countdown(event:timerevent):void {     mytext.text=string((count)-mytimer.currentcount); } 

i have followed tutorial t , keep getting issue. am creating text box wrong? need add text box screen want on? need create movie clip text box in it? i'm not sure i'm doing wrong, appreciated. thanks!

do need add text box screen want on?

yes. error states, text field can't reached @ keyframe, placed code timer. also, if have text field on desired keyframe, think forgot give name, check moment also.

information


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -