Jump to content
GreenSock

lukaMis

Members
  • Posts

    11
  • Joined

  • Last visited

Posts posted by lukaMis

  1. Hi

     

    I have a question about getting a value of an object with _gsTransform. I get undefined and i have to use GreenProp to get values. I would like to know what am i doing wrong. 

     

    Here is my code:

    TweenLite.set( picObj.picture, { scale: _s, x: _tempX, y: _tempY });
    console.log("gp: ", GreenProp.x(picObj.picture));
    console.log("_gsTransform: ", picObj.picture._gsTransform.x);
    

    Log from _gsTransform is undefined, log from GreenProp is a value i set.

    What am i doing wrong?

     

    Tnx

    hf

    Luka

     

  2. Hi

     

    While testing in flash i found out that SWFLoader did not use alternateURL when i added property estimatedBytes.

     

    Example 1:

    bgAssetsLoader.append(new SWFLoader("swfs/backgroundAssets/background/background.swf", { alternateURL: "background/background.swf", name: "background" + "Loader", container: bgHolder } ));

    Flash found swf via alternateURL and displayed content. Content was displayed normally when using swf that loaded background via normal url property.

     

    Example 2:

    bgAssetsLoader.append(new SWFLoader("swfs/backgroundAssets/background/background.swf", { alternateURL: "background/background.swf", name: "background" + "Loader", container: bgHolder, estimatedBytes: 31000 } ));

    Flash did NOT find swf via alternateURL and did NOT displayed content. Content was displayed normally when using swf that loaded background via normal url property.

     

    Am i doing something wrong here?

    Luka

  3. Hi

     

    Well issue resolved. :D

    Problem was that I used alternateURL property as I am loading swfs from different locations (in folder structure). I just switched main and alt url path. So i get errors when i recompile swf inside folder but i do not get them when loading from main swf that is above all folders.

    It did not work in Safari because url path was not correct and loading hang instead switching to alt url. Do not know why. Firefox was able to switch to alt url and proceed.

     

    tnx for support

    Luka

  4. Well i think i have latest version. Where can i check which version i have on my computer?

    I guess it does not matter i will just download again and recompile all swfs and try again. Anyway fla will do you no good as it is used only for document class that is external. Currently i have setup like this:

    Index.swf loads page.swf that loads bgAssets.swf and interactiveAssets.swf each of these loads a few swfs.

    I am thinking of changing all that so page.swf will load all of the swfs and than i will work from there. What is better or lets say more optimized solution?

     

    update. i tried hole thing on mac computer and it works in safari but it does not work in firefox but like i said before on pc it works on firefox but not in safari or ie. weird

    it sucks that flash really does not works the same in all browsers

     

    tnx

    Luka

  5. Hi

     

    I am making page and i just finished most of my outer framework that i need to load all ( well not all yet it is work in progress) swfs that i require. Page works great in firefox and chrome but does not work in safari and ie. In both browsers preloading stops at 92% and does not continue. It just hangs there. Any had similar problems? Any ideas?

     

    tnx Luka

  6. I got a bunch of errors when I tried to publish the files (missing google class, missing swfs, etc.) but I think I see exactly what's causing the problem you originally asked about. You're not creating your loaders on the first frame - you create an ENTER_FRAME listener and delay creating the loaders until the next frame render. Therefore when your swf inits, the loaders don't exist and SWFLoader cannot find them. Your loaders MUST exist when your swf inits (finishes rendering its first frame), otherwise LoaderMax can't find them (it would be impossible). See what I mean?

     

    Tnx a lot for clearing this for me. It is what you said.I made one loader swf that loads other swfs and preloader swf that loads loader swf and it works like docs say it will. I trace preloader complete event after all subload traces. I just did not use ENTER_FRAME event to start the hole thing in the first place. Just for the fun of it i tried again with ENTER_FRAME and it did not work so that was my problem.

     

    tnx a lot. this class rocks.

     

    Luka

  7. Hi

     

    I am having truble integrating child swf loaders in to main swf loading. I read docs and it should work by default but i can no get it to work. My parent swf fires its complete event before child swf finishes with its loads. My setup is as like this:

     

    index.swf that contains following code:

        pageLoaderMax = new LoaderMax({name: "pageLoaderMax", onComplete: pageLoaded, requireWithRoot:this.root});
    
       pageLoaderMax.append( new SWFLoader("page.swf", {name:"pageLoader", container: pageHolder, requireWithRoot:this.root }) );
    
       pageLoaderMax.load();
    
    } ////preloaderLoaded
    
    function pageLoaded(evt:LoaderEvent):void
    {
       trace("PAGE LOADED");
    }

    This swf is only responsible for loading page swf that contains multiple SWF loaders inside one LoderMax, like this:

        mainPartsLoader = new LoaderMax({name:"mainPartsLoader", onComplete: mainPartsLoaded, onProgress: progressHandler, requireWithRoot:this.root});
    
       mainPartsLoader.append( new SWFLoader("swfs/background.swf", {name: "bg", container: bgHolder, y: 0, requireWithRoot:this.root}) );
       mainPartsLoader.append( new SWFLoader("swfs/blueBar.swf", {name: "blueBar", container: blueBarHolder,  y: 630, requireWithRoot:this.root}) );
    
       mainPartsLoader.append( new SWFLoader("swfs/btnPortfolio.swf", {name: "btnPortfolio", container: buttonsMainHolder, requireWithRoot:this.root, x: 328, onComplete: btnLoaded}) );
       mainPartsLoader.append( new SWFLoader("swfs/btnFoto.swf", {name: "btnFoto", container: buttonsMainHolder, requireWithRoot:this.root, x: 439, onComplete: btnLoaded}) );
       mainPartsLoader.append( new SWFLoader("swfs/btnInfo.swf", {name: "btnInfo", container: buttonsMainHolder, requireWithRoot:this.root, x: 550, onComplete: btnLoaded}) );
       mainPartsLoader.append( new SWFLoader("swfs/btnArhiv.swf", {name: "btnArhiv", container: buttonsMainHolder, requireWithRoot:this.root, x: 662, onComplete: btnLoaded}) );
       mainPartsLoader.append( new SWFLoader("swfs/btnReel.swf", {name: "btnReel", container: buttonsMainHolder, requireWithRoot:this.root, x: 773, onComplete: btnLoaded}) );
    
       mainPartsLoader.load();
    
    function mainPartsLoaded(evt:LoaderEvent):void
    {
       trace("all content loaded");
    }
    
    function progressHandler(event:LoaderEvent):void
    {
      // trace("progress: " + event.target.progress * 100);
    }
    
    function btnLoaded(evt:LoaderEvent):void
    {
       trace(evt.target.name);
       //trace("btnLoaded");
    }

     

    But it does not work and parent swf (index ) gives me eventComplete before child swf finishes and i get traces for actual swfs inside child(page) after i get trace that index.swf (my parent swf) has event.complete.

    I hope that my explanation makes some sense.

     

    So what am i doing wrong. Why do i not get event.complete from parent last?

     

    Luka

  8. Hi

     

    Well it does to some extent. What is the best practice for using LoaderMax and/or SWFLoader regarding garbage collection. Is it best to use autoDispose to get rid of loader after it has done its job, or is it better to keep it around? :)

    I am building a website and garbage collection is very important for me for this project as it must function as smoothly as possible. (for that reason i am using greenSock tween engine, it the best :))

     

    Luka

  9. Hi

     

     

    I have a question about SWFLoader. Do i need to remove any event listeners in onCompleteHandler? I was used to write my code like that

    function onCompleteHandler(e:Event):void
    {
    loader.removeEventListener(Event.COMPLETE, onCompleteHandler);
    loader = null;
    }
    

     

    And i wander what do i have to do when using SWFLoader and LoaderMax.

     

    tnx

    hf

    Luka

×