Actionscript 3: soundComplete event not dispatched by SoundChannel

When i play a sound it stops some miliseconds before the end,
so the soundComplete event does not get dispatched.
Is this a known issue? How can i get ride of this?

pajaroplus,
> When i play a sound it stops some miliseconds before the
> end, so the soundComplete event does not get dispatched.
>
> Is this a known issue? How can i get ride of this?
Would you show the code you're using?
David Stiller
Adobe Community Expert
Dev blog,
http://www.quip.net/blog/
"Luck is the residue of good design."

Similar Messages

  • Mouse Over event not dispatching properly.

    Hi,
    I am working on a scroll for iPhone, in which I'm using touch scrolling, it is working fine with less number of list items, but when I increases the nuber of items in scroll list, the mouse over event not propogates properly, I mean to say those events are overlapping due to some extra memory issue, can any one have any idea about it.
    I'm pasting code for your reference :
    public function IPhoneScroll( pContent:DisplayObjectContainer, pStage:Stage ) {
                                  _stage = pStage;
                                  _myScrollElement = pContent;
                                  _canvasHeight = _myScrollElement.height;
                                  start();
                                  // add handlers
                                  _myScrollElement.addEventListener(MouseEvent.MOUSE_DOWN, on_mouse_down);
                                  _myScrollElement.addEventListener(Event.ENTER_FRAME, on_enter_frame);
                        private function on_enter_frame(e:Event):void {
                                  if ( started )
                                            // decay the velocity
                                            if(_mouseDown) _velocity *= MOUSE_DOWN_DECAY;
                                            else _velocity *= DECAY;
                                            // if not mouse down, then move the element with the velocity
                                            if (!_mouseDown)
                                                      var textHeight:Number = _myScrollElement.height;
                                                      var y:Number = _myScrollElement.y;
                                                      var bouncing:Number = 0;
                                                      // calculate a bouncing when the text moves over the canvas size
                                                      if (y > 0 || textHeight <= _canvasHeight) // textHeight <= _canvasHeight => when the item is smaller than the stage.height, align to the top
                                                                bouncing = -y * BOUNCING_SPRINGESS;
                                                      }else if( y + textHeight < _canvasHeight){
                                                                bouncing = (_canvasHeight - textHeight - y) * BOUNCING_SPRINGESS;
                                                      _myScrollElement.y = y + _velocity + bouncing;
                        // when mouse button up
            private function on_mouse_down(e:MouseEvent):void
                if (!_mouseDown)
                    // get some initial properties
                    _mouseDownPoint = new Point(e.stageX, e.stageY);
                    _lastMouseDownPoint = new Point(e.stageX, e.stageY);
                    _mouseDown = true;
                    _mouseDownY = _myScrollElement.y;
                                            // add some more mouse handlers
                    _stage.addEventListener(MouseEvent.MOUSE_UP, on_mouse_up);
                    _stage.addEventListener(MouseEvent.MOUSE_MOVE, on_mouse_move);
            // when mouse is moving
            private function  on_mouse_move(e:MouseEvent):void
               if (_mouseDown)
                    // update the element position
                    var point:Point = new Point(e.stageX, e.stageY);
                    _myScrollElement.y = _mouseDownY + (point.y - _mouseDownPoint.y);
                    // update the velocity
                    _velocity += ((point.y - _lastMouseDownPoint.y) * SPEED_SPRINGNESS);
                    _lastMouseDownPoint = point;
            // clear everythign when mouse up
            private function  on_mouse_up(e:MouseEvent):void
                if (_mouseDown)
                    _mouseDown = false;
                    _stage.removeEventListener(MouseEvent.MOUSE_UP, on_mouse_up);
                    _stage.removeEventListener(MouseEvent.MOUSE_MOVE, on_mouse_move);
                        public function release():void
                                  _myScrollElement.removeEventListener(MouseEvent.MOUSE_DOWN, on_mouse_down);
                                  _myScrollElement.removeEventListener(Event.ENTER_FRAME, on_enter_frame);
                                  _myScrollElement = null;
    The highlighted part is working properly for less items but not for more number of items, lets say 200 movieclips in scroll lists.
    Please help me on this, thanks in advance.
    Vipul

    Hello.
    Look I have an idea, I donu2019t know if you already try it.
    Please give the format that you want percentage, decimals etc...
    In the Excel where the charts are being directed
    Then redirect de chart to the same cells, these with the porpoise of refreshing
    Now each serie have the format.
    Please let me now what happen with these

  • Actionscript "recording" of events: not every event registers

    Hi.
    I am using a playbar and the hittestObject method to drop instances of movie clips onto the stage, triggered by 16 pads on the screen.  When I test the mini-application, most of my events register and drop a movie clip onto the stage. (These movie clips are "events" in themselves as they will interact with a second playback bar which will play a sound when the bar hits the recorded note.)
    However why don't all of my events register?  I can post the code if necessary, but I will have to post only the critical parts as i recall that my code is rather long for posting in a usable forum post.
    Thanks in advance,
    -markerline
    P.S.:   here is the partial code
    function onTBoxPlayBackingPlay(e:Event):void{
        //trace("___________hello");
        if(e.target.hitTestObject(myPlayBackingBar)){
             e.target.play(); 
            var tmc:MovieClip=e.target.getChildAt(0) as MovieClip;
            tmc.play();
            trace("hit1");
    //================
    function onTBoxMouse(e:MouseEvent):void{
        CPressed=true;
        //if(myRecorDingGoing){
        //e.target.play();
        if(e.target){
            CPressedArr.push(e.target.name);
            trace(CPressedArr+":CPRESSEDARR============="+CPressedArr.length+" LENGTH");
            trace(CPressed+":CPRESSED");
                for(var i:int=1;i<10;i++){
                    trace(i+" :i ==================");
                    if(e.target.name==String(CPressedArr[i-1])){
                    var tbox:MovieClip=new MovieClip();
                    //tbox=MovieClip(getChildByName("box0"+i+"_mc"));
                    C=Class(getDefinitionByName("box0"+String(i)+"_mc"));
                    if(myRecorDingGoing){
                    tbox.addChild(new C());
                    CPressedArrText.text=String(CPressedArr.length);
                    tbox.width=20;
                    tbox.height=20;
                    tbox.stop();
                    var tmc:MovieClip=tbox.getChildAt(0) as MovieClip;
                    tmc.stop();
                    //tmc.name=String(i);
                    //tmc.addEventListener(Event.ENTER_FRAME, onTBoxEnterFrame);
                    tbox.x=myRecorDingBar.x/2.35+600;
                    tbox.y=Number(String(CPressedArr[i-1]))*tmc.height+1;
                    //C.stop();
                    addChild(tbox);
                    CObj.push(tmc);
                    trace(CObj+" CObj is not null");
                    if(CObj==null){
                        trace(CObj+" is null");
                        CObj=[];
                        CObj.push(tmc);
                    tbox.addEventListener(Event.ENTER_FRAME, onTBoxPlayBackingPlay);
                    tbox.addEventListener(Event.ENTER_FRAME, onTBoxPlayBackingPlayStop);
                    tbox.addEventListener(MouseEvent.CLICK, onTBoxDelete);
                    trace(C);
    /////////=======================
    Message was edited by: markerline

    Read up the differences between target/currentTarget
    http://stackoverflow.com/questions/8517437/as3-difference-between-target-vs-currenttarget
    In most usecases, especailly with nested MovieClips, you have the best control over events with currentTarget.
    Another problem is your usage of enterframe listners:
    tbox.addEventListener(Event.ENTER_FRAME, onTBoxPlayBackingPlay);
    tbox.addEventListener(Event.ENTER_FRAME, onTBoxPlayBackingPlayStop);
    you add 2 differnt functions listening to the same event inside a for-loop.
    That makes no sense.
    add instead one ENTER_FRAME Listener to the stage
    outside of any other  functions/loops
    and put any logic inside there

  • Sound - 'complete' event vs. SoundChannel - 'soundComplete' event

    Hi,
    Can anybody here explain practical difference between:
    complete event of of Sound class and soundComplete event of SoundChannel class ?
    What are exact differences between the two? When precisely are both events dispatched? Are they dispatched always together or not - which one is first?
    Documentation is very laconic in this case (as usual mostly...).
    Thanks ahead !

    Sound class
    This doesn't actually have a complete event (in the way you might be thinking of). What you might be refering to (in the AS Docs) is usage of the flash.events.Event.COMPLETE event. This is only used for loading sound files, and tells you when the data has successfully loaded. So, typically, you'd just use the Sound class to manage the loading of things...
    SoundChannel class: flash.events.Event.SOUND_COMPLETE
    This is what should be used for detecting the completion of audio. The SoundChannel class is what you'd want to use to control the stopping/pausing/playing of things.
    private var _s:Sound;
    private var _sc:SoundChannel;
    When loading audio...
    _s = new Sound();
    _sc = new SoundChannel();
    _s.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
    _s.load(new URLRequest(url));
    When playing audio...
    _sc = _s.play();
    _sc.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);

  • If OSMFSettings.enableStageVideo true, then click event from the MediaContainer is not dispatch.

    Hi!
    I use org.osmf.vast.mediaVAST2TrackingProxyElement from the VASTLibrary for display advertising and use click to handle advertisement redirection.
    It's works for flash.media.Video.
    But after setting OSMFSettings.enableStageVideo = true, the click event from the MediaContainer is not dispatch.
    Can you please help?

    Actually, I looked briefly at the dev guide this week end, and Stage Video actually renders from the GPU under the Actionscript App.
    It could be something like this:
    Stage video is behind the Actionscript objects and one of them is as big or bigger than the video rendering rectangle and it is grabbing mouse interaction.
    Just speculating.
    Also, I'm not certain StageVideo can recieve mouse events...
    Hope this helps.

  • Flex 4 does not dispatch keyboard events for ENTER key.

    Hello everyone. I think I have a strange problem with Flex 4 Beta (4.0.0.8909). My application has had event listener for keyUp event for a month now and suddenly (two days ago) I've noticed that keyUp event is not dispatched for ENTER (ALT also) key. Anyone know why? By the way, I've tried this with keyDown event, also 4.0.0.8847 version of SDK - still the same: no keyboard events for ENTER (and ALT) key.
    Here is the sample application that has got this issue:
    <s:Application
       xmlns:fx="http://ns.adobe.com/mxml/2009"
       xmlns:s="library://ns.adobe.com/flex/spark"
       xmlns:mx="library://ns.adobe.com/flex/halo"
       minWidth="640" minHeight="480"
       keyUp="application1_keyUpHandler (event)">
       <fx:Script>
          <![CDATA[
             import mx.controls.Alert;
             protected function application1_keyUpHandler (event: KeyboardEvent):void
                Alert.show ("Key up: " + event.keyCode);
          ]]>
       </fx:Script>
       <s:layout>
          <s:BasicLayout/>
       </s:layout>
       <s:TextArea verticalCenter="0" horizontalCenter="0" width="200"/>
    </s:Application>
    If you run this application and try typing anything in a TextArea you will get alerts with key codes. However, if you press ENTER (or ALT), you will get no alert.
    I'm pretty sure the code above is right so that means there is a bug in latest nightly builds of SDK (i would swhitch to an older build if i knew which one does not have this bug).
    Any ideas?

    Flex harUI wrote:
    That's true, but in this case, I think the text editing code is eating ENTER key in order to prevent parents from seeing it and acting on it (like a submit button).  We'll see if we can find a way around that.
    You can get the ENTER key now by listening in capture phase.
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui
    The enter key isn't being disposed of by textedit, the attached example code works without error if you a- remove the alert box and b-set the focus to your text area on initialisation. I agree that pressing the enter key then calling a dialog box will result in the enter key being "gobbled up" as  the enter key is overridden by the dialog box code.
    I think the first suggestion should be to anyone don't use dialogboxes for testing code. If for some reason debugging isn't desirable instead of a trace statement a simple label  can be used as a 'fake' trace.
    David
    Message was edited by: David_F57: I worded this wrong, imho there is no need for a work around, the textarea component works as it should. When intercepting 'system' keycodes there is a need to consider the effect of the intercept and code appropriately to that end.

  • Some events are not dispatched when app runs in background

    My Android app has a TIMER event which fires once every second to connect a TCP socket (class flash.net.Socket) and send a request.
    A packet sniffer confirms that a socket is in fact connecting, request is sent, reply comes back and connection is closed, all happening once per second.
    Clearly, even with the app in the background, the TIMER event is occurring every second, because the timer handler is initating every socket.
    But not every closing connection causes a CLOSE event to dispatch, because my close handler is called less frequently.  Sometimes once in 3 seconds, 8 seconds or even longer.
    The CLOSE dispatches correctly once per second when the app is in the foreground.
    Why are CLOSE events being missed when the app is in the background?  What is the difference between a TIMER event and a CLOSE event, causing one to dispatch correctly but not the other?
    Thanks.

    I've narrowed my problem down by chopping pieces of code until it works, and I think I have it narrowed down to the code that uses FlexGraphing but need to check a bit more...
    It's odd that it works in Flex3 builder though, and there are no errors when I run in as AIR. In fact, the app RUNS, since it is in the task manager, but it won't appear.

  • Flex 4.1 - creationComplete event is not dispatched in nested Containers

    Hi all,
    We are migrating our application to use Flex 4.1 from Flex 3.5.
    Our application is pretty complicated with tons of custom components. I noticed that when we use nested containers the creationComplete event is not dispatched. I narrowed it down to the following: We have application that has a child component which is an extension of an extension of Panel, that child component has one VBox child. The creationComplete event is not dispatched for that VBox even after I set the creationPolicy to "all" on all Containers.
    Any thoughts?
    Thanks,
      Lilit

    The actual issue ended up being the width of the VBox - it was set to this.width (I did not write the code ) and it got into an infinite loop where the child component (VBox) was trying to set the width to the parent's width and the parent tried adjust its width to the children so it kept growing and growing. Not sure why this works in Flex 3.5 but not in 4.1. Looks like an issue with the Panel.

  • FileRefrence.browse does not dispatch select event in some cases

    In my flex web application, filereference.browse  sometimes does not dispatch any select event. I am using flex sdk 4.6.

    What happens if you put table Table_1 into the Analytic View?
    Also go ahead and and update HANA, Rev.60 is very old by now.

  • [svn:osmf:] 13027: Fix bug in SerialElement where the durationReached event was dispatched on a child-to-child transition due to the base class thinking that the duration had been reached  (since the second child didn't have a duration yet).

    Revision: 13027
    Revision: 13027
    Author:   [email protected]
    Date:     2009-12-16 18:09:46 -0800 (Wed, 16 Dec 2009)
    Log Message:
    Fix bug in SerialElement where the durationReached event was dispatched on a child-to-child transition due to the base class thinking that the duration had been reached (since the second child didn't have a duration yet).  Injection from trait refactoring.
    Modified Paths:
        osmf/trunk/framework/MediaFramework/org/osmf/composition/CompositeTimeTrait.as

    http://ww2.cs.fsu.edu/~rosentha/linux/2.6.26.5/docs/DocBook/libata/ch07.html#excatATAbusErr wrote:
    ATA bus error means that data corruption occurred during transmission over ATA bus (SATA or PATA). This type of errors can be indicated by
    ICRC or ABRT error as described in the section called “ATA/ATAPI device error (non-NCQ / non-CHECK CONDITION)”.
    Controller-specific error completion with error information indicating transmission error.
    On some controllers, command timeout. In this case, there may be a mechanism to determine that the timeout is due to transmission error.
    Unknown/random errors, timeouts and all sorts of weirdities.
    As described above, transmission errors can cause wide variety of symptoms ranging from device ICRC error to random device lockup, and, for many cases, there is no way to tell if an error condition is due to transmission error or not; therefore, it's necessary to employ some kind of heuristic when dealing with errors and timeouts. For example, encountering repetitive ABRT errors for known supported command is likely to indicate ATA bus error.
    Once it's determined that ATA bus errors have possibly occurred, lowering ATA bus transmission speed is one of actions which may alleviate the problem.
    I'd also add; make sure you have good backups when ATA errors are frequent

  • TemporalProxyElement does not dispatch new Duration

    Hi
    Following my last discussion, where I asked help to add a temporal trait to a ImageElement, and get it by wrapping it to a TemporalProxyElement I discovered that although it works great , but, does not dispatch a change Duration event. I made a custom playlist (not osmf sequence) and have certain issues with it. There is any workaround for this? How can I get that when loading the TemporalProxyElement as MediaPlayer Element it dispatches this event?
    Thanks..
    Chaim

    This is a known issue, related to two separate bugs.  The first is that we'd like MediaPlayer to dispatch certain events (such as durationChange) even when the underlying MediaElement simply picks up the trait which holds the event, but currently it only dispatches the MediaPlayerCapabilityChangeEvent.  If you were to register for this event (the temporalChange event), then upon receiving this event you could query the duration property and have the right value. But right now you don't get that event either, because TemporalProxyElement doesn't dispatch events at the right time.  This is filed as bug FM-126.

  • All day calendar events not being displayed in the notification centre for iphone 5 post ios 7 upgrade. Please help. Is it a bug?

    All day calendar events not being displayed in the notification centre for iphone 5 post ios 7 upgrade. Please help. Is it a bug?
    With iOS 6, the all day events showed up in the notification centre but it lacks in the upgrade iOS 7.

    Same problem here. Some people pointed out that all-day events do show up in their notification center, but that seems only to be the case for birthdays (and only as text like the weather). I've tried it myself on my iPhone and iPad and it did work for birthdays but not for any other all-day events. I already sent this to Apple as a product feedback as well, as should everyone of you. The more people mention it, the faster Apple's going to fix this issue. In its current state, notification center is not a very helpful feature in my opinion. There's absolutely no point in not showing all-day events in the 'today' calendar overview.
    Here's a link to the product feedback page: http://www.apple.com/feedback/
    I posted my message in the iPhone section since I couldn't find a page specifically dedicated to iOS 7.
    I really love the look &amp; feel of iOS 7 but it's kinda sad to see notification center not tapping its full potential.
    Cheers!

  • The apexafterrefresh event not being fired in Chart IR's

    Hi all,
    I am adding additional functionality to IR reports using the plug-in architecture in Apex 4.1.1. A Dynamic action has been added to the "After Refresh" event for the #apexir_WORKSHEET_REGION jQuery selector.
    This works fine in all cases except when no data is found in the report. This has been fixed in 4.2 so I can live with this until the upgrade. However, it also does not work when a chart is created in the report, the apexafterrefresh event does not get raised. Therefore my dynamic action will not fire. Looking at the apex_interactive_reports_4_1.js this event gets raised for the table element with an ID stored in apexir_WORKSHEET_ID ie:
    apex.jQuery('#' + $v("apexir_WORKSHEET_ID")).trigger('apexafterrefresh', that.report_id);However this table element does not get rendered when a Chart is displayed and therefore the apexafterrefresh will not get raised.
    In apex 4.2 the widget.interactiveReport.js has been modified to handle the no data found but not charts:
    var lTriggeringElement$, lWorksheetId;
                            lWorksheetId = $v( "apexir_WORKSHEET_ID" );
                            if ( $x( lWorksheetId ) ) {
                                // If the table element containing data exists (ie when the report returns rows),
                                // use that to trigger the event.
                                lTriggeringElement$ = apex.jQuery( '#' + lWorksheetId );
                            } else {
                                // Otherwise, use the span holding the no data found message.
                                lTriggeringElement$ = apex.jQuery( '#apexir_NO_DATA_FOUND_MSG' );
                            lTriggeringElement$.trigger( 'apexafterrefresh', that.report_id );I have created a test case on apex.oracle.com - http://apex.oracle.com/pls/apex/f?p=41357:1 In this example I simply display an alert from a Dynamic action with the following attributes:
    Event - After Refresh
    Selection Type - Region
    Region - Interactive Report
    As can be seen when the user navigates to the report the alert displays, however when you navigate to the Chart the alert does not display.
    In my mind this is a bug and the IR reports JavaScript should be modified to raise the event apexir_WORKSHEET DIV Element instead. This would fix both issues.
    Any ideas on how to overcome this issue?
    Thanks
    Chris.

    For everyone's information Bug 16029272 - ALERT (APEXAFTERREFRESH EVENT) NOT BEING FIRED IN CHART OF INTERACTIVE REPORTS has been raised regarding this issue.

  • Print iCal Event Notes ("info")

    I couldn't believe that my version of iCal (1.5.5 with Panther) can print a calendar, but cannot print the Event Notes from the "info" pane, with the calendar...
    Tell me it's not true!
    Presumably, a calendar user would use the Event Notes (in the "info" pane) to record important detail about an event: the doctor's office address and phone(s), the conference call number and passcode, and such...
    Can Tiger's iCal 2 do this?

    I haven't figured it out either - kind of makes it worthless to print if you can't see the details, only the header. and you can't iSync the details to a phone or PDA either. huge miss on apple's part if we're not missing something....

  • How can I display event notes on the relevant event in week/day view?

    Hi folks,
    I'm looking for a way to display the event notes on the actual event in week or day view.
    This will greatly help plan out my week (especially for repetitive events with custom notes for each occurrence).
    I can understand that Apple ommitted this feature to avoid clutter on short-duration events perhaps?
    Clicking on the event (or using the Inspector) to see the notes is not an option. I need an overview that can be viewed at a glance or even printed.
    Looking forward to your suggestions...
    Trev

    Hi Trev,
    With iCal as it is the only suggestion I have would be to add the full text to the title of the events.
    FYI, this is a user to user forum. By posting here you are not guaranteed someone from Apple will read it. If you'd like Apple to know about this I suggest you send them feedback.
    Best wishes
    John M

Maybe you are looking for

  • Help with HP 8610

    when I hit print My print goes to a file then into documents then pdf then print , lord how do I get it to just go to the printer I dont want it in a file

  • Metadata not displaying properly in movie list view 12.1.0.50

    Has anyone had issues with metadata not displaying properly in iTunes iTunes 12.1.0.50? Seems since the last update or maybe even before that the metadata is not displaying properly in the movies/list view window. All seems fine in the movies window

  • Login Issues at the Forum

    If I try to enter the forum area, it rejects my login with no error message. I've tried my VZ account creds and my forum creds. However, if I go to verizon.net, I can log in there and then click my way to the forum area. What's up with that???

  • Console

    Hi I am having weblogic 6.1 sp4. We are seeing strange behavious or admin console. We startup the admin server and see server status both as running. After 2 days we i see the server status it shows admin as running and managed server as blank. I try

  • Trouble with safari after updating SL 10.6.8

    I updated my OS last night to 10.6.8  and today, in Safari I find that I cannot view amazon.com  When I open a page, much of it is blank.  Anyone else having trouble with amazon after updating to 10.6.8? michelle