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 Previous  1, 2
 
Post new topic   Reply to topic    Cambodia eXPlore Forum Index -> Flash Shockwave
Author Message
indogo
fourth grade


Joined: 03 May 2006
Posts: 222

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

No probs....time can be elusive.....

mike

Back to top
davidgue
first grade


Joined: 14 Mar 2007
Posts: 22

PostPosted: Tue May 08, 2007 1:18 pm    Post subject: Reply with quote



Mike,

I finally got the time to work on the flash project. So the first thing I tried was dynamically loading the audio (after reducing the bitrate as suggested by you). I noticed 2 things:

1. The page didnt load any faster - I think it is still the same (may be creating a separate file for the preloader is the only solution - will try it when i get the time)

2. The audio is playing really fast for some reason! You can check out what am saying : http://www.anugrahahall.com

Any thoughts? Thanks!

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.


Back to top
indogo
fourth grade


Joined: 03 May 2006
Posts: 222

PostPosted: Wed May 09, 2007 6:16 am    Post subject: Reply with quote

Ok
well the music is at a sample rate of 24000hz...for flash it needs to be 44100, 22050 or 11025 otherwise the effect you are having occurs..which is amusing but unwanted Smile .

The main flash file is down 500k to 4mb so a bit of a gain there but still large.

Ok I had a look at the flash file and it seems to contain 2mb of audio still....check to see if the sound is still embedded in the movie.

Images come to 1.8 mb.... two of the images are 2288 x 1712 pixels...far too big and probably accounting for the majority if this space...size all the images down to the size they are displayed at in the movie...this will save much..perhaps enough to not need to be dynamically loaded.

without the unwanted embedded audio and images the movie is about 150k...which would load in a short time.

hope this helps

mike

ps email may not work on the forum so if I'm slow to reply......

Back to top
davidgue
first grade


Joined: 14 Mar 2007
Posts: 22

PostPosted: Wed May 09, 2007 2:08 pm    Post subject: Reply with quote

Mike,

Thanks a lot for your suggestions! It worked Very Happy !!! It loads really fast now. I am so excited about this.

But i got a different issue - i changed the sampling rate, so tha audio is loading fine. But, it does only when i use the loadSound("address",true) option. And with this I dont know how to keep looping the sound. If I use the "false" option, for some reason it just doesnt work. (Weird, but it works fine when i test it on my local hard drive). Any ideas as to why this is happening?

I think i asked you this before.. but how were you able to determine my exact file size, audio sampling rate and image sizes/resoultions?Shocked

Thanks again!

Back to top
indogo
fourth grade


Joined: 03 May 2006
Posts: 222

PostPosted: Wed May 09, 2007 6:34 pm    Post subject: Reply with quote

Oh good.....a breakthrough in group.

Firstly with no cache enabled the flash file and the mp3 are neatly available in th windows temp folder.....
then using a handy little tool someone made (for koolmoves) I was able to check out the resources...I've put a copy here..unzip and run Smile
http://indogo.org/flashtool.zip

For the sound 'true' means streaming whilst 'false' means the entire music file is loaded before playing.
Un fortunately there seems to be no method to detect when playing has finished in streaming mode...my only suggestion would be to use setInterval to trigger mySound.play(); ...the interval being the length of the music plus a few seconds...should be ok as the music plays in real time plus a small initial delay and will play immedeately after the first time.(hope that makes sense)

well a bit of fine tuning and you are done....I wondered about having the part up to the 'enter'screen as a separate movie which then loads the main in the background...with a loader bar running in the corner if you see what i mean...quick start with skip if wanted...this screen is a natural break/pause in the sequence.
ok have fun

mike

Back to top
davidgue
first grade


Joined: 14 Mar 2007
Posts: 22

PostPosted: Thu May 10, 2007 2:55 am    Post subject: Reply with quote

Mike! The setInterval trick worked - you're the genius! ..that was one hell of an idea - i am all set now (well almost). I think i know what you mean about creating a separate movie. But since this loads fast enough, I guess I will worry about it for my next project (which i've already kickstarted.. so expect more questions :p..haha just kidding)

thanks a lot though! I owe you one..

Back to top
davidgue
first grade


Joined: 14 Mar 2007
Posts: 22

PostPosted: Thu May 10, 2007 2:55 am    Post subject: Reply with quote

Oh and thanks for the tool! I am a mac user.. so i will have to check it out on a pc Smile

Back to top
indogo
fourth grade


Joined: 03 May 2006
Posts: 222

PostPosted: Thu May 10, 2007 8:16 am    Post subject: Reply with quote

The tool was written for koolmoves which is pc only so the tool is too....I've used koolmoves under wine ok ... so perhaps a windows emulator for mac if there is one.

Needs must...I find things out when I try something and it doesn't work as I expect so in come the workarounds.

Well glad things got sorted on that one

regards

mike

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 Previous  1, 2
Page 2 of 2



by phpBB