View Full Version : Progress bar implanted
Ready
02-03-2003, 02:27 PM
I made a test of progress bar with a lot of code... It's the better way I found for a progress bar. There is no song in the test. You must add code mp3.play("") in the play button and copy the song to distribution folder.
I have upload the test to an email account cause the attachements are turn off for this forum.
at www.mail.yahoo.com
Username : testprogress
password : access
plz, give me all of your suggestions.. thx
Lorne
02-04-2003, 09:30 AM
Not bad. /ubbthreads/images/icons/smile.gif
A few quick thoughts:
- in your calculations to get %PrTi% and %PrTT%, you should do Variable.FormatNumber (to round the values) after performing the division. Whenever you round a number in a calculation, you want to do it as late as possible. In this case, you're actually displaying values every now and then that aren't rounded to 2 digits, because the rounding is performed too early.
- you could replace most of the show/hide code for the progress display with a simple loop. Something like this:<font color=green><pre>%i% = "1"
%ledindex% = Evaluate (50 * %PrTT%)
%ledindex% = Variable.FormatNumber (%ledindex%, 0, Round)
WHILE (%i% <= 50)
IF (%ledindex% = %i%)
Page.ShowObject ("LedA%i%")
ELSE
Page.HideObject ("LedA%i%")
END IF
%i% = Evaluate (%i% + 1)
END WHILE
</pre>
</font color=green>
(This won't work 100% when you seek manually, though, because of rounding errors in your other calculations...but it should give you the general idea.)
Ready
02-05-2003, 07:17 PM
Thanks Lorne for your codes and the time you had pass to check my test. It will help me to reduce extremely the code.
I have a question about Flash. How can i do for interac flash code with AMS. Is it possible ? Exemple : I want to program a flash progress bar that will receive in parameter the lenght and the progress time of the song that play in my AMS application. Does I can send parameter from Flash objet or fonction to my AMS appl ? Because if I can, the flash objet will adjust perfecly its progress bar in function of parameters (the speed of the progress, etc).
Corey
02-06-2003, 12:07 AM
Sure that's easy. I created one that works but I lost it. Just create a flash movie 100 frames in length which contains a tween of a solid rectangle. Make sure in each keyframe (1 and 100) the bar symbol is left aligned.
Then just use the FLASH OBJECT > SEEK action within your code to place the bar at the correct percentage in length by seeking to the corresponding frame, i.e. 1-100. I hope I explained this well enough, it's really super easy, takes less than 3 minutes to do the flash...
Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)
andycrim
04-27-2003, 10:19 AM
Any chance of you creating this for those of us who are flash-impaired? Certainly would be appreciated!
Powered by vBulletin™ Version 4.0.6 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.