I'm trying to display on the screen the value of a variable during the swf reproduction. I do not need a function like "trace", because I would to view the variable value on the swf player. I know that this can be made by textfield, but after a lot of trials I have zero results. Can anyone explain me the procedure? Here the code, I've to display the value of click_point variable. Thanks.
Code:onClipEvent(load){ secondTime = 2560; _global.startTime = getTimer(); mouse_pressed = false; _global.random_num = (Math.random()*1001)+1500; //genera numero tra 1500 e 2500 _global.count = 0; } onClipEvent(mouseDown){ _global.click_point = getTimer()-_global.startTime //memorizza il punto al quale si è premuto il mouse if (_global.click_point < 5120){ mouse_pressed = false; count = 0; }else { mouse_pressed = true; count = count + 1; } } onClipEvent(enterFrame){ if(getTimer()-_global.startTime>=2560 && mouse_pressed == false && count == 0){ elapsed = (getTimer() - _global.startTime) % secondTime; this._rotation = 360 * (elapsed/secondTime); } else { if(getTimer()-_global.startTime>=2560 && count >= 1){ _global.time2 = (getTimer()-_global.startTime)-_global.click_point; //inizio count down if(_global.time2 < random_num){ elapsed = (getTimer() - _global.startTime) % secondTime; this._rotation = 360 * (elapsed/secondTime); } else { elapsed = 0; secondTime = 0; } } } }




Reply With Quote