Preloader and Sound Object

My Flash site has a media player which uses the attachSound
method to play and skip through 3 mp3s. As a result the preloader
shows up after the movie has loaded 60%. To rectify this, i changed
the Publish Settings under the Flash Tab so that the classes for AS
2.0 load in the 2nd frame of the Preloader Scene(I have separated
the preloader and the main movie to diffrerent scenes..)
I read it somewhere that to correct a similar problem with
MCs, you need to place them somewhere in the timeline (say,Off
Stage), But how can same be done for Sound Objects.???

if i do that then the preloader works fine,however the player
doesnt work...since the audio files dont get loaded..

Similar Messages

  • Problem with preloader and sounds

    Hello everyone,
    I am making a movie that has 12 sound files in it. I am
    having trouble getting this to work with a preloader. I was using a
    seperate flash movie and using the movieClipLoader to load in the
    movie that has the sounds in it. However my employer wishes to have
    everything in a single swf file. I know the concept, that the
    sounds in the movie using attachSound need to be loaded before
    first frame... but I need the preloader to take them into
    account... how do I do that? I tried putting my preloader on frame
    one, then had 12 keyframes in a row and just dragged the sounds
    onto the stage (one for each keyframe there), and then the main
    movie starts on frame 14... but that stil doesnt work... how can i
    do this?

    Just to let anyone know... I did figure this out on my own...
    it makes it messy though and I dont like it... buuuuut what are you
    going to do... I had to set the linkage in each sound in the
    library to export and then uncheck the export in first frame...
    then i had to create keyframes for each sound and put it on the
    stage in frames 2-13. Preloader on frame 1 and main movie on frame
    14... it works now.

  • How to close the Sound object

    I'm using Flash CS3, running code in ActionScript 3.
    I use the Loader class to load a child SWF file, which then
    takes over the entire area on my website that is reserved for
    Flash. If the user decides to stop watching the SWF file before it
    is completed, he hits the "close" button within the child SWF,
    ultimately causing the Loader.unload() method to be executed. So
    far, so good, only the sound from the remaining portion of the SWF
    file keeps playing. According to the Flash Docs for the
    Loader.unload() method:
    "As a best practice, before you unload a child SWF file, you
    should explicitly close any streams in the child SWF file's
    objects, such as LocalConnection, NetConnection, NetStream, and
    Sound objects. Otherwise, audio in the child SWF file might
    continue to play, even though the child SWF file was unloaded."
    It then gives an example that assumes you already have access
    to the Sound object, so closing the Sound object is done by:
    mySound.close();
    The only problem is that I have no idea how to access the
    Sound object when I use the Loader.load() method. Where is this
    beast? I can't seem to find anything in the documentation that
    tells me how to find the Sound object after calling Loader.load().
    As a temporary fix, I modified the target SWF file so that when the
    "close" button is hit, it calls the "stop()" function; however,
    this only stops the sound, it does not close the associated Sound
    object, and I presume it continues to lurk around in memory with
    nothing useful to do. (When the user hits the "close" button in the
    child SWF file, it creates a "bubbling" event so that the Loader
    class can call the Loader.unload() method on it.)
    I've attached code for your reference.
    Any help is deeply appreciated!
    -Dan

    Ack! Looks like I hijacked this thread, sorry.
    I'm doing almost exactly the same thing the OP is doing...
    Loader class to load an external SWF (which is a video file FLV).
    If the user hits the "close" button on the video, the video goes
    away as it should but the audio continues.
    I understand that I need to close any NetConnection and
    NetStream objects in addition to unloading the movie. What I don't
    understand is how to do that. I'm sure that it's a syntax thing I'm
    just not getting right. I would just really like a more detailed
    explanation of stopping NetConnections and NetStreams (but an
    explanation for the not-so-actionscript-experienced LOL).
    Thanks.

  • Beginners Guide sound installation -- OSS and ALSA objective features

    Beginners Guide sound installation -- OSS and ALSA objective features needed
    Hi,
    In most wiki pages i just edit the things that i think need editing. Just look at the oss history
    In all those cases i didn't really saw a need to ask for permission.. that would kinda destroy the wiki idea.
    However i want to change the sound instructions in the beginners guide so i made a copy of the entire guide and the part that i changed there is: http://wiki.archlinux.org/index.php/Use … ling_Sound now i have a slight issue there. As you can see i'm in favor of OSS and because you can spot that it's not objective. Now i would ask 2 things.
    1. Could you all post your features of OSS and ALSA
    2. Once that's done can i have permission to place that section in the beginners guide? that will also include removing the sound installation from the beginners guide which i already did in my version
    My personal reason to do this. i've read this  and am since then pro OSS and against the ALSA/PulseAudio combo. i think that combo needs to get out of linux (most notably Fedora and Ubuntu) ASAP. and oss needs to go back into the linux kernel
    Thank you for your time,
    Mark

    ngoonee wrote:
    I'm an alsa/pulse user, so I'll give a bit of the 'other side'.
    Alsa/pulse
    Pros:-
    network sound
    advanced connection of sink/source (including merging sinks)
    bluetooth support!
    highly supported by existing apps, either through directly supporting Pulse or through its alsa plugin (you should not need to recompile properly-written apps which do not assume they should write audio data directly to hardware, I think I only needed to recompile mpd on my system)
    Cons:-
    Setup isn't the easiest. Can't comment vs OSS4 because I haven't tried it
    OSS4
    Pros:-
    Everyone seems to say sound quality is better. I guess that's because they're comparing it with dmix alsa. Use pulse with alsa and you should not notice any difference in sound quality though.
    Cons:-
    Most apps nowadays default output to alsa. Meaning OSS plays them using an alsa plugin.
    USB support is admittedly skimpy.
    EDIT: Having read the sound article you referred to, my only comment is that the writer really has it in for Pulse... 3 seconds latency, where'd he get that from? I use pulse for audio recording (when I'm lazy to fire up JACK) and while there IS latency, its definitely in the ms range.
    Thanx for the input
    Gen2ly wrote:
    Gen2ly wrote:...As a side note, do you need libflashsupport here???...
    markg85, libflashsupport isn't needed. [1]
    pacman -Ql oss | grep flash
    If you don't know, please don't put in wiki, this could cause unnecessary problems.  As for the mms section:
    If your stream sounds ugly in totem like it did with me then you could try to play it with another codec like ffmpeg (mplayer). That "fixed" the issue for me. This will not fix the issue that somehow pops up in gstreamer when playing MMS streams but it will give you the option to play it with good sound quality. Playing it in mplayer is simple:
    # mplayer mmsh://yourstreamurl
    Could you fix this?  ffmpeg is not a codec .  Also define ugly, and what is somehow?
    markg85 wrote:Thanx a lot for your feedback. i will certainly use it when i make more edits.
    As for the things you didn't know. As soon as i fully understand how i can get a microphone working in OSS i will add that to the wiki as well. Unless you already know it.. in that case, feel free to add it.
    For the mic, I did get mine going.  Can't remember just how I did mine (sorry, think I had to disable one of the inputs),  but do remember to prevent it from passing through the speakers had to disable "Misc Microphone".
    # ossmix
    Selected mixer 0/High Definition Audio ALC888
    Known controls are:
    jack.green.mode <front|rear|center/LFE|side|pcm4|input> (currently front)
    jack.green [<leftvol>:<rightvol>] (currently 29.9:29.9 dB)
    jack.green.mute ON|OFF (currently OFF)
    jack.black.mode <front|rear|center/LFE|side|pcm4|input> (currently center/LFE)
    jack.black [<leftvol>:<rightvol>] (currently 29.9:29.9 dB)
    jack.black.mute ON|OFF (currently OFF)
    jack.orange.mode <front|rear|center/LFE|side|pcm4|input> (currently rear)
    jack.orange [<leftvol>:<rightvol>] (currently 29.9:29.9 dB)
    jack.orange.mute ON|OFF (currently OFF)
    jack.gray.mode <front|rear|center/LFE|side|pcm4|input> (currently pcm4)
    jack.gray [<leftvol>:<rightvol>] (currently 29.9:29.9 dB)
    jack.gray.mute ON|OFF (currently OFF)
    jack.pink.mode <front|rear|center/LFE|side|pcm4|input> (currently input)
    jack.pink [<leftvol>:<rightvol>] (currently 19.9:19.9 dB)
    jack.pink.mute ON|OFF (currently OFF)
    jack.fp-pink.mode <front|rear|center/LFE|side|pcm4|input> (currently front)
    jack.fp-pink [<leftvol>:<rightvol>] (currently 29.9:29.9 dB)
    jack.fp-pink.mute ON|OFF (currently OFF)
    jack.blue.mode <front|rear|center/LFE|side|pcm4|input> (currently input)
    jack.blue [<leftvol>:<rightvol>] (currently 29.9:29.9 dB)
    jack.blue.mute ON|OFF (currently OFF)
    jack.fp-green.mode <front|rear|center/LFE|side|pcm4|input> (currently front)
    jack.fp-green [<leftvol>:<rightvol>] (currently 29.9:29.9 dB)
    jack.fp-green.mute ON|OFF (currently OFF)
    record.mix.mute.mic1 ON|OFF (currently OFF)
    record.mix.mute.fp-mic1 ON|OFF (currently OFF)
    record.mix.mute.linein1 ON|OFF (currently OFF)
    record.mix.mute.fp-headphone1 ON|OFF (currently OFF)
    record.mix.mute.green1 ON|OFF (currently OFF)
    record.mix.mute.black1 ON|OFF (currently OFF)
    record.mix.mute.orange1 ON|OFF (currently OFF)
    record.mix.mute.gray1 ON|OFF (currently OFF)
    record.mix.mute.input-mix1 ON|OFF (currently OFF)
    record.mix1 [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
    record.mix.mute.mic2 ON|OFF (currently OFF)
    record.mix.mute.fp-mic2 ON|OFF (currently OFF)
    record.mix.mute.linein2 ON|OFF (currently OFF)
    record.mix.mute.fp-headphone2 ON|OFF (currently OFF)
    record.mix.mute.green2 ON|OFF (currently OFF)
    record.mix.mute.black2 ON|OFF (currently OFF)
    record.mix.mute.orange2 ON|OFF (currently OFF)
    record.mix.mute.gray2 ON|OFF (currently OFF)
    record.mix.mute.input-mix2 ON|OFF (currently OFF)
    record.mix2 [<leftvol>:<rightvol>] (currently 4.4:2.9 dB)
    misc.mic [<leftvol>:<rightvol>] (currently 0.0:0.0 dB)
    misc.fp-mic [<leftvol>:<rightvol>] (currently 46.4:37.4 dB)
    misc.linein [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
    misc.fp-headphone [<leftvol>:<rightvol>] (currently 34.4:34.4 dB)
    misc.green [<leftvol>:<rightvol>] (currently 34.4:38.9 dB)
    misc.black [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
    misc.orange [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
    misc.gray [<leftvol>:<rightvol>] (currently 40.4:41.9 dB)
    misc.input-mix <mic|fp-mic|linein> (currently mic)
    misc.front-mute ON|OFF (currently OFF)
    misc.input-mix-mute1 ON|OFF (currently OFF)
    misc.front1 [<leftvol>:<rightvol>] (currently 43.4:43.4 dB)
    misc.front2 <front|input-mix> (currently front)
    misc.rear-mute ON|OFF (currently OFF)
    misc.input-mix-mute2 ON|OFF (currently OFF)
    misc.rear1 [<leftvol>:<rightvol>] (currently 4.4:4.4 dB)
    misc.rear2 <rear|input-mix> (currently rear)
    misc.center/lfe-mute ON|OFF (currently OFF)
    misc.input-mix-mute3 ON|OFF (currently OFF)
    misc.center/lfe1 [<leftvol>:<rightvol>] (currently 41.9:41.9 dB)
    misc.center/lfe2 <center/LFE|input-mix> (currently center/LFE)
    misc.side-mute ON|OFF (currently OFF)
    misc.input-mix-mute4 ON|OFF (currently OFF)
    misc.side1 [<leftvol>:<rightvol>] (currently 35.9:35.9 dB)
    misc.side2 <side|input-mix> (currently side)
    misc.pcm4-mute ON|OFF (currently OFF)
    misc.input-mix-mute5 ON|OFF (currently OFF)
    misc.pcm41 [<leftvol>:<rightvol>] (currently 25.4:25.4 dB)
    misc.pcm42 <pcm4|input-mix> (currently pcm4)
    vmix0-enable ON|OFF (currently ON)
    vmix0-rate <decimal value> (currently 48000) (Read-only)
    vmix0-channels <Stereo|Multich> (currently Stereo)
    vmix0-src <Fast|Low|Medium|High|High+|Production|OFF> (currently Medium)
    vmix0-outvol <monovol> (currently 25.0 dB)
    vmix0-invol <monovol> (currently 25.0 dB)
    vmix0.pcm8 [<leftvol>:<rightvol>] (currently 19.9:19.9 dB) ("knotify4")
    vmix0.pcm9 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
    vmix0.pcm10 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
    vmix0.pcm11 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
    For libflashsupport on the same page you linked it clearly states:
    #  Flash V9 and V10 require libflashsupport to output sound via OSS. Typically a 32-bit version of the library is required.
    # Flash V10 has a 64-bit version which requires a 64 bit libflashsupport.
    Also i tested it with and without libflashsupport. On archlinux (x64 running here) there most certainly is a need for libflashsupport when you want to have sound in your flash. And yes i tested the archlinux OSS version and the mercurial version (running now) bith need it  installed manually! On my pc sound in flash didn't work without it but did with it. So, no not removing from the wiki as it's needed. But i see you removed it for me! please do NOT do that if you didn't even verified it. I use flash 10 x64 and i need it!
    As for the ffmpeg "codec" changed it to backend.
    And i did get the microphone working near perfect: http://www.4front-tech.com/forum/viewtopic.php?p=13192
    Now for some news you all might like.
    On my school i need to do an investigation to whatever i want and i'm heavily thinking about investigating the pros/cons of alsa compared to oss (or oss compared to alsa). That investigation will take from monday next week till next mondey till friday 23 of oktober. In that investigation i'm going to do some in depth look of alsa and oss and that will include the usability as well.
    Following up on that investigation i will spend another 8 weeks on my school making a volume control application that can be used with alsa and oss and easily expandable with other sound systems. The goal of this is to make one sound application that can manage (in the first place) alsa and oss. oss is going to be implemented and alsa is probably going to be dummy implemented because it's likely way to much for me to implement both.
    Before you get to exited, both projects (investigating and making the application) are just made up today and i just don't know if both will get accepted by my school. I asked one teacher and he liked the idea a lot and could potentially have a value for the sound management under linux. Once i do get this started i will involve the community (YOU!) with this since this project can't be done without the community specially the investigation.
    And once i start and have something to tell/ask i will blog about it on http://blog.mageprojects.com
    edit::
    And this idea already got dumped. read more a few posts down or click: http://bbs.archlinux.org/viewtopic.php? … 34#p612634
    Last edited by markg85 (2009-09-03 17:51:45)

  • Sound Object and Media Display

    I'm creating a music player that uses xml generated from a
    database to load a song. One of the attributes of the xml is the
    path to the mp3 file. The attribute is stored in a generic object
    and is then passed as a function parameter. There's a lot of
    information i'd like to use from the id3 tags but the only object
    that supports them is the Sound object. I need the files to stream
    so they aren't cached onto the local system and have a media
    component to control playback.
    If I create a sound object and use the file path parameter in
    the loadSound method I can grab the id3 tags but the media
    component doesn't have control of playback and the files are
    cached.
    mySound:Sound = new Sound();
    mySound.loadSound(pathparam, true);
    If I just load the file path into the media component it
    starts playing right away and streams with the lovely built-in
    progress bar but I can't seem to access the id3s.
    mediaComponent.setMedia(pathparam, "MP3");
    Is there a way to load an actual Sound object into the media
    component so they will stream but also have access to the id3s?
    Thanks in advance for any tips!

    How can this NOT work????
    //Create an instance of the Sound class
    var soundClip:Sound = new Sound();
    //Create a new SoundChannel Object
    var sndChannel:SoundChannel = new SoundChannel();
    //Load sound using URLRequest
    soundClip.load(new URLRequest("chimes.wav"));
    //Create an event listener that wll update once sound has finished loading
    soundClip.addEventListener(Event.COMPLETE, onComplete, false, 0, true);
    function onComplete(evt:Event):void {
    //Play loaded sound
    sndChannel = soundClip.play();
    Taken directly from:
    http://flashspeaksactionscript.com/loading-external-sounds-using-as3/
    I hear nothing.

  • Simple sound object and TotalBytes

    Hello,
    I built this simple sound object below:
    var s:Chimes = new Chimes();   // Chimes class via chimes.wav in library
    s.play();
    //trace(s.bytesTotal);   this works fine but comented out for now = 2912 bytes
    s.addEventListener(Event.SOUND_COMPLETE, done);
    function done(e:Event)
    trace(s.bytesTotal);  // this does not trace at all
    To me I added a listener to the s instance. I am waiting for the
    s instance to finish loading the entire sound  s.
    I can't figure out why the trace displays nothing.
    Have I attached the wrong event to look for when
    the sound completes loading?
    Thanks,
    Jim

    How can this NOT work????
    //Create an instance of the Sound class
    var soundClip:Sound = new Sound();
    //Create a new SoundChannel Object
    var sndChannel:SoundChannel = new SoundChannel();
    //Load sound using URLRequest
    soundClip.load(new URLRequest("chimes.wav"));
    //Create an event listener that wll update once sound has finished loading
    soundClip.addEventListener(Event.COMPLETE, onComplete, false, 0, true);
    function onComplete(evt:Event):void {
    //Play loaded sound
    sndChannel = soundClip.play();
    Taken directly from:
    http://flashspeaksactionscript.com/loading-external-sounds-using-as3/
    I hear nothing.

  • Problem between loadmovie and sound of loaded movie

    hi, i made an swf which uses sound events and it plays fine.
    the sounds are dealed with new sound, somesound.attachsound,
    somesound.start, somesound.stop and so on, the linkage properties
    are something like 'export for actionscript' and 'export in first
    frame' checked. the movie plays ok when i watch it with swf player
    or in a web page. the problem arises when i set a preloader in an
    external file, the main movie is mainly pictures so it would remain
    as a blank screen while loading, so i had to make an external
    preloader, but when the main movie plays loaded by the preloader,
    the sounds controlled via actionscript wont play, any pointers or
    suggestions?
    tnx

    flash is probably looking for those linked sounds in the
    _level0 library.
    to remedy, use whatever=new Sound(this); instead of
    whatever=new Sound() when instantiating sound objects in your
    external swf.

  • How do I know when a file loaded into a Sound object is invalid?

    I'm writing an app that allows the user to play various sound files.
    Some of these files are mp3, but some may also be ogg, wma, etc.  The selection is out of my control, so I need the sound API to tell me if it can't play something.
    To test, I loaded some test files into a sound object like so:
                    var urlRequest:URLRequest = new URLRequest("http://support.microsoft.com/support/MediaPlayer/wmptest/samples/new/mediaexample.wma");
                    var sound:Sound = new Sound();
                    var soundChannel:SoundChannel = sound.play();
    Even though Flex doesn't play wma's there is no error information or null objects anywhere.  Everthings seems to be fine to flex, I can even register for progress events and see the wma being loaded.
    Just to see how far this goes, I loaded a gif instead of an audio file and the same thing happened.  Progress went fine with no errors of any kind even though I registered for every listed event.  As expected though, no sound played from the gif file.
    What is the recommended way for checking if a file is not playable?

    I'm looking more for an "is it playable" value (since it might be an FLA or FLV as well).
    Even a meaningful length value would work (for some reason duration is set to a value even when loading a gif file - not sure what it means for a GIF to have a length of 96 milliseconds).
    For now I'll have to filter on extension as you mentioned.

  • Newbie question about entity and view objects

    Hi everyone,
    My first ADF application in JDeveloper is off to a difficult start. Having come from a forms background, I know that it is necessary avoid using post-query type lookups in order to have full filtering using F11/Ctrl+F11. This means creating an CRUDable view and getting as much of the lookup data as possible into the view without losing the ability to modify the data. In JDeveloper, I do not know how to build my data model to support that. My thought was to start with a robust updateable view as my main CRUD EO and then create a VO on top of that with additional EOs or VOs. But, I have found that I cannot add VOs to another VO. However, if I link the VOs then I have a master-detail which will not work for me.
    For example, I have two joins to CSI_INST_EXTEND_ATTRIB_V shown in the queries below and need to have that show in the table displaying the CRUD VO’s data. It seemed that the best way to do this is to create a CSI_INST_EXTEND_ATTRIB_V entity object and view object. The view object would have two parameters, P_INSTANCE_ID and P_ATTRIBUTE name. Both the building and the unit are needed on the same record, and this is not a master-detail even though it might look that way. (A master-detail data control will not work for me because I need all this data to appear on the same line in the table.) So, I need help figuring out the best way to link these to the main (CRUD) view; I want as much of this data as possible to be filterable.
    select
    cieav.attribute_value
    from
    csi_inst_extend_attrib_v cieav
    where cieav.instance_id = p_instance_id
    and cieav.attribute_code = 'BUILDING NAME'
    select
    cieav.attribute_value
    from
    csi_inst_extend_attrib_v cieav
    where cieav.instance_id = p_instance_id
    and cieav.attribute_code = 'UNIT NAME'
    Ultimately, I need to display a ton of data in each record displayed in the UI table, so a ton of joins will be needed. And, I need to be able to add records using the UI table also.
    James

    Hi Alejandro,
    Sorry if I caused confusion with my first post. What I had in mind assumed that I could have a single CSI_INST_EXTEND_ATTRIB_V EO with a BuildingVO and UnitVO on top of it. So, I wrote the queries individually to show how I would invoke each view. When I realized that confused the issue, I rewrote the query to explain things better.
    Now having seen your 2 queries. You need to create 2 EO. One for each table. Then create an association between the 2 aeO (this will be the join you are talking about). Then, you need to create a VO based on one of the EO and after you can modify and add the second EO (in here you select the join type).
    After your done with this, youll have 1 VO that supports CRUD in both tables.
    There were three tables in the query: CIEAV_BUILDING, CIEAV_UNIT, and T -- the main CRUD table. When you say that I should create two EOs, do you mean that they are to be for CIEAV_BUILDING and CIEAV_UNIT? Or, CIEAV and T? Assuming CIEAV and T, that sounds like it would allow me to show my building or unit on the record but not both.
    By the way, everything is a reference except for the main CRUD table.
    Look forward to hearing from you. Thanks for your help (and patience).

  • DAO and Domain Object

    hi,
    Normally when i want to persist a domain object like Customer object to a database, my statements will be below,
    // code from my facade
    Customer cust = new Customer();
    cust.setFirstName("myname");
    cust.setLastName("mylastname");
    // set another attributes
    cust.create();
    with this code i have a CustomerPersistence object to handler for create this customer record to a database. Now j2ee have a DAO pattern. So my question is,
    1.where is a domain object within DAO pattern? --> because of we can reused domain object.
    2.DTO is Domain Object, isn't it?
    3.when i look at some articles about DAO, many of it will present in this way
    facade -->create DTO --> call DAO (plus something about factory pattern)
    i never see something like this
    facade --> domain object --> dao
    any suggestion?
    anurakth
    sorry for my english!!

    Hi,
    I am a bit confused about implementation of the domain model and I wondered if you could help. My main concern is that I am introducing too many layers and data holders into the mix. Here is what I am thinking.
    DTO - used to carry data between the presentation and the services layer
    Service Class - coordinates the calling of domain objects
    Domain Object - models a domain entity, service layer logic specific to this object is to be implemented here.
    Data Object - an exact representation of a database table. many to many relationship between domain object and data object.
    Hibernate DAO Class - has no properties, just methods used for read and writing the object to the database. It is passed in the Data Object for persistence. Is it wrong that the DAO contains no properties?
    Perhaps the domain object will contain each data object it is comprised of. I was originally going to keep calls to DAOs in the Services class (as recommended in http://jroller.com/page/egervari/20050109#how_to_change_services_logic ) but I am thinking that each domain object could expose a save method, and that method would co-ordinate persisting itself to the various tables it is derived from.
    Does this sound resonable? I have trouble finding a pattern on the net that clealy defines the Domain Model. I was tempted to map Domain Objects directly to database tables, and simply persist the Domain Object, but this 1-1 relationship may not always hold true.
    Thanks.

  • How to flush the loaded bytes of a Sound object

    Hi all,
    I've now been looking for a solution to my problem for quite
    a while now, but so far without any success, so I thought I'll give
    this forum a try.. maybe someone in here can help ;-)
    Ok here's the deal: I'm trying to create a simple audio
    player in flex that is able to play mp3 audio streams. I'm not
    looking for a solution that works with an FMS (Flash Mediaserver)
    and I do also not need code that shows me how to play a remote mp3
    file (which of course is also some sort of streaming streaming). I
    have an icecast internet radio server which is streaming a constant
    flow of mp3 encoded data. I can connect to that stream with
    standard media players like winamp or mplayer.
    I've been playing around with the
    URLRequest-SoundLoaderContext-Sound-SoundChannel-combo and tried
    many different combinations, but somehow the Sound object won't let
    go of the bytes it already played. The Sound.bytesLoaded will just
    keep increasing and my memory will just keep being eaten by the
    Flashplayer. Is there any way to free that memory again without
    having to destroy the Sound object? Or if I have to destroy it, how
    do I make sure that the user doesn't realize that I just switched
    the old Sound object with a fresh and empty one?
    I was also trying to get a NetConnection-NetStream-combo to
    play my stream, but here I failed even sooner: Even though the
    NetStream seems to be receiving the data from my server (Firefox
    states that it is receiving data after I invoke
    NetStream.play(url_to_stream)) I'm not able to get that data to
    come out of my speakers. I just can't hear anything :-(
    I'm pretty new to flex, as and flash, so please forgive me my
    ignorance ;) I really tried to figure this one out for about 3 days
    now..
    I'd be very grateful for any hints or advice :-)
    cheers,
    Lorenz
    Edit: oh yeah right: I don't know if this is too obvious, but
    I'm using flex3 :-)

    kurusaki wrote:
    i need to get the serial number of a X509Certificate
    the getSerialNumber() methode of X509Certificat return an BigInteger then can see in (windows application) or in the debuger of eclipse that the serial number is coded in HEXA
    how i can getting it in HEXA.
    If you look at the Javadoc for BigInteger you will see a toString() method that allows one to specify the radix. Hex is just radix 16.

  • Dynamic Variable Naming for Sound Object

    Is it possible to dynamically name a variable? I'd like to
    create a new Sound Object on the fly, so that I can use the
    Sound.load() method multiple times. I would simply like to create
    and name the variable and add a number to the end of the name
    (i.e.; var "audio_1":Sound). I'm sure that this is possible.
    However, I can't seem to get it figured out.

    This code worked great! However, how can I set a global
    variable equal to the newly created Sound Object so that it is
    available globally via a reuseable reference?
    Here's an example of how I attempted to do this. Please note:
    audioObject is a global variable that I am trying to use to
    reference the new Sound Object in various places.
    audioObjectCount is a global variable that I am using to set
    or get the next number to use when dynamically creating the next
    new Sound Object

  • Out of memmory with Sound object

    Hello,
    I have 2k+ of mp3 files and i need form playlist based on id3 tags. When i create air.Sound object in JS I run load() method and get ID3 tags in COMPLETE event handler. After that i create new Sound object for next file and all looks fine but near 900 file I get Out of memmory error. Whats wrong?
    Before create new object I set old variable value to NULL.

    Below is my basic code. I can convert it into something even more bare if needed. Basically I scan the hard drive for mp3 and AAC's, then pass the file object to this class to get the id3 tags. I've tried deleting sound, setting it to null, but no matter what I seem to have the song sticking in memory. It seems to be about 8MB of RAM for each sound object opened.
    NX.Sound = Class.create(,
         getId3Object: function(file, onComplete){
              var urlRequest = new air.URLRequest(file.url);                    
              var soundLoaderContext = new air.SoundLoaderContext(0, false);     
              var sound = new air.Sound();
              sound.addEventListener(air.Event.ID3, function(e){           
                var id3 = air.Sound(e.currentTarget).id3;
                id3.path = file.url;
                id3.title = id3.TIT2;
                id3.artist = id3.TPE1;
                sound.close();
                      onComplete(id3);
              sound.load(urlRequest, soundLoaderContext);

  • Multiple sounds, One sound object.

    So,
    What I want to do is load in a narrative, based on what a
    person is doing in a game. I create a sound object, load in a sound
    and play it. But, once the user does something, i want to stop that
    sound and start up another sound. I don't want to use
    stopAllSounds() because of sound effects and what not. I made a
    custom function. The way my head tells me this will work is that
    when I cue one sound, it will start playing, and if I cue another
    by calling playSound(), it will destroy the old instance (because
    it is stopping it and clearing it by creating a new sound with the
    same name) and start playing my new sound. What is wrong with my
    logic here?
    function playSound (mySound) {
    narrationSound.stop();
    var narrationSound:Sound = new Sound ();
    narrationSound.attachSound (mySound);
    narrationSound.start ();

    Which option?

  • How remove box showing up around sound object

    hi all - can anyone please tell me how to remove the white box that "houses" my sound object:
    http://www.gratefulcreative.com/portfolio.html
    Thanks one million!
    ken d
    creative director
    grateful creative
    www.gratefulcreative.com

    Hi Larry,
    I didn't think that was a default setting for a spreadsheet built within a table, but apparently it is.
    I'm guessing your experience is similar to mine when I first tried out Numbers after years with Excel. I just didn't get it. It was only after I realized the advantages of working with discrete tables (as opposed to Excel's one big sheet) that things got easier, much easier.
    it looks like with so many people complaining they're starting to add features back in. 
    None of us are privy to what is going on within Apple, of course, but just a general knowledge of the complexities of software engineering and the typical lead times suggests that the major features added back in had to have been planned quite some time ago. It seems more are likely in the works.
    Unfortunately, if you have to work with folks who use Office (on Windows) it's still not a great option.
    This depends on what your work involves. I've had few problems in a Window-centric office. In general, if you have to do a lot of printing of precisely formatted documents, Numbers 3 in its current form is not a great choice.
    But if you're interested in collaborating, the iCloud sharing has gotten pretty decent (in some ways better than the MS offering). Anyone on any OS with a modern browser can take advantage of that.
    And if you want to do data entry in the field on a popular mobile device and have it sync automatically back to a computer, Numbers currently has a big leg up on the competition.
    SG

Maybe you are looking for