Director - Flash AS2 - Flash AS3 via localconnection?

I have a Director MX2004 app that I would like to use to control a Flash swf written in AS3.  I know I can't embed that kind of SWF file in Director, so I thought I would try to use this method:
Embed an AS2 swf in director and communicate with that.
Have that swf use the localconnection to communicate with the AS3 swf running in Air.
I can verify that the 2 swfs communicate when running in Flash and Air
I can verify that Director can communicate with the AS2 swf embedded in it.
But I can't link it all together.  Send a command to the AS2 swf from Director doesn't continue down the chain to talk to the AS3 swf.
Is this something that could possibly work, or am I beating a dead horse?

Hi,
Did you have any luck with this method?
I am using Dir 12 now and Flash CS6.
Thanks,
Jim

Similar Messages

  • As2 and As3 on same Flash Player

    If i set AS2 codes to play in Flash Player 9, is it possible
    that this swf can load an As3 swf at the same Flash Player using
    As2 codes???
    These swfs both play in same virtual machine which is player
    version 9 but the other is coded with As2 and the other is coded
    with As3. How can an AS2 load a swf coded in AS3 on same Flash
    player?
    Is this possible?
    If yes, how? if no, why not?

    AS2 and AS3 swfs cannot exist in the same Flash Player
    virtual machine - each Flash Player instance (version 9 and
    greater) create different address spaces/virtual machines because
    the requirements of AS3 and AS2 are so different.

  • How do I find the AS that this links to in my flash file via "find"?

    I have a flash file that I have on a web page. When I hover over the Join Us image, the mouse changes to a hand. I can click on the "button" but it doesn't take me anywhere. I'm trying to find out if there is a way to find the link in my Flash file via the "Find" function. What is causing the "hand" to appear, is there a goto or click actionscript that I can search? It's a pretty complex file which I didn't create, and I've had no luck finding this button layer, or AS.
    I'm hoping to find where this AS is and link it to a page on my site. Thanks!

    Ned, you're back to save the day for me again. You helped me with the mask issue I had a few days ago and I'll have you know, the flash ad came out brilliantly. Everyone loved it.
    So you were right, I did find the code AS3.
    onClipEvent (load) {
        this.hitArea = this.area;
    on (rollOver) {
        this.gotoAndPlay("s1");
    on (releaseOutside, rollOut) {
        this.gotoAndPlay("s2");
    on (release) {
    s1 and s2 are animations where the Join Us text rolls out and Rolls in as different colors.
    I added the following to the code and it seems to work great.
    onClipEvent (load) {
        this.hitArea = this.area;
    on (rollOver) {
        this.gotoAndPlay("s1");
    on (releaseOutside, rollOut) {
        this.gotoAndPlay("s2");
    on (release) {
              getURL("http://mysite.html", "_self", "GET");
    Thanks again for pointing me in the right direction. I think I may owe you a lunch or something after this is all said and done!

  • 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?

  • Loading Flash AS3/XML into Flex 3

    I'm seriously at a loss.
    I'm loading a Flash AS3 SWF into Flex via SWFloader and it
    will not load the xml data the file normally loads. The Flash file
    is fairly basic and loads XML data from a local file.
    I've tried all sorts of scoping within the Flash file
    pointing to the xml file just in case but still nothing. What do I
    need to do to get this file to read the XML through Flex 3?
    <mx:SWFLoader x="9" y="14" width="140" height="90"
    source="swfs/sponsors/top_sponsors.swf"/>
    The xml file is in the same directory.

    The migration of this file to proper AS3 is brutal. It would
    be easier to just rewrite the whole thing in flex. Screw it.

  • Regarding loader Error in flash as3

    My  project is converting as2 to as3 flash file.  In AS2 ,  I am using "loadmovie" to load the external swf also it gets totalframes of swf . It works correctly. But  In as3 i am  using "loader" to load the external swf. But the  "loader" is not calculated the external swf total frames.Then how to calculate totalframe in as3. plz give any idea

    Here is an example of a progress listener and funtion for AS3.
    loader.addEventListener(ProgressEvent.PROGRESS, progressHandler);
    private function progressHandler(evt:ProgressEvent)
                var perc:Number = evt.bytesLoaded / evt.bytesTotal;
                if(evt.bytesLoaded == evt.bytesTotal)
                    evt.target.removeEventListener(ProgressEvent.PROGRESS, progressHandler);
                   //now you can do something else

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

  • 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.

  • Is there a way to transfer photos from a point and shoot camera to a flash drive via the iPad?

    Is there a way to transfer photos from a point and shoot camera to a flash drive via the iPad?

    No.

  • Im trying to transfer photos from my ipad to a flash drive, via a windows computer. when i click upload from windows, a message says no photos available. Can anyone help me??

    I'm trying to transfer photos from my ipad to a usb flash drive, via my windows computer. When i click upload photos, i get a message no photos available on this device. What am
    I dong wrong?

    If you have the iPad connected to the PC and think that you can simply copy the photos to the drive via the iPad without importing them to the computer first, you can't. Import them to the PC them copy them to the device.
    iOS: Import personal photos and videos from iOS devices to your ...

  • Other problems with loading Captivate files into Flash AS3 project

    I have a Captivate file done with Captivate 3, published to
    Flash player 9 that is being loaded into Flash AS3. The captivate
    is a simple recording of some mouse clicks in a browser. I am
    displaying the playbar along the bottom, and its buttons all work
    fine except for the progress bar, where you can drag the knob and
    scrub back & forth in your presentation.
    This progress bar is not working as it should. I see the
    mouse cursor change to a hand, but when I click I cannot drag the
    knob to control the progress bar. The other buttons in the playbar
    do work (replay, pause, play, back, forward).
    This is a unique problem in that it is only happening when
    viewed in IE (7) when loaded into my Flash AS3 project. When viewed
    in Firefox in my project, or as a standalone SWF, or as a SWF
    simply embedded onto a plain HTML page, it works just fine.
    Does anybody have any insight?
    Another thing I notice with loading Captivate files with AS3
    is the the amount of output messages it displays. Rather annoying
    (unless this is a "feature" I've yet to be aware of - heh)

    Hi,
    I know exactly how you feel, there is simple answer; replace
    Captivate for Camtasia Studio 5 at techsmith.com. The weight on
    those shoulders will be gone! You'll smile more, be more
    socialable. One Happy Person.
    I am very happy person ;)
    Kind Regards,
    Boxing Boom

  • 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.

  • 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/

  • Create a toc from adobe flash as3?

    hi guys
    i wante to create a completely toc in adobe flash as3? is there any way to do this?
    for example i want to create a toc file with full size logo (photo form toc information)
    or change duration location with slide title
    i want also another questiion about sdk folder in adobe captivate, i found some swc file in this folder, but i want documetion to use this swf file in custome development,
    thank

    Hi
    Please elaborate a bit more as you want users to download pdf from your site or print site page as pdf etc
    If its regarding documents then you can add add df documents in your site and then link them to pages where users can download the pdf, if you are referring to print page then you can provide information for ctrl+p/cmd+p , or add html code for print shortcut.
    https://forums.adobe.com/message/6319543
    Thanks,
    Sanjit

Maybe you are looking for