Welcome to Dream.In.Code
Getting Help is Easy!

Join 109,157 Programmers for FREE! Ask your question and get quick answers from experts. There are 1,017 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



Loadmovie(.jpg) Preloader Help.

 
Reply to this topicStart new topic

Loadmovie(.jpg) Preloader Help.

Quik
post 2 Nov, 2002 - 04:16 PM
Post #1


D.I.C Lover

Group Icon
Joined: 6 Mar, 2001
Posts: 3,750



Thanked 1 times
My Contributions


frame1
loadMovie("1.jpg", "content");

frame2
actBytes = content.getBytesLoaded();
totBytes = content.getBytesTotal();
percent = actBytes / totBytes * 100;
loada._xscale = percent;

frame3
gotoAndPlay(2);


Well, It dosnt work. I *THINK* the problem is, MX will not goto the second frame until it has finished loading the 'content(being a jpg)' into the clip... Therfore will not progress the bar..

I think thats the issue because it only goes to the second frame once it pops up the picture (fully loaded)


any ideas?
User is offlineProfile CardPM

Go to the top of the page


The Neoracle
post 2 Nov, 2002 - 09:03 PM
Post #2


Check, check, 1, 2.

Group Icon
Joined: 30 Mar, 2001
Posts: 4,069


My Contributions


I think this might help you, I think your having the same problem as this tries to solve.

http://www.studiowhiz.com/_tutorials/maps/...index.php?id=76
User is offlineProfile CardPM

Go to the top of the page

Quik
post 2 Nov, 2002 - 09:42 PM
Post #3


D.I.C Lover

Group Icon
Joined: 6 Mar, 2001
Posts: 3,750



Thanked 1 times
My Contributions


hmm.. It seems like even with "export in first frame" off, it dosnt work. Perhaps this is because I set this on the MOVIE its loading into, rather the graphic itself (which i cannot do.)
User is offlineProfile CardPM

Go to the top of the page

Cookie Mobster
post 3 Nov, 2002 - 09:26 AM
Post #4


nooneenooneenooonee

Group Icon
Joined: 12 Oct, 2001
Posts: 4,723



Dream Kudos: 18
My Contributions


Here you go quik, sometimes Flash just sucks:

http://www.flashguru.co.uk/000044.php
User is offlineProfile CardPM

Go to the top of the page

Quik
post 3 Nov, 2002 - 05:50 PM
Post #5


D.I.C Lover

Group Icon
Joined: 6 Mar, 2001
Posts: 3,750



Thanked 1 times
My Contributions


*sigh*

The last exmaple he gave that *should* progressively load the image, dosnt. Oh well
User is offlineProfile CardPM

Go to the top of the page

davyvbp
post 18 Nov, 2002 - 07:10 PM
Post #6


New D.I.C Head

*
Joined: 16 Nov, 2002
Posts: 7

If you look at my website you will notice that I have a preloader that goes everytime an image is loaded. This is my code.

I load an image to a mc on the main timeline:

_root.image.loadMovie("myimage.jpg");

This is the code for my preloader.
percent is a dynamic text box.

_root.onEnterFrame = function() {
percent = (Math.floor (_root.image.getBytesLoaded() / _root.image.getBytesTotal() *100)+"%");
}

I hope this helps.
User is offlineProfile CardPM

Go to the top of the page

fivebuck
post 18 Jun, 2008 - 08:06 AM
Post #7


New D.I.C Head

*
Joined: 18 Jun, 2008
Posts: 1

hello there,

can the preloader script and loadMovie script be contained on the same frame along with the percent text and image movie clip?
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 9/5/08 05:37PM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month