FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Preloader problem!
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cambodia eXPlore Forum Index -> Flash Shockwave
Author Message
davidgue
first grade


Joined: 14 Mar 2007
Posts: 22

PostPosted: Wed Mar 28, 2007 3:54 am    Post subject: Preloader problem! Reply with quote

Hello! I am quite new to flash programming and so this question might sort of be basic Smile

I have a flash file that includes mp3 files and hence is around 2 MB in size. Since that takes a while to load I created a preloader screen. Problem is, the preloader screen takes a while to load and so when people go to my site they see a blank screen. This defeats the purpose of having a preloader. Is there a way around it? Will having the preloader as a separae swf file and loading the main file into it make a difference? I would appreciate any help on this.

Thanks!

Back to top
guitarman
fourth grade


Joined: 04 Nov 2005
Posts: 728

PostPosted: Wed Mar 28, 2007 2:35 pm    Post subject: Reply with quote



Hi david,

What I would do is to make the preloader with some kind of percentage form where user can view the progress. Otherwise, I would be loading the music from external rather than import it into the site itself.

Do you have .fla to share with us? You can upload it to some temporary site so i could help take a look at it.

Back to top
indogo
fourth grade


Joined: 03 May 2006
Posts: 223

PostPosted: Sat Mar 31, 2007 4:54 am    Post subject: Reply with quote

mySound = new Sound();
mySound.loadSound("http://somewhere.com/yoursound.mp3", true);

will load and play an mp3 as soon as enough is buffered

or

mySound = new Sound();
mySound.loadSound("http://somewhere.com/yoursound.mp3", false);

will load without playing...

mySound.start();

will then play it

either way your core movie may be small enough not to need a preloader anyway.

hope this helps
mike

Back to top
davidgue
first grade


Joined: 14 Mar 2007
Posts: 22

PostPosted: Sun Apr 01, 2007 8:34 am    Post subject: Reply with quote

guitarman and mike,
thanks for your help. i guess i wasnt too clear about what i wanted to do. i do have a percentage box on my preloader screen (which actually is my preloader graphic, i dont have any sliders or anything) and so it takes a while for this percentage box to show up! this is annoying as people are not sure as to whether the site has loaded or if there is an error. i have actually uploaded this. Please take a look and let me know what you think. I really appreciate your help guys.

www.anugrahahall.com

Back to top
guitarman
fourth grade


Joined: 04 Nov 2005
Posts: 728

PostPosted: Sun Apr 01, 2007 1:06 pm    Post subject: Reply with quote

perhaps, u can put up all the content to 2nd frame and the percentage box and script on the frame.
if all else fails, just upload the .fla and necessary files, we will take a look at the codes itself.

Back to top
indogo
fourth grade


Joined: 03 May 2006
Posts: 223

PostPosted: Sun Apr 01, 2007 11:15 pm    Post subject: Reply with quote

Well having the preloader as a separate file would solve the immedeate problem...the flash file appears to be about 4.5mb so the sheer size is slowing down the initial appearance of the preloader.

Dynamically loading the large parts is your best route.

For the music use the streaming code I gave you (true) and reduce the bitrate of your audio (mp3pro with nero is good for this or the free thompson encoder) I use a bitrate of 56 kbs (near dialup) which still gives decent quality.

Also dynamically load the gallery images as I suspect they are quite large too judging by the quality.

With the above optimisations you may find the preloader starts much sooner anyway.

I must say I love your design Smile

regards

mike

ps for netscape/firefox your embed code needs 'Anugraha1.swf' to work.

Back to top
davidgue
first grade


Joined: 14 Mar 2007
Posts: 22

PostPosted: Mon Apr 02, 2007 6:18 am    Post subject: Reply with quote

guitarman wrote:
perhaps, u can put up all the content to 2nd frame and the percentage box and script on the frame.
if all else fails, just upload the .fla and necessary files, we will take a look at the codes itself.


thanks guitraman!

Back to top
davidgue
first grade


Joined: 14 Mar 2007
Posts: 22

PostPosted: Mon Apr 02, 2007 6:32 am    Post subject: Reply with quote

indogo wrote:
Well having the preloader as a separate file would solve the immedeate problem...the flash file appears to be about 4.5mb so the sheer size is slowing down the initial appearance of the preloader.

Dynamically loading the large parts is your best route.

For the music use the streaming code I gave you (true) and reduce the bitrate of your audio (mp3pro with nero is good for this or the free thompson encoder) I use a bitrate of 56 kbs (near dialup) which still gives decent quality.

Also dynamically load the gallery images as I suspect they are quite large too judging by the quality.

With the above optimisations you may find the preloader starts much sooner anyway.

I must say I love your design Smile

regards

mike

ps for netscape/firefox your embed code needs 'Anugraha1.swf' to work.


Mike, first off thanks a lot for your comments! This was my first attempt at making a flash site (for a friend of mine) and your comments are very encouraging Very Happy

I have a few questions:
1. I tried creating the preloader as a separate file, but I had problems coding it. I did not know how to use my code with an external file.
2. How do I load images dynamically? Is there a datatype like 'Sound' for images?
3. It seems like you knew exactly what kind of coding I had done? Is there a way to view to source code for swf files? Smile

Thanks again for all the help!

Back to top
indogo
fourth grade


Joined: 03 May 2006
Posts: 223

PostPosted: Mon Apr 02, 2007 8:13 am    Post subject: Reply with quote

Quote:
1. I tried creating the preloader as a separate file, but I had problems coding it. I did not know how to use my code with an external file.


Several ways to handle this one .. so heres the link (hopefully..somtimes unpredictable) to the reference for the movieclip class...loadMovie and onLoad sections have info relating to your needs

http://livedocs.adobe.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/js/html/wwhelp.htm?href=00001563.html

Basically whilst the preloader is running using info from the movie clip loader class to give the percentage the main movie is being loaded to an invisible layer which is then swapped to the front when load is complete...basically what a preloader does but scripted by hand to be more flexible.

Quote:
2. How do I load images dynamically? Is there a datatype like 'Sound' for images?


Simply in the same way as a movieclip...loadMovie can load a .swf or a .jpg file to a target empty movieclip using the same syntax and can be manipulated in the same way.Try it and you will see Smile..very useful.(export flash 6 or above)

Quote:
3. It seems like you knew exactly what kind of coding I had done? Is there a way to view to source code for swf files?

Similar needs produce similar results.
Source code extraction from flash files is very hit and miss unless it is a very simple movie.

Hope that helps a bit
regards

mike

Back to top
davidgue
first grade


Joined: 14 Mar 2007
Posts: 22

PostPosted: Thu Apr 12, 2007 12:02 am    Post subject: Reply with quote

Thanks a lot mike! Sorry I havent had the time to post a reply - i am totally swamped here. I will try what you've suggested here and see how that goes.

Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cambodia eXPlore Forum Index -> Flash Shockwave All times are GMT + 8 Hours
Goto page 1, 2  Next
Page 1 of 2



by phpBB