W3cubDocs

/Haxe Flash

Sound

package flash.media

extends EventDispatcher

Available on flash

Constructor

new (?stream:URLRequest, ?context:SoundLoaderContext)

Variables

read only bytesLoaded:UInt

read only bytesTotal:Int

read only id3:ID3Info

read only isBuffering:Bool

@:require(flash10_1) read only isURLInaccessible:Bool

read only length:Float

read only url:String

Methods

close ():Void

@:value({ startPosition : -1 }) @:require(flash10) extract (target:ByteArray, length:Float, startPosition:Float = -1):Float

load (stream:URLRequest, ?context:SoundLoaderContext):Void

@:require(flash11) loadCompressedDataFromByteArray (bytes:ByteArray, bytesLength:UInt):Void

@:value({ sampleRate : 44100, stereo : true }) @:require(flash11) loadPCMFromByteArray (bytes:ByteArray, samples:UInt, ?format:String, stereo:Bool = true, sampleRate:Float = 44100):Void

@:value({ loops : 0, startTime : 0 }) play (startTime:Float = 0, loops:Int = 0, ?sndTransform:SoundTransform):SoundChannel

© 2005–2018 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/flash/media/Sound.html