I had a search around here and on flashkit and couldnt find anything so I was wondering If anyone knows of a tutorial or an open source file or something that has what I need. Thanks in advance!
http://www.flashkit.com/movies/Scripting/Control/scrub_co-Mark_Gas-7597/index.php
Maybe this might help… dunno…
here’s some snippets that may help you:
//Methods:
mySound.attachSound();
mySound.getBytesLoaded();
mySound.getBytesTotal();
mySound.getPan()
mySound.getTransform()
mySound.getVolume()
mySound.loadSound();
mySound.setPan();
mySound.setTransform();
mySound.setVolume();
mySound.start();
mySound.stop();
//Properties:
mySound.duration;
mySound.position;
//Events:
mySound.onLoad() = function {};
mySound.onSoundComplete() = function {};
ok, these are all the things you can use with sound in flash.
if you were thinking about making a progress bar, then one way to do it would be to have a movieclip that scales depending on the position of play in the sound.
maybe something like this:
(btw: i’d put this onto a movieclip or something so you can use onEnterFrame)
OnClipEvent(enterFrame) {
//calculate the position of the sound in percent so that we can use _xscale easily
percentOfPlay = (mySound.position/mySound.duration)*100;
progressbar._xscale = percentOfPlay;
}
hope this helps