Solved

Preloader Dynamic Text ActionScript Question...

Posted on 2004-09-13
6
254 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 500 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
Industry Leaders: 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

Technology Partners: 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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SWF capture the time on the Video 3 240
Youtube video error 30 868
Shockwave Flash Object within PowerPoint 2013 2 180
HTML 5 video and audio or Flash 1 83
I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

737 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