?
Solved

Preloader Dynamic Text ActionScript Question...

Posted on 2004-09-13
6
Medium Priority
?
256 Views
Last Modified: 2012-08-14
Hello, I have just a simple Flash MX 2004 Preloader file where I have a graphic and dynamic text telling the user the status of the download, I want the dynamic text to float ontop of the graphic as the graphic loads (graphic fills the screen and moves up) here is the actionscript I am using for the file:
<snip>

bytes_loaded = Math.round(getBytesLoaded());
bytes_total = Math.round(getBytesTotal());
getPercent = bytes_loaded/bytes_total;
_root.loadBar._height = getPercent*100;
_root.loadTextMC.loadText = Math.round(getPercent*100)+"%....Loaded";
_root.loadTextMC._y = _root.loadBar._height
if (bytes_loaded == bytes_total) {
     _root.gotoAndPlay(3);
}
</snip>

 or you can dl the .fla from http://www.rememberrainier.com/vote/PreLoaderSSV3.fla

Any direction or help would be appreciated, all I want is the dynamic text to move up with the loader bar.
0
Comment
Question by:tashley
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 10

Accepted Solution

by:
muso120999 earned 1500 total points
ID: 12048977
Is this kinda what you are after?

bytes_loaded = Math.round(getBytesLoaded());
bytes_total = Math.round(getBytesTotal());
getPercent = bytes_loaded/bytes_total;
_root.loadBar._yscale = getPercent*100;
_root.loadTextMC.loadText = Math.round(getPercent*100)+"%....Loaded";
_root.loadTextMC._y = _root.loadBar._y - _root.loadBar._height-20;
if (bytes_loaded == bytes_total) {
      //_root.gotoAndPlay(3);
}
0
 

Author Comment

by:tashley
ID: 12049326
Yes it's exactly what I am looking for, you get the points, one quick question though, if you notice on the file, the dynmic text movement is chopy, is there a way to make it seem more fluid? Sorry for the lame questions I am pretty new to flash.

0
 
LVL 10

Expert Comment

by:muso120999
ID: 12049398
You can change the frame rate (I usually use 25fps) - Modify -> Document....

Also, just for your interest, you can do the same with just 2 frames (frame 2 in this case isn't required) - although the difference is negligable between the two:
stop();
this.onEnterFrame = function() {
      var bytes_loaded = Math.round(getBytesLoaded());
      var bytes_total = Math.round(getBytesTotal());
      var getPercent = bytes_loaded/bytes_total;
      _root.loadBar._yscale = getPercent*100;
      _root.loadTextMC.loadText = Math.round(getPercent*100)+"%....Loaded";
      _root.loadTextMC._y = _root.loadBar._y-_root.loadBar._height-20;
      if (bytes_loaded == bytes_total) {
            delete this.onEnterFrame;
            _root.gotoAndPlay(3);
      }
};
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 10

Expert Comment

by:muso120999
ID: 12049440
Is there a reason I got a grade B, by the way!
0
 

Author Comment

by:tashley
ID: 12050126
I though I gave you an A, but I hit an extra enter (2) times and closed my browser due to problems with my newly images machine (after brief outage due to windows conflicts) Is there a way to change it?

0
 
LVL 10

Expert Comment

by:muso120999
ID: 12052012
You can request it at community support.  I'm not unduly worried - just wondered - but it would be nice if you could change it ;-)

http://www.experts-exchange.com/Community_Support/
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question