Jump to content
Search Community

own.on

Members
  • Posts

    5
  • Joined

  • Last visited

Posts posted by own.on

  1. No no, not a subdomain, a crossdomain (like if the parent is on greensock.com and the child is at yahoo.com). Or did you use a distinct SecurityDomain in a LoaderContext? I wonder if the tool you're using does that (SlideShowPro). I'd encourage you to ask them about it (I'm not familiar with that tool).

     

    No crossdomain.

    To be sure SlideShowPro is not the cause I perform tests with 2 simple files:

     

    test.fla:

     

     import com.greensock.*;
       import com.greensock.loading.*;
       import com.greensock.events.LoaderEvent;
       import com.greensock.loading.display.*;
       import com.greensock.TweenMax;
    
    
    ////////////////////////////////
    // TwinMax Loaders //
    ////////////////////////////////
    
    var mainContent:SWFLoader = new SWFLoader("sspViewerWork.swf", {name:"childMain", estimatedBytes:3000, container:container_main, x:0, y:0, alpha:1, onInit:initHandlerMain, onProgress:progressHandlerMain, onComplete:completeHandlerMain, onError:errorHandlerMain});
    mainContent.load();
    
    function initHandlerMain(event:LoaderEvent):void {
       //trace("initHandlerMain");
    }
    
    function progressHandlerMain(event:LoaderEvent):void {
       //trace(this);
       var childMain:ContentDisplay = LoaderMax.getContent("childMain");
       TweenLite.to(childMain, 1, {alpha:1});
    }
    function completeHandlerMain(event:LoaderEvent):void {
    mainContent.rawContent.callFunctionInLoaded();
    trace(mainContent.rawContent.test);
    }
    function errorHandlerMain(event:LoaderEvent):void {
       trace("error occured with " + event.target + ": " + event.text);
    }
    // END  TwinMax / TwinLite Loaders
    
    
    ////// try to get variables in swf
    function callFunctionInMainFromLoaded() {
    trace("this function located in main swf is called from the loaded swf")
    }
    
    

     

    and sspViewerWork.fla (loaded swf):

     

    var test:String;
    test = "variable loacated in loaded swf";
    //trace("trace in swf");
    
    function callFunctionInLoaded() {
    trace("this function is in the loaded swf");
    }
    
    MovieClip(this.parent.parent).callFunctionInMainFromLoaded();
    
    //var curParent:DisplayObjectContainer = this.parent.parent;
    //   Object(curParent).callFunctionInMainFromLoaded(); // NO
    
    //var parentObj:Object = this.parent.parent as Object;
    //parentObj.callFunctionInMainFromLoaded(); // NO
    
    // MovieClip(parent).callFunctionInMainFromLoaded(); // NO
    
    //callFunctionInLoaded();

  2. Thank you very much, it works fine!

     

    I tried the opposite way : call a function in main stage from a loaded swf but ... without success.

     

    I tried (loaded swf) :

     

    MovieClip(parent).callFunctionMainStage();

     

    and get:

     

    TypeError: Error #1034: Type Coercion failed: cannot convert com.greensock.loading.display::ContentDisplay@22c9b061 to flash.display.MovieClip.

     

    When I try

    MovieClip(this.parent.parent).callFunctionMainStage();

     

    I get :

     

    TypeError: Error #1010: A term is undefined and has no properties.

    at MethodInfo-1793()

  3. Hello

     

    I'm just starting with TweenLite and TweenMax.

     

    Please accept my apologies for this - I guess - very basic question :

     

    I can load external swf on stage using TweenLite or TweenMax but the huge problem (for me :-/) is to get access to loaded content : function, properties, etc.

     

    For example, I would like to send orders to a loaded swf to call internal swf functions or properties. In other way I'm seraching for the code who allow a virtual transparency of loaded content in order to interact with loaded content like normal content, on stage.

     

    For example I load inside a container swf containing an instance of SlideShowPro inside a container but I cannot find the way to send things like :

     

    container.(SlideShowPro-Instance-name).properties = something

     

    or

     

    call a function inside loaded swf.

     

    How to virtualy get access to loaded content as it was on stage ?

     

    Thank you very much in advance for your help !

×
×
  • Create New...