Document Load Completion Event

Does anyone know the last file or function that is called DW
completes opening a document?

Are you looking to run a command after the user opens a
document? For that you need to create a command that end in
"_onOpen.htm" like foo_onOpen.htm. You can look at Design
Notes_onOpen.htm as an example. It looks like CommunityMX has a
tutorial on this as well:
http://www.communitymx.com/abstract.cfm?cid=848F7
If this doesn't answer your question can you provide more
details with what you'd like to do?
Thanks

Similar Messages

  • Map (loading) completed event

    Hi forum,
    is there an event which let me know that the loading process of an oraclemaps mapview object and overview object is completed? (MapViewer10.1.3.1)
    Regards Arnd.

    You need to convert the VOB files back to DV which iMovie is designed to handle. For that you need mpegStreamclip:
    http://www.apple.com/downloads/macosx/video/mpegstreamclip.html
    which is free, but you must also have the Apple mpeg2 plugin :
    http://www.apple.com/quicktime/mpeg2/
    which is a mere $20.
    Another possibility is to use DVDxDV:
    http://www.dvdxdv.com/NewFolderLookSite/Products/DVDxDV.overview.htm
    which costs $25.
    For the benefit of others who may read this thread:
    Obviously the foregoing only applies to DVDs you have made yourself, or other home-made DVDs that have been given to you. It will NOT work on copy-protected commercial DVDs, which in any case would be illegal.

  • Why does URLStream complete event get dispatched when the file is not finished loading?

    I'm writing an AIR kiosk app that every night connects to a WordPress server, gets a JSON file with paths to all the content, and then downloads that content and saves it to the kiosk hard drive. 
    There's several hundred files (jpg, png, f4v, xml) and most of them download/save with no problems.  However, there are two f4v files that never get downloaded completely.  The complete event does get dispatched, but if I compare the bytesTotal (from the progress event) vs bytesAvailable (from the complete event) they don't match up; bytesTotal is larger.  The bytesTotal (from the progress event) matches the bytes on the server. 
    The bytesLoaded in the progress event never increases to the point that it matches the bytesTotal so I can't rely on the progress event either.  This seems to happen on the same two videos every time. The videos are not very large, one is 13MB and the other is 46MB.  I have larger videos that download without any problems.  
    [edit] After rebooting the compter, the two videos that were failing now download correctly, and now it's a 300kb png file that is not downloading completely.  I'm only getting 312889 of 314349 bytes.
    If I paste the url into Firefox it downloads correctly, so it appears to be a problem with Flash/AIR.
    [edit] I just wrote a quick C# app to download the file and it works as expected, so it's definitely a problem with Flash/AIR. 
    Here's the code I'm using:
    package  {
        import flash.display.Sprite;
        import flash.events.Event;
        import flash.events.ProgressEvent;
        import flash.net.URLRequest;
        import flash.net.URLStream;
        [SWF(backgroundColor="#000000", frameRate="24", width="640", height="480")]
        public class Test extends Sprite {
            private var fileSize:Number;
            private var stream : URLStream;
            private var url:String = "http://192.168.150.219/wordpress2/wp-content/uploads/2012/12/John-Butler-clip1.f4v";
            public function Test() {
                if (stage)
                    init();
                else
                    this.addEventListener(Event.ADDED_TO_STAGE, init);
            private function init(e:Event=null):void {
                this.removeEventListener(Event.ADDED_TO_STAGE, init);
                stream = new URLStream();
                stream.addEventListener(ProgressEvent.PROGRESS, onLoadProgress);
                stream.addEventListener(Event.COMPLETE, onLoadComplete);
                stream.load(new URLRequest(url));
            private function onLoadProgress(event:ProgressEvent):void {
                fileSize = event.bytesTotal;
                var percent:Number = event.bytesLoaded / event.bytesTotal * 100;
                trace(percent + "%");
            private function onLoadComplete(event:Event):void {
                trace("loaded", stream.bytesAvailable, "of", fileSize);
                // outputs "loaded 13182905 of 13184365"
                // so why is it "complete" when it isn't finished downloading?

    Thanks for your quick reply !
    I am relatively new to programming so please bear with me on this as I still haven't managed to grasp some of those things that "make perfect sense". If I am setting mouseEnabled to false doesn't that mean that the object no longer gets MouseEvents ?
    If I have understood you correctly then once the mouseEnabled is set to false the btn object is removed from the objects recognizable by the mouse - hence dispatching a mouseout event (and I am guessing here) from the mouse?
    I still don't get it though, if the listeners are set to the object and the object is no longer accessible to the mouse why is the event still being dispatched ?
    I get it that the making of the object unavailable to the mouse causes the "removing" (deactivating) of the object from under the mouse,
      step 1. deactivate object, and  step 2. (as a result of step 1) register the removal of the object.
    but why is the mouse still listening after step 1?
    Even if the action is that of "out" (as in the object is no longer under the mouse) it still is an action isn't it ? so haven't we turned off the listening for actions ?
    I promise I am not trying to drive you crazy here, this is just one of those things that I really want to get to the root of !
    Thanks,

  • HP office jet pro 8600- "No document loaded" error message with OS Mavericks 10.9.1 when scanning

    I am unable to scan from either my HP officejet pro 8600 printer or  my iMac, using OS Mavericks 10.9.1.  From computer, message in sequence are:  1) Waiting for scanner 2) no document loaded and 3) scanner failed to complete the scan (this after changing defaults to match type of feed and document.  I can print and copy fine.
    From the printer, I receive the following messages:  Scan could not be completed due to one or more of the following:
    1) Connection to computer is lost, 2) The scan application or computer is currently in use (Not that I can see) and 3) OCR application is not installed on the computer (have installed and re-installed driver several times, with help of HP customer support person).
    I have spent 1-1/2 hours on the phone with an hp customer  support person trying to resolve the problem, based on the above results.  I have also read the solutions on this forum, none of which seemed to either apply or work.

    Hi Trishan,
    I know you have done a great deal of troubleshooting already and have invested more time than I am sure you would like to have, but I have a document for you to use. I have seen success from those who have used this document.
    Communication Error between the Scanner and Your Computer in Mac
    You will find, after opening the link, that the 10.9 is not listed; however, this document does apply to all of the Mac operating systems.
    I hope this helps.
    Please click the Thumbs up icon below to thank me for responding.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
    Sunshyn2005 - I work on behalf of HP

  • Not receiving COMPLETE event in URLLoader

    Hi:
    I'm querying a web application in a remote server through XML files and receiving answers in the same file format. Until now, sometimes I received a connection error:
    Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: http://server/Services/startSesion.com
        at reg_jugadores_fla::MainTimeline/queryGQ()
        at reg_jugadores_fla::MainTimeline/reg_jugadores_fla::frame1()
    When this occurs, trying to access the services through a web browser, there's a test page where you can try queries, returns a "500 Internal server error". I managed that problem adding a listener to catch the error:
    xmlSendLoad.addEventListener(IOErrorEvent.IO_ERROR, catchIOError);
    But since yesterday I can't connect anymore using Flash while it's possible to access the test page. I'm not able to talk to any support guy as the company is closed for vacations! I added listeners to try to know what's happening and this is the result in the output window:
    openHandler: [Event type="open" bubbles=false cancelable=false eventPhase=2]
    progressHandler loaded:154 total: 154
    httpStatusHandler: [HTTPStatusEvent type="httpStatus" bubbles=false cancelable=false eventPhase=2 status=200]
    AFAIK, status=200 means OK but why the COMPLETE event isn't dispatched?. So, is there anything I can do or just wait until the tech guys return from the beach?
    Thanks in advance
    queryGQ(sessionURL,sessionQS);  // Start session
    stop();
    function queryGQ(url:String,qs:String):void {
    var serviceURL:URLRequest = new URLRequest("http://server/Services/"+url);
    serviceURL.data = qs;
    serviceURL.contentType = "text/xml";
    serviceURL.method = URLRequestMethod.POST;
    var xmlSendLoad:URLLoader = new URLLoader();
    configureListeners(xmlSendLoad);
    xmlSendLoad.load(serviceURL);
    function configureListeners(dispatcher:IEventDispatcher):void {
    dispatcher.addEventListener(Event.COMPLETE, loadXML);
    dispatcher.addEventListener(Event.OPEN, openHandler);
    dispatcher.addEventListener(ProgressEvent.PROGRESS, progressHandler);
    dispatcher.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
    dispatcher.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler);
    dispatcher.addEventListener(IOErrorEvent.IO_ERROR, catchIOError);
    function openHandler(event:Event):void {
    trace("openHandler: " + event);
    function progressHandler(event:ProgressEvent):void {
    trace("progressHandler loaded:" + event.bytesLoaded + " total: " + event.bytesTotal);
    function securityErrorHandler(event:SecurityErrorEvent):void {
    trace("securityErrorHandler: " + event);
    function httpStatusHandler(event:HTTPStatusEvent):void {
    trace("httpStatusHandler: " + event);
    function ioErrorHandler(event:IOErrorEvent):void {
    trace("ioErrorHandler: " + event);

    Hugo,
    View may not fire events. View may call method on other controller (component / custom) and this controller fires event.
    You are absolutely right: in WD only instantiated controllers receives the event, event itself does not cause controller instantiation.
    The only controller that is always instantiated is component controller.
    Custom controllers instantiated on demand when their context is accessed or user-defined method called.
    As far as view may not have externally visible context nodes and methods (you may not add view controller as required to other one and use nodes/methods of view), the only time when view is instantiated is when it get visible for first time.
    To solve your problem, try the following:
    1. Save event parameters to component controller context node element before firing event.
    2. Create mapped node in target view and set node from controller as source.
    3. In wdDoInit of target view insert the following code:
    wdThis.<eventHandlerName>(
    null, //no wdEvent
    wdConext.current<NameOfMappedNode>Element().get<NameOfParamA>(),
    wdConext.current<NameOfMappedNode>Element().get<NameOfParamB>(),
    Valery Silaev
    SaM Solutions
    http://www.sam-solutions.net

  • VideoPlayer complete event firing early

    I'm not sure why this is happening, but for some reason the complete event is firing about 5-10 seconds into my minutes long video.
    Here is the code for the VideoPage that loads the video and listens for the events. Does anything seem off to anyone?
    package com.applied.flex.pages
         import com.applied.flex.events.PageEvent;
         import flash.events.ProgressEvent;
         import spark.components.VideoPlayer;
         import spark.events.VideoEvent;
         public class VideoPage extends BasePage
              private var _video:VideoPlayer;
              private var _startTime:uint = 0;
              private var _endTime:uint;
              private var _cuePoints:Array;
              private var _displayedPoints:Array;
              private var resetting:Boolean = false;
              private var seekSafe:Boolean = true;
              public var readyToStart:Boolean = false;
              public function VideoPage(xml:XML,majorType:String,minorType:String,path:String)
                   super(xml,majorType,minorType,path);
                   _video = new VideoPlayer();
                   if(xml..Video[0].@StartTime != undefined)
                        _startTime = xml..Video[0].@StartTime;
                   if(xml..Video[0].@EndTime != undefined)
                        _endTime = xml..Video[0].@EndTime;
                   _cuePoints = new Array();
                   for each(var i:XML in _pageXML.Video.CuePoints.children())
                        _cuePoints.push(i.@OnTime);
                   _video.addEventListener(VideoEvent.READY,doVideoReady);
                   _video.source = path;
                   this.addChild(_video);
              private function doVideoReady(e:VideoEvent):void
                   _video.removeEventListener(VideoEvent.METADATA_RECEIVED,doVideoReady);
                   if(_pageXML..Video[0].@EndTime == undefined)
                        _endTime = _video.totalTime;
                   readyToStart = true;
                   this.dispatchEvent(new PageEvent(PageEvent.READY_TO_START,false,false,0,this));
              public override function startPage():void
                   addListeners();
                   _video.seek(_startTime);
              public override function resumePage():void
                   addListeners();
                   _video.play();
              public override function pausePage():void
                   removeListeners();
                   _video.pause();
              public override function stopPage():void
                   removeListeners();
                   var ar:Boolean = _video.autoRewind;
                   _video.autoRewind = true;
                   _video.stop();
                   _video.autoRewind = ar;
              public function seekPage(seekTo:Number):void
                   if(seekSafe)
                        removeListeners();
                        _video.pause();
                        _video.addEventListener(VideoEvent.PLAYHEAD_UPDATE,doSeekSafe);
                        _video.seek(seekTo);
                        seekSafe = false;
              private function doSeekSafe():void
                   _video.removeEventListener(VideoEvent.PLAYHEAD_UPDATE,doSeekSafe);
                   addListeners();
                   _video.dispatchEvent(new VideoEvent(VideoEvent.PLAYHEAD_UPDATE));
                   seekSafe = true;
              private function addListeners():void
                   _video.addEventListener(VideoEvent.COMPLETE,dispatchPageComplete);
                   _video.addEventListener(VideoEvent.PLAYHEAD_UPDATE,doVidProgress);
              private function removeListeners():void
                   _video.removeEventListener(VideoEvent.COMPLETE,dispatchPageComplete);
                   _video.removeEventListener(VideoEvent.PLAYHEAD_UPDATE,doVidProgress);
              private function doVidProgress(e:VideoEvent):void
                   var scrubObj:Object = new Object();
                   scrubObj.currentTime = (e.currentTarget as VideoPlayer).playheadTime;
                   scrubObj.totalTime = _endTime - _startTime;
                   trace("playheadTime | "+e.currentTarget.playheadTime);
                   trace("end time | "+_endTime);
                   dispatchUpdateScrubber(scrubObj);
                   checkForCuePoint(e);
                   if(_video.playheadTime >= _endTime)
                        dispatchPageComplete();
              private function checkForCuePoint(e:VideoEvent):void
                   if(_cuePoints.length > 0)
                        if( (e.currentTarget as VideoPlayer).playheadTime > _cuePoints[0].toString() && !resetting )
                             var item:Object = new Object();
                             item.point = _pageXML..CuePoints[_displayedPoints.length].toString()+"<br><br>";
                             dispatchUpdateScrubber(item);
                             _displayedPoints.push(_cuePoints.shift());                         

    Not sure if you found an answer to your problem, but I have come across this a few times, and I eventually found that is was a "corrupted" FLV.  It seems as though at a given point in the encoding process, there is a little "skip".  This skip causes the COMPLETE event to fire when there might be a good amount of video left in the file.  Try making the FLV in a different encoding program and see if you still have your problem.

  • Where is the COMPLETE event of s:VideoPlayer ?

    I want to listen to the Event.COMPLETE of the s:VideoPlayer but cannot find the actual loaderInfo object.
    I tried the loaderInfo Object of VideoPlayer and its videoDisplay and videoObject children. They do not dispatch a COMPLETE event.
    Where is the event that dispatches when the video files has finished loading?
    Thanks,
    David

    I think the complete event is dispatched when the playhead reaches the duration for playable media.
    You can probably just use the bytesLoaded event and check if the bytesLoaded == bytesTotal, as seen in the following example:
    <?xml version="1.0" encoding="utf-8"?>
    <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/mx">
        <fx:Script>
            <![CDATA[
                import mx.controls.Alert;
                import org.osmf.events.LoadEvent;
                protected function vidDsp_bytesLoadedChangeHandler(evt:LoadEvent):void {
                    var trgt:VideoPlayer = evt.currentTarget as VideoPlayer;
                    if (trgt.bytesLoaded == trgt.bytesTotal) {
                        Alert.show("Yeah, I'm loaded...");
            ]]>
        </fx:Script>
        <s:VideoPlayer id="vidDsp"
                source="http://helpexamples.com/flash/video/caption_video.flv"
                bytesLoadedChange="vidDsp_bytesLoadedChangeHandler(event);" />
    </s:Application>
    Peter 

  • Multiple loaders, one complete event

    Hi,
    What i have:
    I have a buch of data stored in a sqlite db.
    Getting that data is no problem.
    With that data i get 2 image paths to locally stored images.
    Now i want to send the data to a server using a remoteObject and amfphp.
    Getting to the server and sending plain text is no problem.
    Now my images.. what i need to do is get the url of my image, load the image and convert it to bitmapdata, so i can send it to the server.
    On the server I let php take care of the bitmapdata and save the image.
    This way i know when the total saving of one item is done, and i can send a message back to flex.
    You may ask.. why don't you let flex take care of the saving on the server. Well, if i do that, i have seperate saving of the text data and the image. If the image is saved, the text data needs to be saved, so the path to that image is correct.
    Anyways,
    Is it possible to load 2 images using loader, and have one complete event?
    Or is there a better solution to get 2 bitmapdata's of the images.. so i can send all data of one item at once.
    (item contains name, infotext, fullimgurl, thumbimgurl)
    Please some help.
    Greets, Jacob

    By that I meant that I'm using my cell phone to read post and publish 
    post to Adobe Forums so I could've probably misunderstood something.
    You could create a VO and wrap the two images inside the object and 
    then send the VO to your server, I dunno if this works but I'd give it 
    a shot.
    Sincerely,
    Michael
    El 11/05/2009, a las 8:41, Starlover_jacob <[email protected]> escribió:
    >
    hi,
    yess, I was thinking about something like a bytearray, but then I 
    would need a loader and on the load complete, I'll convert it to a 
    bytearray right?
    >
    The thing is I have 2 images. so I have some difficulty 
    understanding how I can load both images.. convert them to 2 
    bytearrays. and then send it along with all the textual data to the 
    server all at once.
    >
    Zipping it was more a way to hold all things together. (textual 
    data, and 2 images)
    >
    How to save the bytearray into files again on the server side is 
    another problem witch I'll research later.
    >
    and what did you mean by;
    Forgive me if I misunderstood something but Adobe Forums doesn't make
    your life easy when you use a cell phone.
    >
    I am building an air app just for on a windows or mac.
    I am not building something for a cell phone. If that's what you 
    meant by it
    >

  • SWFLoader/Image complete event problem (bug?)

    I have an SWFLoader in my application whose content is
    dynamically bound to a datagrid for loading different images.
    Depending on the new image size I want to make some adjustments,
    etc. to the SWFLoader itself... that's not important for now.
    The problem is that if I take the width of the SWFLoader
    instance on the "complete" event, it gives the value for the
    PREVIOUS image setting so my math function is useless.
    Try this to see what I mean:
    [Bindable]
    public var imageSource:String;
    private function temp():void {
    mx.controls.Alert.show("imgLoader.width: "+imgLoader.width);
    <mx:Button click="imageSource='someImageURL'" />
    <mx:SWFLoader id="imgLoader" autoLoad="true"
    source="{imageSource}" complete="temp()" />
    if you implement the above code, and assuming that
    imageSource is a null string upon initialization, you will get a
    value of "0" for the imgLoader instance's width when you load a new
    image.
    To get around this in Flex 1.5 I could use doLater(this,
    "temp") but doLater appears to have been removed in Flex 2.0.
    My current work around is to modify the above code as
    follows:
    private function temp():void {
    this.addEventListener("enterFrame", blorch);
    private function blorch(b:Event):void {
    mx.controls.Alert.show("imgLoader.width: "+imgLoader.width);
    this.removeEventListener("enterFrame", blorch);
    feels like a hack to me... is there no way to get this to
    work without using the above functions? Sort of seems pointless to
    have removed "doLater" just to make me write a function that
    essentially does the same thing in Flex 2.0. I tried using the
    "resize" event in place of "complete" and that works... if the
    image loaded is a different size than the previous one. If the
    image is the same size (as is often the case in my application)
    then it doesn't work.
    Any suggestions Adobe/Macromedia, fellow developers?

    Flex harUI -
    two solutions to this then are:
    1) use the callLater() function or
    2) extend the SWFLoader class...
    I don't want to increase my component files so I will stick
    with the callLater() setup.
    Haskasu -
    I tried init. It has the same result as complete. If I insert
    code like this: init="mx.controls.Alert.show(imgLoader.width)" I
    get the width for the *previous* setting (same as complete) and not
    the new setting.

  • How can i hnow the applet had load complet by javascript?

    hi,how can i hnow the applet had load complet by javascript?
    my applet load by <object> tag,
    i add a "onload" event listener to the html page's <body> tag,but the event listener is call by the page load,
    but ,the applet sometime has not loaded complet,so how can i know the applet had loaded complet!
    the <OBJECT>has some method to check the applet load status??
    3KS!

    You can have your applet call some javascript to inform that it is loaded. Make the call from your
    applet's start method
    Suppose you have a javascript function called "appletReady()"
    which sets a ready variable to true or whatever.
    Now in your start method of your applet you can do the following:
           JSObject win = null;
            try
                win = (JSObject)JSObject.getWindow((Applet)this);
                if (win == null)
                    System.err.println("JSObject window was null");
                else
                        win.call("appletReady",null);
            catch (Exception jse)
                System.err.println("Exception: " + jse);
            }Make sure you import netscape.javascript.
    And when you compile use the appropriate jaws.jar in your classpath
    It should be found under jre/lib of your JDK installation.
    I hope this helps.

  • AIR 3.2 StageWebView complete event not working on iPad2

    I have created a simple test app using Flash CS5.5 and air 3.2 to test the stageWebView functionality however I am having problems getting the Event.COMPLETE to fire. My website loads fine but the  onComplete function is not being called.
    Here is my code. I would appreciate if anyone can confirm if there is a bug or if there is a problem with my code.
    import flash.media.StageWebView;
    if (objApp == undefined) {
              var objApp = new Object();
    function displayWebsite(e:MouseEvent):void {
              objApp.webView = new StageWebView();
              objApp.webView.stage = this.stage;
              objApp.webView.viewPort = new Rectangle(120, 120, 530, 710);
              objApp.webView.addEventListener(Event.COMPLETE,onComplete);
              objApp.webView.loadURL("http://www.mediakitchen.co.uk");
    function onComplete(e:Event):void { 
              debugTxt.text = "WebPageLoaded";            
    function onError(e:ErrorEvent):void {
              debugTxt.text =="Page is not available. Try reloading.";
    function onChanging(e:LocationChangeEvent):void {
              debugTxt.text =="Loading...";

    This is still bugging me. Whilst the cut down example did indeed work, when I try this for a video, it does not work. In the following example, I can hear the video playing but I cannot see it. The onVideoLoadComplete function is not being called.
    Any ideas why this would work when loading a website but not when loading a video. If I put the  webView.stage = this.stage; where I have commented out, the video displays correctly however I need to display and remove things from my app once the video has completed loading. Is this a bug or am I missing something here? Perhaps there is no way to detect when a video has completed loading? I am packaging with Flash CS5.5 and AIR 3.2
    import flash.geom.Rectangle;
    import flash.media.StageWebView;
    import flash.filesystem.File;
    var webView:StageWebView = new StageWebView();
    var path:String = new File(new File("app:/video.mp4").nativePath).url;
    // webView.stage = this.stage;
    webView = new StageWebView();
    webView.viewPort = new Rectangle(100, 100, 400, 300);
    webView.addEventListener(Event.COMPLETE,onVideoLoadComplete);
    webView.loadURL(path);
    function onVideoLoadComplete(e:Event):void {
              debugTxt.text = "video load complete"; 
              webView.stage = this.stage;

  • How to mark a Document as completed

    Hello Experts,
    We have a one DP document in status "Document Created". The Work item status is In Process.
    This document was created in August 2012 and now we need to mark it as completed.
    The last action on 5th Nov 12 is Work Item started manually.
    Could you please let me know how to mark a document as completed which is in status "Document Created" in SAP IM?
    Let me know if you need additional inputs to analyze.
    Thanks in advance.
    Leena S.

    Hi,
    Can let us know what is the workflow template ID, Standard or Custom? 
    Provide the template ID if it is standard.
    Is there any wait step in the workflow template. which is waiting for some event?
    Is there any end condition defined for the step in the workflow template?
    Check, if any terminating events are mapped to the task-id from PFTC transaction. If exists, then try to raise the event manually from SWUE transaction, if the system is not PROD.
    If there are no terminating events then try to complete the work-item manually from SWIA transaction.
    Regards
    Pavan

  • 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);

  • LoaderInfo class doesn't dispatch Init and Complete events

    Hi,
    I use the traditional way to download jpeg images (size < 200K) dynamically:
        try {
         contentLoader = new Loader();
         contentLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
         contentLoader.contentLoaderInfo.addEventListener(Event.INIT, onInit);
         contentLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onError);
         contentLoader.loadBytes(loader.data as ByteArray);
        } catch (error:Error) {
           trace (error.toString());
    private function onInit(event:Event):void {
         trace ("onInit");
    private function onLoadComplete(evt:Event):void {
         token.result = (evt.target as LoaderInfo).content as Bitmap;
    I have noticed that sometimes class LoaderInfo doesn't dispatch neither INIT nor COMPLETE event working with the same images. There is no IO_ERROR dispatched as well. All images are small (< 200K).
    I suppose that this is a bug in the Flash Player.

    Okay, at this point I think I can chalk it up to a bad swf file (or a couple, anyway).
    One thing I noticed while stepping through fdb is that after invoking loader.loadBytes, even though the completion event is never triggered, it looks like a new swf is instantiated.  The instantiated movieClip is ~600k, though, which is over 200 times the actual source file size.  Using swfdump from the flex sdk on the swf it looks like the framerate and length parameters were bad.  Like 20k and 600k bad.  I'm guessing the file was incorrectly stored as text at a point.  After checking the source asset and reexporting, my application works as expected (the loaderInfo always triggers a completion event).
    I'm not sure why it works when in an isolated test case.  I end up loading the file the same number of times.  There's definitely a concatenation of circumstances at work.  I guess it's possible if I let it run for an indefinite amount of time the event would have eventually triggered.
    Thanks for the time though.  Hopefully someone else finds this thread helpful.

  • Flex Complete Event

    Hi guys,
    Just trying to find answers regarding problems with Mac
    players on the complete event in flex. Please help. I really need
    an alternative to be used in my uploader project. My multiple file
    uploader doesn't seem to work in Mac, only the first file was being
    uploaded since the complete event is not working, it intends to be
    that the other files in queue was not uploaded and has stopped
    after the first file.
    Any help would be very much appreciated. Thank you in
    advance.

    Ah I figured it out.  It seems that if I don't call addChild(img) (which I had been commenting out while trying to defer it for processing) then img.load(url) is never called so therefore the Event.COMPLETE won't run just on what I had.

Maybe you are looking for

  • Creating a Validation for WBS Element in the Asset Master Record

    I would like to know how to create a validation in the AMR for the WBS Element field. I would like to have a particular Business Area when used be required to only use a WBS element that starts with, let's say, AL. Can someone shed some light on how

  • RGB poor quality compared to CMYK

    I have a vector map which was brought from iStock and changed the color on it. The edited version is in CMYK format and I need both a CMYK version for print and RGB for screen. The map needs to be used in PowerPoint and I have tried to zoom in quite

  • Uploading in internal table through upload function

    Hi friends,               I am facing problem while uploading a data from flat file. It is in text format. data writen in file do not follows tabs instead of it there is a spaces between two words in the row.              While uploading through uplo

  • How I can set the Non-standard option of -Xmxn of jvm

    Hi there, Can any one tell me how I can set the Non-standard option of -Xmxn of jvm (setp by step).Iam using Sun's jvm(jdk1.2.2).Iam facing a error(java.lang .OutOfMemory).I want to set the maximum size of the memory allocation pool.Any help will be

  • Import table from word to pages

    How do I copy a Word table into Pages?