Flash Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsWeb DesignFlash Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old November 4th, 2002, 08:55 PM
texdc texdc is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Location: Nashville, TN
Posts: 23 texdc User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question sound object

When you dynamically load a streaming sound via the sound object (mySound.load("url", true);) how do you determine how much of it needs to be loaded before it starts to play?

The manual says that flash needs to load enough of it to start the decompressor, but how much is that? Does it differ between systems or is it a constant amount of data?

There's a "_soundbuftime" global that can be set, but how does that translate into bytes?

Any ideas?

Reply With Quote
  #2  
Old November 4th, 2002, 10:59 PM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
its usually a few seconds before it kicks in

with the _soundbuftime function, i wouldnt know about that.

Reply With Quote
  #3  
Old November 5th, 2002, 01:13 AM
texdc texdc is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Location: Nashville, TN
Posts: 23 texdc User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks for the response, but after futzing with it for a few hours, I've got it working the way I want to.

I was originally creating the sound object within a movie clip. I moved it out to the main timeline. After a couple tests, I determined that flash needs about 60% of the file before it starts to play. So I did this:

Code:
bLoaded = _root.song.getBytesLoaded();
tSize = _root.song.getBytesTotal();
pLoaded = Math.round((bLoaded/tSize)*100);
// this gave me the percentage of the bytes loaded
// so I did this check to incorporate the 60% figure
if (pLoaded < 60) {
    fixedP = Math.round((pLoaded/60)*100);
    // 'message' is a dynamic text box
    message.text = "Loading: " + fixedP + "%";
    gotoAndPlay(2);
} else {
    message.text = "Playing: " + songTitle;
}


It should be noted that if you want to stop and restart a streamed sound file, you'll need the latest version of the flash player. Having version 6 is not enough. Version 6.0.47.0 is what I got off the Macromedia site tonight, and it works like a champ.

See the fruits of my labor: La Lumière

Last edited by texdc : November 5th, 2002 at 01:32 AM.

Reply With Quote
  #4  
Old January 8th, 2003, 04:46 PM
itworks itworks is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: Internet
Posts: 12 itworks User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
try this site is has enerything about flash object in MX.

http://www.kennybellew.com


Reply With Quote
Reply

Viewing: Dev Articles Community ForumsWeb DesignFlash Development > sound object


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway