Jump to content


  • Posts

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




     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});
    function initHandlerMain(event:LoaderEvent):void {
    function progressHandlerMain(event:LoaderEvent):void {
       var childMain:ContentDisplay = LoaderMax.getContent("childMain");
       TweenLite.to(childMain, 1, {alpha:1});
    function completeHandlerMain(event:LoaderEvent):void {
    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");
    //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

  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) :




    and get:


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


    When I try



    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




    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 !