Call flash as3 function

Hello,
how can i call a function in an as3 movieclip?
regards

Before Director 11.5, you can not use AS3.  If you do have D11.5, you need to have the latest version (11.5.8) which you can get by going to Help, Update....
Then you can call root-level scripts by calling the sprite.  So, if you have a AS3 flash sprite in channel 1, and in that file, there is a public function called doSomething, you can do this:
sprite(1).doSomething()
If you have a movieclip named "clip" which has a doSomething() function, you could do
sprite(1).clip.doSomething()

Similar Messages

  • Cannot call AS3 Function from JavaScript

    Hi,
    I am trying to call an ActionScript 3 function with JavaScript. The problem I cannot seem to get any of the browsers to trigger this AS3 function. The debuggers say that the function is undefined when I call it on the flash object. 
    What is supposed to happen is - the javascript function calls the AS3 function, and passes it an integer value.   That integer is then used to pull one of 20 swfs, and load that into the flash movie.
    Please let me know if you guys can think of anything that I can do to make this work!  I've been stuck for hours, and can't seem to make it happen.
    Here is my actionScript:
    import flash.net.URLRequest;
    import flash.display.Loader;
    import flash.external.ExternalInterface;
    var movies:Array = ["idle-ok.swf", "idle-good.swf"];
    // It first loads this "hello swf".
    var helloLoader:Loader = new Loader();
    var helloURL:URLRequest = new URLRequest("idleAvatar.swf");
    helloLoader.load(helloURL);
    addChild(helloLoader);
    var setAvatar:Function = loadAvatar;
    ExternalInterface.addCallback("callSetAvatar", setAvatar);
    // Then, this function should be called by JavaScript to load one of the other swfs.
    function loadAvatar(indx:Number){
        var url:URLRequest = new URLRequest(movies[0]);
        var ldr:Loader = new Loader();
        ldr.load(url);
        addChild(ldr);
    Here is my JavaScript:
    <script type="text/javascript">
    function callExternalInterface(val) {
              document.getElementById("loader").callSetValue(val);
    </script>
    Here is my embed code:
    <div>
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="250" height="350" id="loader" name="loader">
    <param name="movie" value="loader.swf" />
    <param name="allowscriptaccess" value="always" />
    <!--[if !IE]>-->
    <object type="application/x-shockwave-flash" data="loader.swf" width="250" height="350">
    <param name="allowscriptaccess" value="always" />
    <!--<![endif]-->
    <a href="http://www.adobe.com/go/getflashplayer">
    <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
    </a>
    <!--[if !IE]>-->
    </object>
    <!--<![endif]-->
    </object>
    </div>
    <a href="#" onClick="callExternalInterface(1)">CLICK</a>

    You don't appear to be calling any function in your actionscript.  The names between and within do not agree. 
    document.getElementById("loader").callSetValue(val);
    should be calling a function identified with the string "callSetValue" in your actionscript, but you only have a function identified with "callSetAvatar"  and the function associated with that on your AS3 side is specified to be setAvatar...
    ExternalInterface.addCallback("callSetAvatar", setAvatar);
    but you do not have a function named setAvatar, you have one named loadAvatar
    Here's a link to a tutorial that might help you to see how the functions are specified between javascript and actionscript using the ExternalInterface class.  It gets confusing so I suggest you copy the code to a word processing file so you can clearly highlight where they have the same language between them.
    http://viget.com/inspire/bi-directional-actionscript-javascript-communication

  • How call Flash function from C++?

    Communication between C++ and ActiveX Flash object is
    adjusted. The ActiveX calls C++ functions. But how a call Flash
    functions from C++?
    I try so: v_flash is control variable of the ActiveX the
    container.
    A code: v_flash. CallFunction ("test");
    No effect
    How it to make?

    Hi David, Thanks for the response. I found this solution by
    following method:
    Flash code either in class or frame:
    ExternalInterface.addCallback("sendTextToFlash",
    getTextFromJavaScript);
    public function getTextFromJavaScript(user):void {
    trace(user);
    //Now whenever JavaScript function will be called from any
    HTML or back end language then it definetly call directly that
    flash function by following method
    //HTML Code
    function sendData(user){
    //alert("values coming "+user);
    SendDataToFlashMovie(user);
    function getFlashMovieObject(movieName){
    if (window.document[movieName]){
    return window.document[movieName];
    if (navigator.appName.indexOf("Microsoft Internet")==-1){
    if (document.embeds && document.embeds[movieName])
    return document.embeds[movieName];
    else {// if (navigator.appName.indexOf("Microsoft
    Internet")!=-1) {
    return document.getElementById(movieName);
    function SendDataToFlashMovie(user) {
    var flashMovie=getFlashMovieObject("myFLA");
    flashMovie.sendTextToFlash(user);
    Now HTML or back end language has just need to call
    sendData(
    value)
    I think its the right way, but if there is any other short
    method like just call the function name from HTML and that directly
    respond to Flash as per function name, then please let me
    know.

  • How to get this PHP list in Flash AS3?

    Hi,
    I have the following PHP code (downloaded from net) which builds a list of all the files in a "MyPics" folders:
    PS php can build a list of all the files in a folder so you don't have to type them all out like that, plus it makes updating a sinch all you have to do is put a pic in the folder and it will be added to the list.
    PHP Code:
    <CODE>
    <?
    //this function goes through the defined directory and makes a list of all the files
    function parse_dir($dir,$level){
        $dp=opendir($dir); //opens the directory for reading
        while (false!=($file=readdir($dp))){  //runs until no more files
            if ($file!="." && $file!=".." && $file!=".htaccess"){  //so you don't get all the default folders
                $countervar=$countervar+1;  //just a counter for numbering the path names
                if (is_dir($dir."/".$file)) parse_dir  //recurses the subdirectories
    ($dir."/".$file,$level+1);
                else print "&path".$countervar."=".$dir."/".$file;  //pieces together something flash can read
    $start_dir="pathToMyPics";  //put the name of the folder with all the pics here
    $level=1;
    parse_dir($start_dir,$level);
    ?>
    <CODE/>
    The above php will output something like this
    &path1=pathToMyPics/pic1.jpg&path2=pathToMyPics/wowWhatAWierdPicName.jpg
    call the php in flash( loadVariables("fileListPHP.php") ) and viola you get easy to use paths to all you pictures.
    I am not able to understand the code to write on FLASH AS3 frame. Please help.
    Thanks.

    In AS3 you want to use the URLVariables class.  Search Google using "AS3 URLVariables tutorial" and you should find what you need to get going.  Here's one result from that search...
    http://www.metah.ch/blog/2008/01/using-urlvariables/

  • Javascript Call from AS3 Playbar

    Platform: Captivate 7
    Source: AS3 (hopefully obvious!)
    Output: Flash v10
    I'm making a one-off version of one of the default playbars.  I am trying to make the Exit button call a JavaScript function using the following code:
    var btnTipsId = 8;
    function onClicked()
              import flash.external.ExternalInterface; //Register ExternalInterface
              ExternalInterface.call("closeModule()"); //Call JS to close Div
    //parent.onPBCBtnClick("exit");
    As you can probably see, I don't want to Exit button to close the module the way it normally does.  My "closeModule()" function removes a a Div layer that hosts the Captivate.  I know this works as we use it in other places.  The problem I'm encountering is strictly with getting the Playbar to call that JavaScript instead of it's default "parent.onPBCBtnClick("exit");" function.
    Any ideas?

    Okay, it turns out my original code was totally right with one significant exception.
    What was it?
    Wait for it ...
    Wait for it ...
    I was calling the wrong JS function.
    <forehead slap>

  • Creating a file on server, using Flash AS3 + PHP

    I have a very simple PHP script that creates a new file on my server using a random number for the file name (e.g., 412561.txt).  When I load the script directly from a browser, it works.  But when I load the script from a very simple Flash (AS3) script, it does not work (i.e., doesn't create a file).  The Flash script and PHP script are both in the same directory.  Permissions on the directory and its content are 755.  Temporarily setting those permissions to 777 does not solve the problem (i.e., PHP still doesn't create file when called via Flash).
    Here is my phpinfo.
    Here is the PHP file.
    The contents of the PHP file are:
    <?php
    error_reporting(E_ALL);
    ini_set("display_errors", 1);
    $RandomNumber = rand(1,1000000);
    $filename = "$RandomNumber" . ".txt";
    $filecontent = "This is the content of the file.";
    if(file_exists($filename))
              {$myTextFileHandler = fopen($filename,"r+"); }
    else
              {$myTextFileHandler = fopen($filename,"w"); }
    if($myTextFileHandler)
              {$writeInTxtFile = @fwrite($myTextFileHandler,"$filecontent");}     
    fclose($myTextFileHandler);   
    ?>
    Here is the html container for the Flash script.  The Flash script features a single button which calls the PHP script when pressed.  In case it helps, here is the raw Flash file itself.  The code of the Flash script is as follows:
    stop();
    var varLoader:URLLoader = new URLLoader;
    var varURL:URLRequest = new URLRequest("http://www.jasonfinley.com/research/testing/TestingSaveData.php");
    btnSave.addEventListener(MouseEvent.CLICK,fxnSave);
    function fxnSave(event:MouseEvent):void{
              btnSave.enabled=false;
              varLoader.load(varURL);
    Directory listing is enabled at the parent directory here, so you can see there when a new text file is created or not.  (Um, if this is a security disaster, please let me know!)
    Can anyone please help me understand why this isn't working and how I can fix it?  Thank you
    ~jason

    #1, Yes that is a security risk, please disable directory index viewing.
    #2, Always validate. I see no issue with the code you're using but clearly it's not working. The way you find out is your trusty errors.
    Make a new document (or paste this into your existing) where a button with the instance name btnSave is on screen:
    // import required libs
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.events.Event;
    import flash.events.IOErrorEvent;
    import flash.events.MouseEvent;
    import flash.events.SecurityErrorEvent;
    import flash.text.TextField;
    // assign handler
    btnSave.addEventListener(MouseEvent.CLICK, fxnSave);
    // make a textfield to display status
    var tf:TextField = new TextField();
    addChild(tf);
    tf.width = stage.stageWidth;
    tf.height = 300;
    tf.multiline = true;
    tf.wordWrap = true;
    tf.selectable = false;
    tf.text = "Loading...\n";
    // just making sure the textfield is below the button
    this.swapChildren(tf,btnSave);
    function fxnSave(event:MouseEvent):void
        // disable button
        event.currentTarget.enabled = false;
        // new loader
        var varLoader:URLLoader = new URLLoader();
        // listen for load success
        varLoader.addEventListener(Event.COMPLETE, _onCompleteHandler);
        // listen for general errors
        varLoader.addEventListener(IOErrorEvent.IO_ERROR, _onErrorHandler);
        // listen for security / cross-domain errors
        varLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, _onErrorHandler);
        // perform load
        varLoader.load(new URLRequest("http://www.jasonfinley.com/research/testing/TestingSaveData.php"));
    // complete handler
    function _onCompleteHandler(e:Event):void
        tf.appendText("Load complete: " + e);
    // error handler
    function _onErrorHandler(e:Event)
        if (e.type == SecurityErrorEvent.SECURITY_ERROR)
            tf.appendText("Load failed, Security error: " + e + " type[" + e.type + "]");
        else if (e.type == IOErrorEvent.IO_ERROR)
            tf.appendText("Load failed, IO error: " + e + " type[" + e.type + "]");
    I get a Event.COMPLETE for mine, so the PHP script is definitely firing. Change the URL to something invalid and you'll see the IOErrorEvent fire off right away.
    That leaves you to diagnose the PHP script. Check your error_log and see what is going wrong. You're suppressing errors on your file write which doesn't help you locate the issue saving the file. If you want to handle errors yourself you should do the usual try/catch and handle the error yourself (write a debug log file, anything).

  • PUT and DELETE in Flash AS3

    I am working on the Google Calendar API which has been built for Flex/AIR. In the API, for performing a Delete or Update operation, it uses DELETE or PUT methods in the URLRequest. But I think these being REST based calls are supported in AIR.
    I am using this API in a Flash/AS3 application and have successfully implemented the Update functionality by using X-HTTP-Method-Override method for PUT and instead using POST, which is supported in Flash. But when I try to do the same thing for Delete method, I get a 401 error in the API call.
    Any idea how this problem could be solved?

    AIR supports all the specified HTTP methods, but there seems to be a bug in the HTTPService class. Instead you should use URLLoader and URLRequest. If you change to that you won't even need to use the Method Override header.
    Read more here : http://spy6.blogspot.com/2009/06/adobe-air-put-delete-head-http-methods.html .

  • Calling a Javascript Function

    Hello. I'm relatively new to Flash and CS4, which we just
    purchased. I want to call a JavaScript function in the page from a
    flash .swf file. I'm having trouble getting it to work. Can someone
    please help me understand what I'm doing wrong?
    Actionscript 3 code behind the Flash button:
    import flash.external.ExternalInterface;
    on (release) {
    ExternalInterface.call("GetState","WA");
    JavaScript function:
    <script language="JavaScript" type="text/javascript">
    <!--
    function GetState(state){
    alert(state);
    // -->
    </script>

    "on(release)" is not as3 syntax. If the name of your button
    is getState_btn, you must write something like this:
    getState_btn.addEventListener(MouseEvent.CLICK,getState);
    function getState(evt:MouseEvent):void {
    ExternalInterface.call("GetState","WA");
    I believe that your use of ExternalInterface is correct.

  • Error -Call to undefined function: ocilogon() ( Php4.4+ Apache2.2 +Windows)

    1) Configured Php4.4 to have oci8 enabled with Apache2.2 on Windows 2000 ( service pack4). No error at the time of Apache start but when trying to connect to Oracle using Oracle Instant Client below error is thrown..
    "Fatal error: Call to undefined function: ocilogon() in C:\Apache2 \htdocs\star\dbconnect.php on line 7"
    Configuration steps..
    1) Uncommented "extension=php_oci8.dll" in php.ini to enable oci API's.
    2)Configured Oracle Instant client by adding path to Windows path variable as per it documentation.
    3)Copied all Php4.4 dlls( oci..etc) into the directory pointed by "PHPIniDir", which is configured in httpd.conf
    If i run phpinfo(), i dont see oci8 enabled in the output. I guess there is problem in the configuration? Any insights into the error is greatly appreciated..
    BTW, I did same configuartion on Windows XP and is working fine..

    Also, I dont see path value for path variable in phpinfo() ouput for Oracle Instant Client, which i updated in Windows?
    Below is the snippet of ouput from phpinfo().
    Apache Environment
    Variable Value
    HTTP_ACCEPT image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*
    HTTP_ACCEPT_LANGUAGE en-us
    HTTP_ACCEPT_ENCODING gzip, deflate
    HTTP_USER_AGENT Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
    HTTP_HOST localhost
    HTTP_CONNECTION Keep-Alive
    PATH D:\CESi\isis\bin;D:\CESi\Gateway\mico-win32-bin\;D:\CESi\Gateway\;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program Files\Support Tools\
    SystemRoot C:\WINNT
    COMSPEC C:\WINNT\system32\cmd.exe
    PATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
    WINDIR C:\WINNT
    SERVER_SIGNATURE <address>Apache/2.0.59 (Win32) PHP/4.4.4 Server at localhost Port 80</address>
    SERVER_SOFTWARE Apache/2.0.59 (Win32) PHP/4.4.4
    SERVER_NAME localhost
    SERVER_ADDR 127.0.0.1
    SERVER_PORT 80
    REMOTE_ADDR 127.0.0.1
    DOCUMENT_ROOT C:/Apache2/htdocs
    SERVER_ADMIN [email protected]
    SCRIPT_FILENAME C:/Apache2/htdocs/info.php
    REMOTE_PORT 4977
    GATEWAY_INTERFACE CGI/1.1
    SERVER_PROTOCOL HTTP/1.1
    REQUEST_METHOD GET
    QUERY_STRING no value
    REQUEST_URI /info.php
    SCRIPT_NAME /info.php
    Environment
    Variable Value
    ALLUSERSPROFILE C:\Documents and Settings\All Users
    CMM_CELL CSTAR_STAR
    CommonProgramFiles C:\Program Files\Common Files
    COMPUTERNAME STAR-SM-NR-PROD
    ComSpec C:\WINNT\system32\cmd.exe
    NUMBER_OF_PROCESSORS 2
    OS Windows_NT
    Os2LibPath C:\WINNT\system32\os2\dll;
    Path D:\CESi\isis\bin;D:\CESi\Gateway\mico-win32-bin\;D:\CESi\Gateway\;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program Files\Support Tools\
    PATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
    PROCESSOR_ARCHITECTURE x86
    PROCESSOR_IDENTIFIER x86 Family 6 Model 11 Stepping 1, GenuineIntel
    PROCESSOR_LEVEL 6
    PROCESSOR_REVISION 0b01
    ProgramFiles C:\Program Files
    SMS_LOCAL_DIR C:\WINNT
    SystemDrive C:
    SystemRoot C:\WINNT
    TEMP C:\WINNT\TEMP
    TMP C:\WINNT\TEMP
    USERPROFILE C:\Documents and Settings\xwback
    windir C:\WINNT
    AP_PARENT_PID 884

  • How to load html page or website in flash as3

    hi
    how to load html page or web link (www.google.com)  in flash as3.
    please help me...

    Use the navigateToURL function...
    var url:String = "http://www.wherever.com";:
    var req:URLRequest = new URLRequest(url);
    navigateToURL(req);
    OR in one line...
    navugateToURL(new URLRequest("http://www.wherever.com"));

  • Controlling External Captivate 5 swf using flash AS3

    Hi,
    I have created a basic Flash AS3 interface in which I am trying to control the navigation (next slide / previous slide) of an external captivate 5 swf which I have added using a loader, but i cant work out the solution.
    My code is currently as follows:
    import flash.net.URLRequest;
    var Xpos: Number = 96
    var Ypos: Number = 94
    var my_loader:Loader = new Loader();
    my_loader.load(new URLRequest("content.swf"));
    my_loader.x = Xpos;
    my_loader.y = Ypos;
    addChild(my_loader);
    stop();
    nextBut.addEventListener(MouseEvent.MOUSE_UP,gotonextframe);
    function gotonextframe(event:MouseEvent){
    MovieClip(my_loader.content).rdcmndNextSlide();
    Any help would be much appreciated,
    thanks
    Dez

    Thats perfect, thanks for the reply, much appreciated!
    I guess you have tried:
    rdcmndRewindAndStop
    Set to 1 to rewind and stop the project.

  • Convert Flash AS3 to JAVA .Jar-file?

    Hello All,
    in the old old version of Director, you could export a .JAR
    file from your project. If you stayed within the programming that
    the exporter supported.
    I wonder, as I have seen some "Java to Flash as3"-converters,
    if anything is out there for the opposite?
    Cause I need something to make a JAR file for some simple
    functionality in JAVA, and I thought Flash could aid me..?

    Can someone answer?

  • Calling a private function when inside another class?

    Can't help it but im curious how classes seem to be able to
    call private functions inside other classes. I'm mainly thinking
    about the addEventListener() here. When adding a listening function
    to a class, that function can be private, and yet it seems to be
    called magically somehow. Or maybe its all internal? I dunno.
    Anyone? :D

    Hi Kenchu1,
    You can grab a copy of the open source API here:
    http://www.baynewmedia.com/download/BNMAPI10.zip
    (feel free to drop by
    the main site for documentation as well :) ). The main class
    is the
    Events class, "broadcast" method. This method broadcasts
    events in a
    decoupled fashion, meaning that listeners can listen to
    messages that
    aren't bound to a specific sender. The AS3 version works in
    much the
    same way except that I still haven't fully fleshed out the
    cross-SWF
    communication that this version can do (broadcast across all
    movies on
    the same computer using LocalConnection).
    Basically, the broadcaster works like this:
    1. Add event listener and bind to function A (called from
    within the
    class so the reference is available)
    2. Event listener pushes this into the listener array. It was
    provided
    by the class so the reference is valid and is now a part of
    the events
    class as well.
    3. Broadcast runs through all associated events when it comes
    time to
    broadcast and calls the function by using the array
    reference:
    this.listeners[message].call(classInstance,someParameter);
    In other words, the class that adds the listener "allows"
    the event
    broadcaster to use the reference because it passes it out.
    You can do
    the same thing by calling:
    someOtherclass.functionRef=this.privateFunction
    someOtherClass is the class that will store the private
    reference,
    functionRef is some variable to hold the reference, and
    privateFunction
    is the private function. Then, in someOtherClass, you can
    call:
    this.fuctionRef(someParameter);
    Hope this helps.
    Patrick
    Kenchu1 wrote:
    > Patrick B,
    > exactly! Something like that is what im looking for. I
    have my own rather
    > simple system right now with listeners and classes
    calling these, but since i
    > dont know how to call a private function, i had to make
    all the listening
    > classes functions public - something id rather avoid.
    Exactly how did your
    > event broadcasting system work? Oh, and we're talking
    AS3 btw.
    >
    > How do i call a function via a reference? (to the
    function? To what?)
    >
    http://www.baynewmedia.com
    Faster, easier, better...ActionScript development taken to
    new heights.
    Download the BNMAPI today. You'll wonder how you ever did
    without it!
    Available for ActionScript 2.0/3.0.

  • Flex Builder 4 (next version) will be called Flash Builder

    Adobe has just announced that the next version of Flex Builder will be called Flash Builder .. the framework will still be called Flex
    I think although the change is confusing, in the long run it adds clarity ... here's why ...
    1. Flash Builder (formerly Flex Builder) is an IDE to write .SWF (Flash Player) files .... no matter what application framework you use, it could be pure AS3 code (i.e your own framework) , Flex framework or anything else .. there are many other framework options (although Flex is the most mature) ... Flash Builder can be used to build in any of those frameworks.
    2. Flex is a framework of classes that solve several everyday application development problems when building apps that can run in the Flash Player ... you can use any tool to write your own classes that use flex framework classes (a flex application) ... Flash Builder (previously Flex Builder) or FDT or a text editor like TextMate.
    Mrinal

    Still don't like the name change...but after chatting for you on Twitter...I think I can use to it -;)
    Greetings,
    Blag.

  • An URLRequest url Problem or a Flash as3 bug?

    hi, guys
    I'm working with a Flash based HLS player. I am unable to locate a redirect url while the request server response a 302 redirect code.
    is this a bug in Flash AS3 ?
    var url:String = "http://aaa.company.com/xxxx"; (response a 302 code and redirect to http://bbb.company.com/yyyy)
    var req:URLRequest = new URLRequest(url);
    var dispatcher:URLLoader = new URLLoader(req);
    dispatcher.addEventListener(Event.COMPLETE, handlefunction);
    function handlefunction(event:Event):void
         trace(req.url); 
         // the console outputs  "http://aaa.company.com/xxxx"
         // or trace((event.currentTarget as URLRequest).url); the output is same.
         // it should be "http://bbb.company.com/yyyy"
         // but the event.currentTarget.data is ok.
         // so how can I get the new url ?
         // is this a bug in flash as3?
    thanks.

    I tried to use Socket instead of URLRequest.
              _sock = new Socket();
                _sock.addEventListener(Event.CONNECT,connectHandler);
                _sock.addEventListener(Event.CLOSE,closeHandler);
                _sock.addEventListener(ProgressEvent.SOCKET_DATA,socketDataHandler);
                _sock.addEventListener(Event.COMPLETE,completeHandler);
                _sock.addEventListener(SecurityErrorEvent.SECURITY_ERROR,function(e:SecurityErrorEvent):v oid{trace("security error");});
                _sock.addEventListener(IOErrorEvent.IO_ERROR,function(e:IOErrorEvent):void{trace("io error");});
    internal function connectHandler(event:Event):void {
                trace("Connect...Ok");
                //HTTP Request Header
                var header:String = "GET "+_url+" HTTP/1.1\r\n";
                header += "Accept: */* \r\n"
                header += "Accept-Language: zh-cn \r\n";
                header += "User-Agent: Mozilla/4.0 \r\n";
                header += "Host: " + _host+":"+_port + " \r\n";
                header += "Connection: Keep-Alive \r\n";
                header += "Cache-Control: no-cache \r\n\r\n";
                //write header string            
                _sock.writeUTFBytes(header);
                _sock.flush();
    internal function socketDataHandler(event:ProgressEvent):void {
                //trace("socketDataHandler:"+event.bytesLoaded);
                var data:String = _sock.readUTFBytes(_sock.bytesAvailable);
                trace(data);         
    Outputs:
    HTTP/1.1 302 Moved Temporarily
    Date: Tue, 24 Apr 2012 07:25:35 GMT
    Server: Apache-Coyote/1.1
    Location: http://61.147.88.128/3/345/281/000
    Content-Length: 0
    X-Via: 1.1 nh227:9090 (Cdn Cache Server V2.0)
    Connection: keep-alive
    Finally, I got the 302 status, but I have some "sandbox" issue to solve.
    Thanks.

Maybe you are looking for

  • How do I add multiple pictures to email?

    how do I add multiple pictures to email?

  • Problems with JFileChooser and Windows 2000 (can't see mydocuments contents

    Hi! I've an applet which has a JFileChooser component. In other Windows, I can select the MyDocuments folder and it goes there and list all the contents OK. But, in Windows 2000, when I go to MyDocuments, none of the contents is listed in the file ch

  • Master and Document Tables ...

    What relation do Master and Document tables have to parent and child tables? Should I declare all my created tables master and master details ?  how can I establish my relationships, foreign keys and primary keys with all these fields created by SAP

  • Newsletter displays as source code when I send it

    I've read articles that said to send an HTML newsletter you make a webpage and copy it into the body of an email. I created an HTML page, copied the source code and pasted it into the body of an email and sent it to myself but when I received it it s

  • Ipod will not erase q

    I have been using my 30gb ipod to transfer some files from one computer to another. I put the files in the trash on the mac and it still says that it is full. Do I need to empty the trash in order to get the files off the ipod? not sure what to do no