ActionScript 3 Error #2044 & Error #2048

How do I stop this error from happening? When I use the same
source code in a WindowedApplication rather than an Application,
(which is where I get this error), I do not get the error (with an
AIR app).
Error #2044: Unhandled securityError:. text=Error #2048:
Security sandbox violation:
http://MYURL.com/nMuseum.swf
cannot load data from
http://www.MYURL.com/index.xml.
at nMuseum/loadMyXML()
at nMuseum/collectionSelect()
at nMuseum/__tree_itemClick()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()
at mx.controls.listClasses::ListBase/mouseClickHandler()
at mx.controls::Tree/mouseClickHandler()

You might need a crossdomain.xml file on the server you
access the XML file from, if this server is not the same as the one
the SWF is served from.
Something like:
<?xml version="1.0"?>
<cross-domain-policy>
<allow-access-from domain="hostname.domainname.com" />
</cross-domain-policy>
Or:
<?xml version="1.0"?>
<cross-domain-policy>
<allow-access-from domain="*" />
</cross-domain-policy>

Similar Messages

  • Error #2044 & Error #2048

    Hello,
    I am running Flex 4 SDK and a beta of Flash Builder 4 on an Eclipse IDE. I have two files: one is a small flex program that establishes a XML Socket on the localhost, the other is a Java program that writes a simple string to the port that the flex program listens to. The purpose of this program is to get used to TCP with flex. Both programs run inside of the Eclipse IDE. However, when I run the program, I get the following error message:
    Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation
    I have searched quite a bit for a solution to this problem to no avail.  Any help would be greatly appreciated.
    Thank you.

    For what it's worth, I just put together something simple and it seems to work:
    Both are run from a common folder.  Note that (AFAIK) you can't create a socket server in Flash (only clients)...so the java socket server needs to be started first:
    Keep in mind that things won't work out of the box (due to security issues) - an easy way to get things up and running (sans crossdomain file returned from your socket server) is to ensure your app is running in the local-trusted sandbox.
    To do this you need to add the path (where your Client.swf resides) to a text file living in either your global "FlashPlayerTrust" folder or your user level FlashPlayerTrust folder.
    For example, on Mac I've added a file called 'trust' containing one line:
    file:///Users/clucier/apps/SocketTest/
    ... to my "global" FlashPlayerTrust folder located at: /Library/Application Support/Macromedia/FlashPlayerTrust.
    See http://livedocs.adobe.com/flex/3/html/help.html?content=security2_25.html
    Pardon the verbose post, attachments don't work too well for me lately so included src inline...
    SimpleServer.java:
    import java.io.*;
    import java.net.*;
    public class SimpleServer
            public static void main(String args[])
                    // Message terminator
                    char EOF = (char)0x00;
                    try
                            // create a serverSocket connection on port 9999
                            ServerSocket s = new ServerSocket(9999);
                            System.out.println("Server started. Waiting for connections...");
                            // wait for incoming connections
                            Socket incoming = s.accept();
                            BufferedReader data_in = new BufferedReader(
                                  new InputStreamReader(incoming.getInputStream()));
                            PrintWriter data_out = new PrintWriter(incoming.getOutputStream());
                            data_out.println("Welcome! type EXIT to quit." + EOF);
                            data_out.flush();
                            boolean quit = false;
                            // Waits for the EXIT command
                            while (!quit)
                                    String msg = data_in.readLine();
                                    if (msg == null) quit = true;
                                    if (!msg.trim().equals("EXIT"))
                                            data_out.println("You sayed: <b>"+msg.trim()+"</b>"+EOF);
                                            data_out.flush();
                                    else
                                            quit = true;
                    catch (Exception e)
                            System.out.println("Connection lost");
    Client.mxml (Flex 4):
    <?xml version="1.0" encoding="utf-8"?>
    <Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                 xmlns="library://ns.adobe.com/flex/spark"
                 xmlns:mx="library://ns.adobe.com/flex/halo"
                 width="1024" height="768">
        <!-- Compiled FXG placed on the left -->
        <layout>
            <VerticalLayout/>
        </layout>
        <fx:Script>
            <![CDATA[
                import flash.net.XMLSocket;
                import flash.events.*;
                private var hostName:String = "localhost";
                private var port:uint = 9999;
                private var socket:XMLSocket;
                public function connect():void {
                    socket = new XMLSocket();
                    configureListeners(socket);
                    socket.connect(hostName, port);
                public function send(data:Object):void {
                    socket.send(data);
                private function configureListeners(dispatcher:IEventDispatcher):void {
                    dispatcher.addEventListener(Event.CLOSE, closeHandler);
                    dispatcher.addEventListener(Event.CONNECT, connectHandler);
                    dispatcher.addEventListener(DataEvent.DATA, dataHandler);
                    dispatcher.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
                    dispatcher.addEventListener(ProgressEvent.PROGRESS, progressHandler);
                    dispatcher.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
                private function closeHandler(event:Event):void {
                    ta.text += String("closeHandler: " + event);
                private function connectHandler(event:Event):void {
                    ta.text += String("connectHandler: " + event);
                private function dataHandler(event:DataEvent):void {
                    ta.text += String("dataHandler: " + event);
                private function ioErrorHandler(event:IOErrorEvent):void {
                    ta.text += String("ioErrorHandler: " + event);
                private function progressHandler(event:ProgressEvent):void {
                    ta.text += String("progressHandler loaded:" +
                                event.bytesLoaded + " total: " + event.bytesTotal);
                private function securityErrorHandler(event:SecurityErrorEvent):void {
                    ta.text += String("securityErrorHandler: " + event);
            ]]>
        </fx:Script>
        <Button label="connect" click="connect()"/>
        <TextArea id="ta" width="300" height="200"/>
    </Application>

  • Actionscript Error #2044 / Adobe Flash Player 9

    I got error message when I try the flash movie on firefox. ( IE no error )
    The Error message is:
    Error #2044
    Unhandled IOErrorEvent:.text:Error #2032:Stream Error.
    at index_fla::Main Timeline/frame1()
    An Actionscript error has occurred
    I searched it on google and adobe,  but nothing help me to solve this problem. Please help , urgently

    Ok. I put the .fla file.
    Also my first frame is like this:
    import flash.events.Event;
    import flash.media.ID3Info;
    import flash.media.Sound;
    import flash.display.Loader;
    import flash.utils.*;
    import flash.display.Sprite;
    import flash.net.URLRequest;
    import flash.net.URLVariables;
    import flash.net.URLRequestHeader;
    import flash.net.URLRequestMethod;
    import flash.net.URLLoader;
    var introflag:Boolean;
    if(introflag==false){
    var releaseSound:Sound = new Sound();
    var reqrelease:URLRequest = new URLRequest("./Sesler/release.mp3");
    releaseSound.load(reqrelease);
    releaseSound.play();
    introflag=true;
    stop();
    var haberf:Boolean=false;
    var etkinf:Boolean=false;
    var channelkit:SoundChannel=new SoundChannel();
    var kitapoku:Sound=new Sound();
    if(bkitaplik==true)
        bkitaplik=false;
        gotoAndStop(2);
    if(betkinlik==true)
        betkinlik=false;
        gotoAndStop(4);
    if(bhaber==true)
        bhaber=false;
        gotoAndStop(3);
    var bhaber:Boolean=false;
    var betkinlik:Boolean=false;
    var bkitaplik:Boolean=false;
    //verilen tarihi gün.ay.yıl şeklinde çeviriyor
             function dateToMMDDYYYY(aDate:Date):String {
             var SEPARATOR:String = ".";
             var mm:String = (aDate.month + 1).toString();
             if (mm.length < 2) mm = "0" + mm;
             var dd:String = aDate.date.toString();
             if (dd.length < 2) dd = "0" + dd;
             var yyyy:String = aDate.fullYear.toString();
             return dd + SEPARATOR + mm + SEPARATOR + yyyy;
    //butonlar sayfaya ekleniyo ve arkplan resmi atılıyo konumu belirtiliyo
    //seslerin tanımı,yüklenmesi ve path belirtme
    var mySong1:Sound = new Sound();
    var req1:URLRequest = new URLRequest("./Sesler/Haberler/btn1.mp3");
    mySong1.load(req1);
    var mySong2:Sound = new Sound();
    var req2:URLRequest = new URLRequest("./Sesler/Etkinlikler/Over/btn2.mp3");
    mySong2.load(req2);
    var mySong3:Sound = new Sound();
    var req3:URLRequest = new URLRequest("./Sesler/OnemliTelefonlar/Over/btn3.mp3");
    mySong3.load(req3);
    var mySong3tik:Sound = new Sound();
    var req3tik:URLRequest = new URLRequest("./Sesler/OnemliTelefonlar/Click/btn3tik.mp3");
    mySong3tik.load(req3tik);
    var mySong4:Sound = new Sound();
    var req4:URLRequest = new URLRequest("./Sesler/EngelliDestek/Over/btn4.mp3");
    mySong4.load(req4);
    var mySong4tik:Sound = new Sound();
    var req4tik:URLRequest = new URLRequest("./Sesler/EngelliDestek/Click/btn4tik.mp3");
    mySong4tik.load(req4tik);
    var mySong5:Sound = new Sound();
    var req5:URLRequest = new URLRequest("./Sesler/GormeEngelliKitapligi/btn5.mp3");
    mySong5.load(req5);
    var mySong6:Sound = new Sound();
    var req6:URLRequest = new URLRequest("./Sesler/HavaDurumu/Over/btn6.mp3");
    mySong6.load(req6);
    var Tarih:Date = new Date();
    var mySong6tik:Sound = new Sound();
    var req6tik:URLRequest = new URLRequest("./Sesler/HavaDurumu/Click/"+dateToMMDDYYYY(Tarih)+".mp3");
    mySong6tik.load(req6tik);
    var mySonglogo:Sound = new Sound();
    var reqlogo:URLRequest = new URLRequest("./Sesler/btnlogo.mp3");
    mySonglogo.load(reqlogo);
    var uyari:Sound = new Sound();
    var urlsi:URLRequest = new URLRequest("./Sesler/uyari.mp3");
    uyari.load(urlsi);
    //seschannel tanımlama ve sesleri yükleme... her sesin yüklemesi aynı fonksiyona gidiyor
    var channel1:SoundChannel = new SoundChannel();
    mySong1.addEventListener(Event.COMPLETE, onSoundLoaded);
    var channel3:SoundChannel = new SoundChannel();
    mySong3.addEventListener(Event.COMPLETE, onSoundLoaded);
    var channel3tik:SoundChannel = new SoundChannel();
    mySong3tik.addEventListener(Event.COMPLETE, onSoundLoaded);
    var channel2:SoundChannel = new SoundChannel();
    mySong2.addEventListener(Event.COMPLETE, onSoundLoaded);
    var channel4:SoundChannel = new SoundChannel();
    mySong4.addEventListener(Event.COMPLETE, onSoundLoaded);
    var channel4tik:SoundChannel = new SoundChannel();
    mySong4tik.addEventListener(Event.COMPLETE, onSoundLoaded);
    var channel5:SoundChannel = new SoundChannel();
    mySong5.addEventListener(Event.COMPLETE, onSoundLoaded);
    var channel6:SoundChannel = new SoundChannel();
    mySong6.addEventListener(Event.COMPLETE, onSoundLoaded);
    var channel6tik:SoundChannel = new SoundChannel();
    mySong6tik.addEventListener(Event.COMPLETE, onSoundLoaded);
    var channellogo:SoundChannel = new SoundChannel();
    mySonglogo.addEventListener(Event.COMPLETE, onSoundLoaded);
    var channeluyari:SoundChannel = new SoundChannel();
    uyari.addEventListener(Event.COMPLETE, onSoundLoaded);
    //sesin yüklenmesi durumunda gerçekleşecek fonk
    function onSoundLoaded(e:Event):void {
    //butonlar ve olay yaratma
    //btn1.addEventListener(MouseEvent.MOUSE_OVER, uyarises);
    btn1.addEventListener(MouseEvent.MOUSE_OVER, playSound1);
    btn1.addEventListener(MouseEvent.MOUSE_OUT,stopSound1);
    btn1.addEventListener(MouseEvent.MOUSE_DOWN,stopSound1);
    btn1.addEventListener(MouseEvent.MOUSE_DOWN,tikplay1);
    btn2.addEventListener(MouseEvent.MOUSE_OVER, playSound2);
    btn2.addEventListener(MouseEvent.MOUSE_OUT,stopSound2);
    btn2.addEventListener(MouseEvent.MOUSE_DOWN,stopSound2);
    btn2.addEventListener(MouseEvent.MOUSE_DOWN,tikplay2);
    btn3.addEventListener(MouseEvent.MOUSE_OVER, playSound3);
    btn3.addEventListener(MouseEvent.MOUSE_OUT,stopSound3);
    btn3.addEventListener(MouseEvent.MOUSE_DOWN,stopSound3);
    btn3.addEventListener(MouseEvent.MOUSE_DOWN,tikplay3);
    btn4.addEventListener(MouseEvent.MOUSE_OVER, playSound4);
    btn4.addEventListener(MouseEvent.MOUSE_OUT,stopSound4);
    btn4.addEventListener(MouseEvent.MOUSE_DOWN,stopSound4);
    btn4.addEventListener(MouseEvent.MOUSE_DOWN,tikplay4);
    btn5.addEventListener(MouseEvent.MOUSE_OVER, playSound5);
    btn5.addEventListener(MouseEvent.MOUSE_OUT,stopSound5);
    btn5.addEventListener(MouseEvent.MOUSE_DOWN,stopSound5);
    btn5.addEventListener(MouseEvent.MOUSE_DOWN,tikplay5);
    btn6.addEventListener(MouseEvent.MOUSE_OVER, playSound6);
    btn6.addEventListener(MouseEvent.MOUSE_OUT,stopSound6);
    btn6.addEventListener(MouseEvent.MOUSE_DOWN,stopSound6);
    btn6.addEventListener(MouseEvent.MOUSE_DOWN,tikplay6);
    btn_baslik.addEventListener(MouseEvent.MOUSE_OVER, playSoundlogo);
    btn_baslik.addEventListener(MouseEvent.MOUSE_OUT,stopSoundlogo);
    //seslerin oynatıldğı fonklar
    function uyarises(e:MouseEvent) {
    channeluyari = uyari.play();
    trace("OK");
    var myTimer1:Timer = new Timer(1000);
    function playSound1(e:MouseEvent) {
        channeluyari = uyari.play();
        myTimer1.addEventListener('timer', timerFunction1);
        myTimer1.start();
    function timerFunction1(event:TimerEvent)
       channel1 = mySong1.play();
       myTimer1.stop();
    function tikplay1(e:MouseEvent) {
        SoundMixer.stopAll();
    gotoAndStop(3);
    function stopSound1(e:MouseEvent)
        myTimer1.stop();
        channel1.stop();
        channeluyari.stop();
    var myTimer2:Timer = new Timer(1000);
    function playSound2(e:MouseEvent) {
    channeluyari = uyari.play();
    myTimer2.addEventListener('timer', timerFunction2);
        myTimer2.start();
    function timerFunction2(event:TimerEvent)
       channel2 = mySong2.play();
       myTimer2.stop();
    function tikplay2(e:MouseEvent) {
        SoundMixer.stopAll();
        gotoAndStop(4);
    function stopSound2(e:MouseEvent)
        myTimer2.stop();
        channel2.stop();
        channeluyari.stop();
      var myTimer3:Timer = new Timer(1000);
    function playSound3(e:MouseEvent) {
    channeluyari = uyari.play();
    myTimer3.addEventListener('timer', timerFunction3);
        myTimer3.start();
    function timerFunction3(event:TimerEvent)
       channel3 = mySong3.play();
       myTimer3.stop();
    function tikplay3(e:MouseEvent) {
    channel3tik = mySong3tik.play();
    trace("OK");
    function stopSound3(e:MouseEvent)
        myTimer3.stop();
        channel3.stop();
        channel3tik.stop();
        channeluyari.stop();
         trace("OK");
    var myTimer4:Timer = new Timer(1000);
      function playSound4(e:MouseEvent) {
    channeluyari = uyari.play();
    myTimer4.addEventListener('timer', timerFunction4);
        myTimer4.start();
    function timerFunction4(event:TimerEvent)
       channel4 = mySong4.play();
       myTimer4.stop();
    function tikplay4(e:MouseEvent) {
    channel4tik = mySong4tik.play();
    trace("OK");
    function stopSound4(e:MouseEvent)
        myTimer4.stop();
        channel4.stop();
        channel4tik.stop();
        channeluyari.stop();
    trace("OK");
      var myTimer5:Timer = new Timer(1000);
      function playSound5(e:MouseEvent) {
    channeluyari = uyari.play();
    myTimer5.addEventListener('timer', timerFunction5);
        myTimer5.start();
    function timerFunction5(event:TimerEvent)
       channel5 = mySong5.play();
       myTimer5.stop();
    function tikplay5(e:MouseEvent){
        SoundMixer.stopAll();
        gotoAndStop(2);
    function stopSound5(e:MouseEvent)
        myTimer5.stop();
        channel5.stop();
        channeluyari.stop();
    trace("OK");
      var myTimer6:Timer = new Timer(1000);
      function playSound6(e:MouseEvent) {
    channeluyari = uyari.play();
    myTimer6.addEventListener('timer', timerFunction6);
        myTimer6.start();
    function timerFunction6(event:TimerEvent)
       channel6 = mySong6.play();
       myTimer6.stop();
    function tikplay6(e:MouseEvent) {
    channel6tik = mySong6tik.play();
    trace("OK");
    function stopSound6(e:MouseEvent)
        myTimer6.stop();
        channel6.stop();
        channel6tik.stop();
        channeluyari.stop();
    trace("OK");
    var myTimerlogo:Timer = new Timer(1000);
      function playSoundlogo(e:MouseEvent) {
    channeluyari = uyari.play();
    myTimerlogo.addEventListener('timer', timerFunctionlogo);
        myTimerlogo.start();
    function timerFunctionlogo(event:TimerEvent)
       channellogo = mySonglogo.play();
       myTimerlogo.stop();
    function stopSoundlogo(e:MouseEvent)
        myTimerlogo.stop();
        channellogo.stop();
        channeluyari.stop();

  • Need help with Error #2044: Unhandled securityError:.

    Hi,
    I am developing an AIR+AJAX app and I am using sockets to connect to the ftp server and just checking whether the app is able to connect to the ftp server successfully, check the user name and password and return with a message.
    It connects and displays the following error after 15 seconds or so:
    Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation: app:/index.html cannot load data from www.mydomain.in:21.
    at flash.html::HTMLLoader/nativeOnMouseUp()
    at flash.html::HTMLLoader/invokeMouseUpImpl()
    at flash.html::HTMLLoader/onLeftMouseUp()
    How can I take care of this? The app needs to connect to the ftp server often. This error is shown when I am in preview mode.
    This is absolutely essential for me to take care of this because the app will check any number of domains and connect using sockets. Is there anyway to suppress these errors. I have heard of air.Security but how exactly should I use in this regard.
    Please help.
    Gaurav

    Hi Gaurav,
    I'm not sure exactly what kind of documentation you are looking for.
    The live docs language reference pages have sections for Events and Error for each API. You can see there what events or errors a class or any given function may dispatch, and treat them accordingly.
    (http://help.adobe.com/en_US/AS3LCR/Flash_10.0/index.html)
    Here is a resource on error events for ActionScript:
    http://livedocs.adobe.com/flex/3/html/help.html?content=11_Handling_errors_10.html
    I don't know if you're aware of this, but even if an AS3 API does not have an alias in AIRAliases, it can still be accessed via the runtime property:
    runtime.<package-name>.<class/function> (ex. runtime.flash.events.ErrorEvent)
    You might want to also have a look at this book:
    http://onair.adobe.com/files/AIRforJSDevPocketGuide.pdf
    See the Troubleshooting AIR Applications section (and the "Missing event listeners for error events" subsection)
    Regarding the file upload.
    I think the FileStream is the API you are looking for.
    The live docs for FileStream should have pretty good examples on reading from a file. I think the 'readBytes' function is the one you should be looking at.
    The above book contains a File API section - you can look at "Asynchronously Read Text from a File" for a streamlined file reading process.
    You will probably want to read binary files, but the process is similar. Subsitute the 'readMultiByte' function, which returns a string, with the 'readBytes' function, which reads binary data into a ByteArray.
    You will then write the data read into the byte array to the socket.
    Also, there is a sample on Adobe Labs called KeePIPE, demonstrating the use of new networking APIs in AIR 2. It might be too complicated, and not map exactly to what you're looking for, but you can have a look at:
    js/SendChannel.js : App.SendChannel.prototype.sendFile function.
    Source Code: http://download.macromedia.com/pub/labs/air/2/b2/samples/keepipe.zip
    Samples Page: http://labs.wip3.adobe.com/technologies/air2/samples/
    Hope this helps.
    Horia

  • File Upload using Flex/ColdFusion.  2044 error

    I am looking for a little more clarity around the file upload using Flex and Cold Fusion.  When I run this using my server I get Error #2044: Unhandled IOErrorEvent:. text=Error #2038: File I/O Error.
    I did create a regular cfform and had it use my ColdFusion upload form and that worked fine, so I feel good about the upload form. I am starting to think there is a permission error with the Flash Player writing to the folder.  When this is ran, it will show the file being 100% loaded but the complete event is never triggered.  I put alerts to see where it hits and 100 does show at the same time as my error message.  The complete alert never shows.  I also put an alert in my cfm page and it never reaches that page to hit it.  Whether I use an absolute URL or relative path. I have also tried the urlrequestmethod.post and nothing changed.  Thanks in advance.  BTW.  I am using Flex 3.
    This is my mxml file
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application 
    xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:example="com.example.*" horizontalAlign="center" viewSourceURL="srcview/index.html">
    <mx:Script>
    <![CDATA[
    import com.example.FileDownload 
    import mx.controls.Label 
    import com.example.FileUpload]]>
    </mx:Script>
    <mx:Label id="title" text="File I/O Example" fontSize="24" fontStyle="bold" />
    <mx:Text id="subtitle" text="From Programming ActionScript 3.0, Chapter 22: Networking and communication" width="100%" textAlign="center" fontSize="12" /><example:FileDownload 
    id="fileDownload" creationComplete="fileDownload.init(downloadProgress, cancelDownload);" />
    <example:FileUpload id="fileUpload" creationComplete="fileUpload.init(uploadProgress, cancelUpload);" />
    <mx:HBox>
    <mx:Panel title="Upload File" paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10">
    <mx:ProgressBar id="uploadProgress" label="" mode="manual" />
    <mx:ControlBar horizontalAlign="right">
    <mx:Button id="startUpload" label="Upload..." click="fileUpload.startUpload();" />
    <mx:Button id="cancelUpload" label="Cancel" click="fileUpload.cancelUpload();" enabled="false" />
    </mx:ControlBar>
    </mx:Panel>
    <mx:Panel title="Download File" paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10">
    <mx:ProgressBar id="downloadProgress" label="" mode="manual" />
    <mx:ControlBar horizontalAlign="right">
    <mx:Button id="startDownload" label="Download..." click="fileDownload.startDownload();" />
    <mx:Button id="cancelDownload" label="Cancel" click="fileDownload.cancelDownload();" enabled="false" />
    </mx:ControlBar>
    </mx:Panel>
    </mx:HBox></mx:Application>
    here is my coldfusion upload script
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    <body>
    <script>alert('hello')</script>
    <cfset currentPath = getCurrentTemplatePath()>
    <cfset currentDirectory = getDirectoryFromPath(currentPath)>
    <cfoutput>This directory is #currentDirectory#</cfoutput>
    <cffile action="UPLOAD" filefield="Filefield" destination="#currentDirectory#" nameconflict="OVERWRITE"/>
    </body>
    </html>
    here is the package
    package  
    com.example { import flash.events.*; 
    import flash.net.FileReference; 
    import flash.net.URLRequest; 
    import flash.net.URLRequestMethod; 
    import mx.controls.Button; 
    import mx.controls.ProgressBar; 
    import mx.core.UIComponent; 
    import mx.controls.Alert; 
    public class FileUpload extends UIComponent { 
    // Hard-code the URL of the remote upload script. 
    private const UPLOAD_URL:String = "upload_script.cfm"; 
    private var fr:FileReference; 
    // Define reference to the upload ProgressBar component. 
    private var pb:ProgressBar; 
    // Define reference to the "Cancel" button which will immediately stop the upload in progress. 
    private var btn:Button; 
    public function FileUpload() {}
    /*** Set references to the components, and add listeners for the SELECT,
    * OPEN, PROGRESS, and COMPLETE events.
     public function init(pb:ProgressBar, btn:Button):void { 
    // Set up the references to the progress bar and cancel button, which are passed from the calling script. 
    this.pb = pb; 
    this.btn = btn; 
    fr =
    new FileReference();fr.addEventListener(Event.SELECT, selectHandler);
    fr.addEventListener(Event.OPEN, openHandler);
    fr.addEventListener(ProgressEvent.PROGRESS, progressHandler);
    // fr.addEventListener(Event.COMPLETE, completeHandler); 
    /*** Immediately cancel the upload in progress and disable the cancel button.
     public function cancelUpload():void {fr.cancel();
    pb.label =
    "UPLOAD CANCELLED";btn.enabled =
    false;}
    /*** Launch the browse dialog box which allows the user to select a file to upload to the server.
     public function startUpload():void {fr.browse();
    /*** Begin uploading the file specified in the UPLOAD_URL constant.
     private function selectHandler(event:Event):void { 
    var request:URLRequest = new URLRequest(UPLOAD_URL); 
    /* request.url = UPLOAD_URL*/request.method = URLRequestMethod.POST;
     try  
    {fr.upload(request);
    }catch (error:Error){
    trace  
    ("error uploading")}
     /*** When the OPEN event has dispatched, change the progress bar's label
    * and enable the "Cancel" button, which allows the user to abort the
    * upload operation.
     private function openHandler(event:Event):void {pb.label =
    "UPLOADING";btn.enabled =
    true;}
    /*** While the file is uploading, update the progress bar's status and label.
     private function progressHandler(event:ProgressEvent):void {pb.label =
    "UPLOADING %3%%";pb.setProgress(event.bytesLoaded, event.bytesTotal);
    if(event.bytesLoaded==event.bytesTotal){ 
    trace(Event.COMPLETE)Alert.show(
    "100")}
    /*** Once the upload has completed, change the progress bar's label and
    * disable the "Cancel" button since the upload is already completed.
     private function completeHandler(event:Event):void {Alert.show(
    "in function")pb.label =
    "UPLOADING COMPLETE";pb.setProgress(0, 100);
    btn.enabled =
    false;}

    Presumably you need to add a result handler to your request.

  • Help with this ! Error #2044: Unhandled ioError:. text=Error #2035:

    Okay,
    I'm green and new to Flash and making a website so this may not be a huge issue to some.
    I'm trying to make a simple image gallery  with the UI Loader.( 9 thumbnail images with main image above it)
    I'm following a Lynda.com CS3 video tutorial if that helps. It seems straightforward enough.
    I have everything properly assigned (buttons, the loader) and this is the basic actionscript code to get the first two images to appear:
    btn1.addEventListener(MouseEvent.CLICK, ldr1)
    function ldr1(e:Event){
        ldr.source = "Images01.jpg";
    btn2.addEventListener(MouseEvent.CLICK,ldr2)
    function ldr2(e:Event){
        ldr.source = "Images02.jpg";
    When I test the movie I get this error :
    Error #2044: Unhandled ioError:. text=Error #2035: URL Not Found.
    I have the flash file and the swf file saved in the same folder as the images (as the video instructs) but it seems Flash cannot read or find my external hard drive. I also remade the file and resaved everything on my computers main hard drive and it still cannot find my folder.
    Please help. I know this is probably an easy issue but again, I'm new and any help would be great.
    Thanks,
    Mike

    I'm not familiar with the way you're loading images (what class is "ldr" an instance of?), but the error is straightforward. You somehow misspelled the image name (caps, maybe in the extension?) or you're referring to a folder that doesn't contain that image.
    I usually debug these kind of errors with Tamper Data, an addon for Firefox. Run it, then run your sfw (in a browser) and see what the location is of the called images. That should give you an idea on what's going wrong.
    Oh and btw, e is not an Event but a MouseEvent. Though I don't think that produced the error in this case.

  • AIR3.5 for iOS & f4v & iPad, Error #2044: Unhandled NetStatusEvent

    Hello,
    Now, I have to try to play the video on iPad2.
    The video file is f4v.
    But this error occurs
    Error #2044: Unhandled NetStatusEvent:. level=error, code=NetStream.Play.StreamNotFound
    This is my environment
    Flash CS6
    AIR3.5
    iPad2 iOS6
    Use StageVideo
    RenderMode - Direct
    I was able to play flv and mp4 with the same code.
    Only when using the f4v, that error occurs.
    My question is
    Can I play f4v on AIr for iOS ?
    Where is documentation for it?

    thanks random.
    I tryed to change extension. so I was able to play.
    but...
    I had to embed the video cuepoint. the event does not occur at the cue point.
    can't use cuepoint ?

  • Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.

    I get this error:
    Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.
    Here is my code:
    import fl.transitions.*;
    import fl.transitions.easing.*;
    //Assign CLICK listeners for each menu button
    Home.addEventListener (MouseEvent.CLICK, buttonClicked);
    Big_Square_Baling.addEventListener (MouseEvent.CLICK, buttonClicked);
    Wrapping.addEventListener (MouseEvent.CLICK, buttonClicked);
    Chopping.addEventListener (MouseEvent.CLICK, buttonClicked);
    Tillage.addEventListener (MouseEvent.CLICK, buttonClicked);
    Raking.addEventListener (MouseEvent.CLICK, buttonClicked);
    //Make the buttons look like buttons
    Home.buttonMode = true;
    Big_Square_Baling.buttonMode = true;
    Wrapping.buttonMode = true;
    Chopping.buttonMode = true;
    Tillage.buttonMode = true;
    Raking.buttonMode = true;
    //This loader is used to load the external swf files
    var loader:Loader;
    //URLRequest stores the path to the file to be loaded
    var urlRequest:URLRequest;
    //This array holds all the tweens, so they
    //don't get garbage collected
    var tweens:Array = new Array();
    //Stores the current page we are displaying
    var currentPage:MovieClip = null;
    //Stores the next page that we are going to display
    var nextPage:MovieClip = null;
    //This function is called when a menu button is clicked
    function buttonClicked (e:Event):void {
    //Create a new loader instance
    loader = new Loader();
    //If we clicked the first button, we load the the Home page
    if (e.target == Home) {
    urlRequest = new URLRequest("Home.swf");
    loader.load (urlRequest);
    //If we clicked the second button, we load the Big Square Baling page
    else if (e.target == Big_Square_Baling) {
    urlRequest = new URLRequest("Big_Square_Baling.swf");
    loader.load (urlRequest);
    //We load the Big Square Bale Wrapping page since we know that the home page or the Big Square Baling page
    //is not clicked
    else if (e.target == Wrapping) {
    urlRequest = new URLRequest("Wrapping.swf");
    loader.load (urlRequest);
    //We load the Chopping page since we know that the home page, the Big Square Baling page, or the
    //Big Square Bale Wrapping page is not clicked
    else if (e.target == Chopping) {
    urlRequest = new URLRequest("Chopping.swf");
    loader.load (urlRequest);
    //We load the Tillage page since we know that that the home page, the Big Square Baling page, the
    //Big Square Bale Wrapping page, and the Chopping page is not clicked
    else if (e.target == Tillage) {
    urlRequest = new URLRequest("Tillage.swf");
    loader.load (urlRequest);
    //We load the Raking page since we know that the home page, the Big Square Baling page, the
    //Big Square Bale Wrapping page the Chopping page, and the Tillage page is not clicked
    else {
      urlRequest = new URLRequest("Raking.swf");
      loader.load (urlRequest);
    //We want to know when the next page is finished loading
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, fileLoaded);
    //This function is called, when we have finished loading a content page
    function fileLoaded(e:Event):void {
    //The loader contains the page we are going to display.
    nextPage = e.target.content;
    //Let's animate the current page away from the stage.
    //First, we need to make sure there is a current page on the stage.
    if(currentPage != null) {
      //Tween the current page from left to the right
      var tweenX:Tween = new Tween(currentPage, "x", Regular.easeOut,
          currentPage.x, 500, 1, true);
      //Decrease the alpha to zero
      var tweenAlpha:Tween = new Tween(currentPage, "alpha", Regular.easeOut,
          1, 0, 1, true);
      //Push the tweens into an array
      tweens.push(tweenX);
      tweens.push(tweenAlpha);
      //currentPageGone will be called when the tween is finished
      tweenX.addEventListener(TweenEvent.MOTION_FINISH, currentPageGone);
    //There is no current page, so we can animate the next
    //page to the stage. The animation is done in
    //the showNextPage function.
    else {
      showNextPage();
    //This function animates and displayes the next page
    function showNextPage():void {
      //Tween the next page from left to the center
      var tweenX:Tween = new Tween(nextPage, "x", Regular.easeOut,
          -200, 0, 1, true);
      //Tween the alpha to from 0 to 1
      var tweenAlpha:Tween = new Tween(nextPage, "alpha", Regular.easeOut,
          0, 1, 1, true);
      //Push the tweens into an array
      tweens.push(tweenX);
      tweens.push(tweenAlpha);
      //Add the next page to the stage
      addChild(nextPage);
      //Next page is now our current page
      currentPage = nextPage;
    //This function is called when the current page has been animated away
    function currentPageGone(e:Event):void {
    //Remove the current page completely
    removeChild(currentPage);
    //Let's show the next page
    showNextPage();

    To help figure out what's wrong, you can use an absolute path to your SWF files. (Such as "C:/Program Files/My Project/MySWF.swf") If the error goes away, then the filename is correct and there is simply some confusion as to where the local path is. Remember that the parent project (your main.swf) should be in the exact same directory as the SWFs being loaded)
    ~Plystire

  • Anyone else seen this while loading a plugin: "Error #2044: Unhandled IOErrorEvent:"

    Hello All,
    I'm curious if anyone else has seen this error while loading an OSMF plugin dynamically:
    "Error #2044: Unhandled IOErrorEvent:. text=Error #2124: Loaded file is an unknown type."
    You will only see this with the debug version of the Flash Player. The plugin loads fine, but the RTE appears. I've submitted a bug for this (http://bugs.adobe.com/jira/browse/FM-1104) but apparently no one at Adobe can reproduce it while everyone on our team can easily reproduce it at will. Some use Windows, some use Macs.
    I've written a very simple player and a very simple plugin, you can simply refresh your browser to try to reproduce the error. You won't see anything on the page, just hit refresh a few times until you see it. You'll need the debug version of the Flash Player to see the RTE. One guy on our team (uses Windows) claims he sees it after he clears his browser cache. I can make it happen on Safari for Mac by simply hitting Cmd-R a few times.
    http://mediapm.edgesuite.net/chuck/osmf-test/OSMFPluginErrorTest.html
    I also see this on cnn.com. I've attached a screen shot.
    Go to cnn.com and watch any video. I get the RTE every time on the first try. We are seeing this repeatedly on OSMF built players that load OSMF plugins dynamically.
    Reply if you see the error. This will greatly help in determining that I've not completely lost my mind
    In the mean time, I'll be working locally on a work around and hopefully submit that to the OSMF trunk.
    Thanks,
    - charles

    Hi Charles,
    Re:  CNN.com > Yes I am seeing the error (with each video twice in fact, 1st on start of preroll, 2nd on start of main video)
    Re:  http://mediapm.edgesuite.net/chuck/osmf-test/OSMFPluginErrorTest.html
    This link is not loading.
    Both cases using both:
    Windows XP > IE 6.0.2900 > Flash Player 10,1,85,3 installed
    Windows XP > Firefox 2.0.0.18 > Flash Player 10,1,85,3 installed
    hth,
    g

  • Error #2044

    Hello all,
    can somebody help me with As3
    I make a soundplayer  for a school project. I get the the next error:
    Error #2044: Niet-afgehandelde IOErrorEvent:. text=Error #2032: Streamfout.
        at Naamloos_fla::MainTimeline/playSound()
        at Naamloos_fla::MainTimeline/song1_data()
    in this acrtionscript:
    var mySound:Sound;
    var myChannel:SoundChannel;
    var isPlaying:Boolean = false;
    var isPaused:Boolean = false;
    var p:uint = 0;
    var songfile:String;
    var songtitle:String;
    song1_btn.addEventListener(MouseEvent.CLICK, song1_data);
    song2_btn.addEventListener(MouseEvent.CLICK, song2_data);
    song3_btn.addEventListener(MouseEvent.CLICK, song3_data);
    stop_btn.addEventListener(MouseEvent.CLICK, stopSound);
    pause_btn.addEventListener(MouseEvent.CLICK, pauseSound);
    function song1_data(myEvent:MouseEvent):void {
    songfile = "audio/mysong.mp3";
    songtitle = "mysong";
    playSound(null);
    function song2_data(myEvent:MouseEvent):void {
    songfile = "audio/gorila.mp3";
    songtitle = "grila";
    playSound(null);
    function song3_data(myEvent:MouseEvent):void {
    songfile = "audio/SUMMERBEAT.mp3";
    songtitle = "SUMMERBEAT";
    playSound(null);
    function stopSound(myEvent:MouseEvent):void {
    if (isPlaying) {
    myChannel.stop();
    p = 0;
    isPlaying = false;
    isPaused = false;
    function playSound(myEvent:Event):void {
    mySound = new Sound;
    mySound.load(new URLRequest(songfile));
    title_txt.text = songtitle;
    if (isPlaying) {
    myChannel.stop();
    myChannel = mySound.play(0);
    } else {
    myChannel = mySound.play(0);
    isPlaying = true;
    function pauseSound(myEvent:MouseEvent):void {
    if (isPlaying) {
    p = Math.floor(myChannel.position);
    myChannel.stop();
    isPlaying = false;
    isPaused = true;
    } else if (isPaused) {
    myChannel = mySound.play(p);
    isPlaying = true;
    isPaused = false;
    Thank you!

    songfile is not loading.
    recheck your path and  file name.

  • I got Error #2044 while I run my script

    I have two .as file and one movie file "adp.flv"
    PlayVideoAbstract.as and PlayAbstract.as
    I have flash document with class name is "PlayVideo". I am going to run movie in abstract object method But  while I run script , movie runs but show error #2044. How can i remove this error. I am using action script 3
    PlayAbstract.as
    package{
        import flash.display.Sprite;
        import flash.net.NetConnection;
        import flash.net.NetStream;
        import flash.media.Video;
        public class PlayAbstract extends Sprite{
            //Instance of classs PlayAbstract
            private var conn:NetConnection;
            private var stream:NetStream;
            private var vid:Video;
            private var flick:String="adp.flv";
            //Construction
            public function PlayAbstract()
                var playIt=new PlayVideoAbstract(conn,stream,vid,flick,100,50);
                addChild(playIt);
    PlayVideoAbstract.as
    package {
        // Import from library
        //flash.netnetconnect
        import flash.net.NetConnection;
        //flash.net.netstream
        import flash.net.NetStream;
        //flash.media.video
        import flash.media.Video;
        //fash.display.sprit
        import flash.display.Sprite;
        // Making class
        public class PlayVideoAbstract extends Sprite {
            // Making construction
            public function PlayVideoAbstract(nc:NetConnection, ns:NetStream, vid:Video, flick:String, xpos:uint, ypos:uint) {
                //Connection net
                nc = new NetConnection();
                nc.connect(null);
                ns = new NetStream(nc);
                vid=new Video();
                vid.attachNetStream(ns);
                ns.play(flick);
                vid.x=xpos;
                vid.y=ypos;
                addChild(vid);
            //Constructor End

    Hi:
    your as code have a lot of bug,  i  fixed something bug  and tested it,already it is working fine.
    PlayAbstract:
    package {
        import flash.display.Sprite;
        public class PlayAbstract extends Sprite {
            private var flick:String="adp.flv";
            public function PlayAbstract() {
                var playIt:PlayVideoAbstract=new PlayVideoAbstract(flick,100,50,stage);
    PlayVideoAbstract:
    package {
        import flash.net.NetConnection;
        import flash.net.NetStream;
        import flash.media.Video;
        import flash.events.NetStatusEvent;
        public class PlayVideoAbstract {
            private var nc:NetConnection;
            private var ns:NetStream;
            private var vid:Video;
            private var flick:String;
            private var xpos:uint;
            private var ypos:uint;
            private var obj:Object;
            public function PlayVideoAbstract(Flick:String, Xpos:uint, Ypos:uint,Obj:Object) {
                flick=Flick;
                xpos=Xpos;
                ypos=Ypos;
                obj=Obj;
                nc = new NetConnection();
                nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
                nc.connect(null);
                function netStatusHandler(event:NetStatusEvent):void {
                    switch (event.info.code) {
                        case "NetConnection.Connect.Success" :
                            connectStream();
                            break;
                        case "NetStream.Play.StreamNotFound" :
                            trace("Stream not found: " + flick);
                            break;
                function connectStream():void {
                    ns = new NetStream(nc);
                    ns.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
                    ns.client = new CustomClient();
                    vid=new Video();
                    vid.attachNetStream(ns);
                    vid.x=xpos;
                    vid.y=ypos;
                    ns.play(flick);
                    obj.addChild(vid);
    class CustomClient {
        public function onMetaData(info:Object):void {
            trace("metadata: duration=" + info.duration + " width=" + info.width + " height=" + info.height + " framerate=" + info.framerate);
        public function onCuePoint(info:Object):void {
            trace("cuepoint: time=" + info.time + " name=" + info.name + " type=" + info.type);
    ///Good luck and success to you!

  • Error 2044 when loading external swf into my site

    Ok what i have is a site made from 1 flash file where i am loading external swf files for my picture galleries. now what is happening is in Flash, dreamweaver and when i test the site, everything is working perfectly, the problem is coming when i go into internet explorer go to the site and click on the flash button to go to the picture gallery, that is when it is giving me a Error #2044: Unhandled IOErrorEvent:. text=Error #2036: Load Never Completed.
    does anyone know why this is happening and a possible way to fix it? thanks

    See if the following link helps at all...
    http://www.gotoandlearnforum.com/viewtopic.php?f=29&t=20453

  • Error #2044: Unhandled NetStatusEvent:. level=error, code=NetConnection.Call.BadVersion

    I keep on getting this error while connecting to amfphp. Any idea what might be the problem?
    Code:
    private function init(e:Event = null):void
                responder = new Responder(onResult, onFault);
                connection = new NetConnection;
                connection.connect(gateway);
                sendData_btn.addEventListener(MouseEvent.CLICK, getData);
            private function getData(event:MouseEvent):void
                connection.call("UserVO.getUserData", responder);
            private function onResult(result:Object):void
                trace("Result");
            private function onFault(fault:Object):void
                trace("Fault");

    I am testing the HelloWorld AMFPHP example from AMFPHP's website. There's a strange problem though. If i run the application from within the Flash IDE, I get this error:
    Error #2044: Unhandled NetStatusEvent:. level=error, code=NetConnection.Call.BadVersion
    at Main()
    But if I publish the application and run it in browser, it runs fine. What might be the problem?

  • After publishing an adobe captivate 8 file that has a video I got this message when the video slide starts, I'd appreciate if you have any useful suggestions.   Error #2044: Unhandled skinError:. text=[IOErrorEvent type="ioError" bubbles=false cancelable=

    After publishing an adobe captivate 8 file that has a video I got this message when the video slide starts. I'm using Adobe media encoder and it outputs the file as f4v formate and when inserted into the adobe captivate 8 project, I found that I'm still getting the same error message after publishing the project. I'd appreciate if you have any useful suggestions.
    Error #2044: Unhandled skinError:. text=[IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2036: Load Never Completed. URL: file://C:\Users\User\AppData\Local\Temp\Rar$DIa0.291\haloSkin1_as3_progressive.swf"]
    Thanks in advance
    Warm Reagrds

    After publishing an adobe captivate 8 file that has a video I got this message when the video slide starts. I'm using Adobe media encoder and it outputs the file as f4v formate and when inserted into the adobe captivate 8 project, I found that I'm still getting the same error message after publishing the project. I'd appreciate if you have any useful suggestions.
    Error #2044: Unhandled skinError:. text=[IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2036: Load Never Completed. URL: file://C:\Users\User\AppData\Local\Temp\Rar$DIa0.291\haloSkin1_as3_progressive.swf"]
    Thanks in advance
    Warm Reagrds

  • Failed: 4x Host[hostname] error: NewMovieFromFile Failed -2048  Help please

    I have seen a lot of talk about this error but none of it really applies to my situation.
    Failed: 4x Host[hostname] error: NewMovieFromFile Failed -2048
    I am compression a large number on video files most of them are media100 or mpeg4 or mpeg2. Most of the files work just fine but a few of them just won't work. I get the same error each time just on a different Mac.
    I have a managed cluster setup with 5 G5s. I have 1 mac control all the others and the files are submitted from one of the other machines in the cluster. If I submit the files to the single machine they work fine but when I submit them to the cluster I get this error. The hostname will change each time but the error is the same.
    All of the macs can view the files and play them fine. Someone mention QT Pro. I tried adding that to a few of them but I got the same problem. It seems that there is just something about the files that it doesn't like.
    Any ideas.
    Ken

    I've seen this error when our Xsan was configured for high data transfers. Turns out there the san was corrupting the segments, and the nodes couldn't read the segments and assemble the files. Only the node that wrote the segment could read it. After talking with Shake support, turned out setting the san to default settings fixed it.

Maybe you are looking for

  • How can I share or merge multiple iTunes libraries?

    We have three different Apple ID's using iTunes on a single computer.  How can we make the purchases on each of those separate iTunes accounts be accessable to the others so we can share music and app purchases? 

  • Oracle Version 10.1.0: Data type is not supported

    Hi, I am getting "Data Type is not supported" whenever I try to access tables with lob column in Toad. Oracle server version is 10.1.0 and using toad version 7.6. Sql net version 9.2.0 Any pointers towards the resolution? Thanks in advance. Bhavesh

  • Creating Dependent Radio Boxes in Acrobat 9 Std

    When creating a form in Acrobat 9 Standard, how can you make radio boxes dependent on each other? For instance, one item in my form asks a question and the user can choose a "Yes" or "No" radio box.  I want to prevent the user from being able to chec

  • Intercompany asset procurement

    Dear All, <h3>Data :</h3> Company Code A. Plant A Company Code B. ( no plant exist ) Asset Number in CoCode B = 123000A <h3>Scenario :</h3> Purchaser that belong in CoCode A  want to procure asset material with asset no 123000A for CoCode B. <h3>Prob

  • Error accessing Phone Configuration page in Call Manager

    I used BAT to delete auto-generated device profiles. Status and log file showed records were deleted successfully, however, I get the following error message when attempting to access the phone configuration page: Error The following error occurred w