A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: display.Loader not working firefox

  1. #1
    Registered User
    Join Date
    Mar 2012

    display.Loader not working firefox

    I was wondering if someone could help, as I am not much of an actionscript guru.

    I just inherited some code that produces an embedded rdio music player into a swf. It works great in firefox and safari, except the embedded player does not appear in Firefox...

    Is this a common issue with the Loader class or contentLoaderInfo events?

    import flash.display.Loader;
    import flash.display.Sprite;
    import flash.display.StageAlign;
    import flash.display.StageScaleMode;
    import flash.events.*;
    import flash.net.URLRequest;



    var loader_url:String = 'rd.io/e/QUzrrjNWMC8/220/500/';
    var loader_x:int = 40;
    var loader_y:int = 50;

    /* RDIO EMBED */

    stage.scaleMode = StageScaleMode.NO_SCALE;
    stage.align = StageAlign.TOP_LEFT;
    var loader:Loader = new Loader();
    loader.load( new URLRequest(loader_url) );
    loader.contentLoaderInfo.addEventListener(Event.CO MPLETE, loaderDone);
    var sprite:Sprite = this;
    function loaderDone(event: Event):void
    event.target.removeEventListener(Event.COMPLETE, loaderDone);
    loader.x = loader_x;
    loader.y = loader_y;

  2. #2
    Will moderate for beer
    Join Date
    Apr 2007
    Austin, TX
    Use [code] tags to post code.

    That should work. It certainly should behave the same in firefox and safari. Do you have the same version of the flash plugin in each?

    There's no need for your sprite variable. Since it's a reference to "this", which is the main timeline, you can just remove that variable and change the addChild line to just addChild(loader).

Tags for this Thread

Posting Permissions

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

Click Here to Expand Forum to Full Width

HTML5 Development Center