SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2007
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up loading external swf with AS3.0 not working online.

    hi, i`m using the following to load an external swf file.
    it`s working fine locally, but once i put it on the server, it doesn`t load anything.

    Code:
    import flash.display.Loader;
    import flash.net.URLRequest;
    
    var external1:MovieClip;
    var perc1:Number;
    
    var url1 = new URLRequest("swf/external1.swf");
    var Eloader1:Loader = new Loader();
    Eloader1.load(url1);
    
    
    Eloader1.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,loop1);
    Eloader1.contentLoaderInfo.addEventListener(Event.COMPLETE, loaded1);
    
    function loop1(evt:ProgressEvent):void{
    	perc1 = evt.bytesLoaded/evt.bytesTotal*100;
    	
    	trace("E1:"+perc1);
    }
    
    
    //LOADED
    
    function loaded1(e):void{
          external1 = e.target.content;
    	  addChild(external1);
    
    }
    what am I doing wrong?
    please help me.

  2. #2
    SitePoint Guru [Paul Ferrie]'s Avatar
    Join Date
    Oct 2007
    Location
    Glasgow, Scotland, UK
    Posts
    853
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can you post a link to the page where these files are at?
    .:To me AS is like LEGO, Only for the big Kids :.
    - Site - Blog - Glasgow Flasher
    bringmadeleinehome.com

  3. #3
    SitePoint Enthusiast
    Join Date
    Sep 2007
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    it was just my files being locked.
    sorry for posting.

    thank you

  4. #4
    SitePoint Member
    Join Date
    Sep 2008
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    how did you unlock it?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •