loadClip method problems

  • hiksa
  • Born
  • Born
  • hiksa
  • Posts: 1

Post 3+ Months Ago

hi guys,
can anyone tell me how to load external .swf using loadClip method with additional parameters ??

somethins like:
Code: [ Select ]
 
var mcl:MovieClipLoader = new MovieClipLoader();
 
mclL.onLoadProgress = function(target, loaded, total) {
  temp = Math.round((loaded/total) * 100);
  loader.percent.text = temp + "%";
  loader.progressBar._width = temp;
}
 
mclL.onLoadInit = function() {
  loader._visible = false;
  loader.percent.text = "";
  temp = 0;
  loader.progressBar._width = temp;
}
 
mcl.addListener(mclL);
 
mcl.loadClip('my_clip.swf?param=false', holder);
 
  1.  
  2. var mcl:MovieClipLoader = new MovieClipLoader();
  3.  
  4. mclL.onLoadProgress = function(target, loaded, total) {
  5.   temp = Math.round((loaded/total) * 100);
  6.   loader.percent.text = temp + "%";
  7.   loader.progressBar._width = temp;
  8. }
  9.  
  10. mclL.onLoadInit = function() {
  11.   loader._visible = false;
  12.   loader.percent.text = "";
  13.   temp = 0;
  14.   loader.progressBar._width = temp;
  15. }
  16.  
  17. mcl.addListener(mclL);
  18.  
  19. mcl.loadClip('my_clip.swf?param=false', holder);
  20.  
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • fitzpatrick1982
  • Born
  • Born
  • fitzpatrick1982
  • Posts: 2

Post 3+ Months Ago

try this code:

Code: [ Select ]
var Xpos:Number=22;
var Ypos:Number=162;
var swf:MovieClip;
var loader:Loader=new Loader();

var defaultSWF:URLRequest=new URLRequest("Destination_Folder/filename.swf");

loader.load(defaultSWF);
loader.x=Xpos;
loader.y=Ypos;
addChild(loader);
//////////////////////////////////////////////////////////////////////////////

//Buttons Universal functions
function btnClick(event:MouseEvent):void{
    
    removeChild(loader);
    var newSWFRequest:URLRequest=new URLRequest("Destination_Folder/"+event.target.name+".swf");
    loader.load(newSWFRequest);
    loader.x=Xpos;
    loader.y=Ypos;
    addChild(loader);
}
//Buttons Listener
Btn.addEventListener(MouseEvent.CLICK,btnClick);
  1. var Xpos:Number=22;
  2. var Ypos:Number=162;
  3. var swf:MovieClip;
  4. var loader:Loader=new Loader();
  5. var defaultSWF:URLRequest=new URLRequest("Destination_Folder/filename.swf");
  6. loader.load(defaultSWF);
  7. loader.x=Xpos;
  8. loader.y=Ypos;
  9. addChild(loader);
  10. //////////////////////////////////////////////////////////////////////////////
  11. //Buttons Universal functions
  12. function btnClick(event:MouseEvent):void{
  13.     
  14.     removeChild(loader);
  15.     var newSWFRequest:URLRequest=new URLRequest("Destination_Folder/"+event.target.name+".swf");
  16.     loader.load(newSWFRequest);
  17.     loader.x=Xpos;
  18.     loader.y=Ypos;
  19.     addChild(loader);
  20. }
  21. //Buttons Listener
  22. Btn.addEventListener(MouseEvent.CLICK,btnClick);
Moderator Remark: Added [code] tags

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 20 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.