LOADING
Loading
Hi , welcome back.
LogoutLOGOUT
 
  Lost password?  
Hi
 




 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-26-2003, 01:58 AM
zorba990 zorba990 is offline
Registered User
 
Join Date: Apr 2003
Posts: 8
Rep Power: 0
zorba990 is on a distinguished road
Games Setting Dynamic Text in Frame Scripts

I am having a problem with Dynamic Text.
If I set the text in a Movie Clip's OnClipEvent
then all is well and the changed text displays.

However, if I set the text in a script that is IN a
frame, the changed text does not display.

I am making a loader, and in the frame's
script I am checking the bytes loaded, and calculating
a percentage. In the frame's script I bump the frame for
a status bar (making it longer), and also set the text
to the percentage number.

Can you not change Dynamic Text objects' text in a frame script?

Even if I modify the code below to keep changing the text
(taking out the test for == 100), the "100%" text never displays.
A trace shows the correct text, but the Dynamic Text object does
not.


Here is the code:

var vLoaded = _root.getBytesLoaded();
var vTotal = _root.getBytesTotal();
var vPerc = Math.round(100 * vLoaded/vTotal);
_root.Percent_Loaded_txt.text = " " + vPerc + "%";
_root.StepItBar.gotoAndStop(Math.round(10 *
(_root.getBytesLoaded()/_root.getBytesTotal())) );
if (vPerc == 100)
{
_root.gotoAndPlay("Scene2", 1);
}
else
{
_root.gotoAndPlay("preloader", 1);
}


I realize the above code could be shorter, but I made all the
temp variables for debugging.
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic Text - change text box variable on click kenisswell Flash MX ActionScript 10 11-01-2005 09:20 PM
Dynamic text rendering vs. static text nullptr General Flash 2 03-10-2005 06:07 PM
Creting input textfield denizci2000 Flash MX 5 12-15-2004 08:58 PM
HTML text not showing in dynamic text field Wasaby Flash MX 2004 2 09-07-2004 04:34 PM
Dynamic text cannot modify alpha ? whitewine Flash MX 3 11-28-2002 11:24 PM




All times are GMT. The time now is 01:00 PM.