0 Replies Latest reply on Mar 17, 2011 8:31 AM by Niro_kal

    banner + clickTag + swfLoader in as3

    Niro_kal

      Hi all

      i'm trying to load an external swf with clickTag parameter and having some diffecolts

       

      my swf that load the external is looks like this (base)

       

      //----

      var swfLoader:Loader = new Loader();

      holderMC.addChild(swfLoader);

       

      var externalFullPath:String = '300-250.swf'

      var swfURL:URLRequest = new URLRequest(externalFullPath);

      swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadProdComplete);

      swfLoader.load(swfURL);

       

      function loadProdComplete(e:Event):void {

           e.target.content.setBase(this)

      }

       

      function direct():void{

      trace('trigerd')

      if (root.loaderInfo.parameters.clickTag.substr(0,5) == "http:" || root.loaderInfo.parameters.clickTag.substr(0, 6) == 'https:') {

      navigateToURL(new URLRequest(root.loaderInfo.parameters.clickTag),root.loaderInfo.parameters.TargetAS);

      }

      }

       

      //---

       

      its load the external swf fine.. 

       

      at the external swf as it completed i set the main swf to be "base" -  e.target.content.setBase(this) -

       

      public function setBase(_base:MovieClip):void {

      base = _base

      }

       

      and this function is setting the base to a new movie clip

       

      and then i can call it when ever like this "base.direct()" it seams like it calls the function, i see the trace but the clickTag is not working

      but if i calling the same function - "direct()" - from the main swf its working

       

      any idies how i can do it right and to get the clickTag by clicking on the external swf

       

      thaks in advanced