The Ultrashock Ultra Bundle
  • Home
  • Community
  • Forum
  • Flash
  • ActionScript
  • Thread
  •  
  • Previous topic
  • Next topic
Sign up to post

Flash
 ActionScript

  • simonboris Author 
    • 502 
    • 0 
    • 11 
    External Jpeg, Percentage ?
    xenite

    Last reply Apr 30 2003, 06:50 PM

    by xenite

    Posted: Dec 24 2002, 02:35 PM

    by simonboris

     

Hi everybody.

Allright, i am loading an external jpg into a movieClip. No problem there.

I want to show the user the percentage of the image that as been loaded.

here is my code:

onClipEvent (data) {
total_bytes = this.getBytesTotal();
loaded_bytes = this.getBytesLoaded();
percent_done = int((loaded_bytes/total_bytes)*100);
txtfield = percent_done + ” %”;
}

It works but it only give me “100%” when the image is loaded. I don’t see the progression of the percentage… (ex: 5%, 43%...)

What should i do to make it work ?

thx

  11 REPLIES
 
cisnky
1  
cisnky

change ‘data’ to ‘enterFrame’.

  • 24 December 2002 03:16 PM
  •  
simonboris Author 
2  
simonboris

If i put ‘enterFrame’ instead of on data, the image dont even show !

  • 24 December 2002 03:19 PM
  •  
simonboris Author 
3  
simonboris

na! forget it…

  • 24 December 2002 06:57 PM
  •  
BlackBox
4  
BlackBox

Here´s a solution :


http://www.layer51.com/proto/d.aspx?f=475


Cheers! yes

  • 25 December 2002 07:41 PM
  •  
cisnky
5  
cisnky

Originally posted by simonboris
na! forget it…

You know I’m right wink

  • 25 December 2002 09:26 PM
  •  
simonboris Author 
6  
simonboris

Allright, it work, but not on a Mac… Damn Mac.
When i am testing the load Jpeg function on a Mac(Internet Explorer) the loading script works but the image is not displayed.

Does flash have a function to refresh the Mc that contained the image ?

The function works properly on a pc (Ie and Netscape) but not on a mac (Damn Mac !!!).

Allright , so if you have ideas, please share,
Thx.

  • 26 December 2002 01:13 AM
  •  
simonboris Author 
7  
simonboris

And #/cisnky/#, you were right about the ‘enterFrame’.
Thx

  • 26 December 2002 01:16 AM
  •  
Obelisk
8  
Obelisk

Try “updateAfterEvent” ??

  • 10 January 2003 04:01 AM
  •  
Sephiroth
9  
Sephiroth

Originally posted by simonboris
Hi everybody.

Allright, i am loading an external jpg into a movieClip. No problem there.

I want to show the user the percentage of the image that as been loaded.

here is my code:

onClipEvent (data) {
total_bytes = this.getBytesTotal();
loaded_bytes = this.getBytesLoaded();
percent_done = int((loaded_bytes/total_bytes)*100);
txtfield = percent_done + ” %”;
}

It works but it only give me “100%” when the image is loaded. I don’t see the progression of the percentage… (ex: 5%, 43%...)

What should i do to make it work ?

thx


i’m gonna use this code and try to do it too…

where does the code go?...  in the host MC first frame?  and how do i load the JPG into ..

sorry.. i miss class when GOD was handling out brains..

  • 08 February 2003 09:26 PM
  •  
PEDALSPEED
10  
PEDALSPEED

EXTERNAL PRELOADER %

Works with JPGs, too.

  • 08 February 2003 09:33 PM
  •  
xenite
11  
xenite

So I came across this thread because I am having a simmilar problem with loading jpegs.  The link above has a great tutorial, but it dosn’t seem to solve the problem of how to get a preloader to work with the data of the jpeg, not the clip that you are replacing.  Any thoughts?

I may have not used the technique described in pedalspeed’s link correctley, however I can’t figure out what is wrong for the life of me.

—xenite

  • 30 April 2003 06:50 PM
  •  
  •   Log in or join for free to make a comment.
 
Topic actions
  •  Share on Facebook
  •  Share on Twitter
Topic Categories
  •  Show All Topics
  •  Development
    •  Server Side
    •  Client Side
  •  Creative Software
    •  Web
    •  Video
    •  3D
    •  Illustrator
    •  Photoshop Battles
    •  Photoshop
  •  Design
    •  Typography
    •  Resources & Insight
    •  Checkpoint
  •  Career
    •  Copyright Matters
    •  Advice & issues
    •  Job Seekers
    •  Job Offers
  •  Flash
    •  UltraMath
    •  OOP
    •  Third Party Tools
    •  Open Source alternatives
    •  Data Communication
    •  Components
    •  Flex
    •  AIR
    •  Flash Lite
    •  Flash Professional
    •  Flash Newbie
    •  ActionScript
    •  XML
  •  Lounge
    •  Polls
    •  Random Chat
    •  Showcase And Critique
    •  BombShock Award Nominations
  •  Community Essentials
    •  BombShock Award Winners
    •  Tutorials
    •  Interviews
    •  News
    •  Bitmap tutorials
Popular Topics
  • Sort by: 
  • Activity
  • Views
  • Comments
  • Likes
Advertise with us
  • Your advertisement here!
  • loading
Ultrashock
  • Creative Assets
  • Community
  • Blog
  1. Home
  2. Forum
+/-
Creative Assets
  • Categories
  • Contributors
  • How to buy
Make Money
  • Commission Rates
  • Referral Program
  • Contributor Program
Community
  • Activity Feed
  • Forum
  • Profiles
About
  • Quick Tour
  • Our History
  • Banners & Logos
Support
  • Contact Ultrashock
  • Advertise with us
  • Legal Information
  •  Keep up to date
  • Flash 775  Flash
  • Audio 6,481  Audio
  • Vector 2,130  Vectors
  • Image 12,338  Images
  • Creative Assets 21,724  Assets
  • Profiles 282,659  Members
  • Topics 93,762  Topics
  • Blog 4  Blog
  • Facebook 1,680  Facebook
  • Twitter 1,165  Twitter
  • Join our FREE monthly newsletter!
  • Archive
  • Invalid email address. Please try again.
Subscribe
  • ©2012 Ultrashock LLC - All rights reserved
  • Terms of Use
  • Privacy Policy
  • Switch to dark theme
  • RSS Feeds
  • Top

©2012 Ultrashock LLC - All rights reserved

Printed on Sat, February 04, 2012 - 20:24:05