HTMLLoader loading local content (SWF files) problem

Hello guys,
I'm just finishing my application but I facing a problem.
I'm currently developing a desktop application using AIR.
I'm using HTMLLoader to load local SWF files when te user tries to access specific content on the application.
I successfully accomplished this, but the loaded SWF also loads other files (assets and xml files with translations) and that is not working.
When a SWF is loaded he just stops on his own loading screen (when loading the XML files).
All this stuff is happening on my CustomNativeWindow:
(my CustomNativeWindow "overlays" the main application)
public function CustomNativeWindow()
         var nativeWindowInitOptions:NativeWindowInitOptions = new NativeWindowInitOptions();
         nativeWindowInitOptions.systemChrome = NativeWindowSystemChrome.NONE;
         nativeWindowInitOptions.renderMode = NativeWindowRenderMode.DIRECT;
         nativeWindowInitOptions.resizable = false;
         nativeWindowInitOptions.maximizable = false;
         nativeWindowInitOptions.minimizable = false;
         super(nativeWindowInitOptions);
         alwaysInFront = true;
         this.activate();
public function setProperties(contentName:String, contentURL:String, posX:Number, posY:Number, stageWidth:Number, stageHeight:Number):void
          this.stageHeight = stageHeight;
          this.stageWidth = stageWidth;
          this.contentURL = contentURL;
          this.contentName = contentName;
          this.x = posX;
          this.y = posY;
          this.width = stageWidth;
          this.height = stageHeight;
          this.title = contentName;
          this.addEventListener(Event.RESIZE, onWindowResize);
          SWFHTMLLoader();
private function SWFHTMLLoader():void
          //REQUEST LOAD URL
          var request:URLRequest = new URLRequest(contentURL);
          //HTML LOADER SWF
          htmlLoader  = new HTMLLoader();
          htmlLoader.width = stageWidth;
          htmlLoader.height = stageHeight;
          htmlLoader.addEventListener(Event.COMPLETE, onHtmlLoaderComplete);
          htmlLoader.load(request);
          stage.addChild(htmlLoader);
private function onHtmlLoaderComplete(e:Event):void
          trace("NATIVE WINDOW HTMLLoader complete");
          onWindowResize();
private function onWindowResize(e:Event = null):void
          if (htmlLoader)
                    htmlLoader.width = stage.stageWidth;
                    htmlLoader.height = stage.stageHeight;
Probably something related to security?
How can I fix this?
Is kinda urgente... deadline is coming...
Thank you!

Thank you kglad for your fast response...
The reference to the content comes from a XML loaded on the main application.
var xml:XML =      <Content  en="game" >
                                  <ImageSource>assets/images/gallery/resources/gameone.png</ImageSource>
                                  <ContentSource>content/gameone/gameone.swf</ContentSource>
                            </Content>;
contentURL = xml.ContentSource;
So contentURL is: content/gameone/gameone.swf
Am I in trouble?

Similar Messages

  • Problems loading Adobe Flash SWF file

    Our users are experienceing problems loading Adobe Flash SWF
    files.
    One example of a problem file is:
    http://www.adobe.com/enterprise/accessibility/popup_acr8_accessibility.html
    User traffic is flowing through a Cisco ASA firewall - these
    problems do not seem to occur from home networks or a Netscreen
    firewall. The Cisco ASA does NOT have http deep packet inspection
    turned on, and any traffic initiated by clients inside the firewall
    should be allowed. The symptom is that Internet Explorer will begin
    to download the video, but will hang at some point along the way
    (for this particular URL it hangs at about 7%). No error messages
    are displayed, but the video never displays on the screen either. I
    would appreciate hearing from anyone who may have run into this
    before, or if someone can explain what is different about this type
    of file from regular Adobe Flash, that might help figure out what
    the ASA is objecting to. The ASA does not appear to generate any
    log messages about denying this type of traffic either.
    Thanks in advance for any help you can provide...

    Thanks, but I use publish/export settings with GPU hardware acceleration and flash version 11.2 (and 11.8) but nothing happening.
    And why gif file is not all transparenty then I insert on lightblue background? It can't export good quality? Also I use Photoshop, After Effects, Adobe Edge Animate. And nothing happening. Egde animate file .oam is not good for old website navigation. It can't be inserted in freeshop site from navigation... I use logo file .oam just for example here - http://e-shoptagras.graphicsrim.eu
    In reality I want swf file, but we don't find why logo flickering? here http://tagraseshop.graphicsrim.eu
    All file's are transparenty - https://mega.co.nz/#!f8B2CD5R!J8uCJt9Sdq4Suz4HLhTHz8bzJcSWXMBIKcKZgkD3z8c
    I need help! Please!

  • FAQ: How do I load an external SWF file into a parent SWF file?

    A ton of Flash users visit Adobe’s we site every month wondering  about how to load an external SWF file from within another SWF.
    Adobe's own TechNote on the subject attempts to answer the basic question, along with some common follow-up questions, including:
    How do I load more than one SWF?
    How do I load a SWF into a specific location in the display list?
    How do I resize the loaded SWF?
    How do I set its X and Y location?
    Here are some additional resources that elaborate on loading content and on working with the display list:
    Sample files for the above TechNote. A set of 3 FLA and 3 corresponding SWF files, including a parent SWF and 2 SWFs that the parent loads.
    Help > AS3 Developer’s Guide > Loading an external SWF file
    Help > AS3 Developer’s Guide > Loading display content dynamically
    Loading multiple external SWFs within a main SWF – CreativeCow.net forums
    Video tutorial: ActionScript 101 – Episode 6: Adding named objects to the Stage. By Doug Winnie. An example of how to add the loaded external asset to the Stage and modify its location or other properties.
    Video tutorial: Preloading in ActionScript 3.0.  By Lee Brimelow. A slightly more complicated example, showing how to  make the parent SWF display information about the progress of loading  the external SWF.
    Tutorial: Loading and unloading SWFs - FlashAndMath.com
    This article provides several examples of how to communicate between a parent SWF file and the loaded SWF:
    SWF to SWF Communcation via ActionScript 3.0 (by kglad)

    quote:
    Originally posted by:
    NedWebs
    You now seem to want to get rid of the swf once it has loaded
    and played itself thru. To do that you would need to have something
    in the swf itself that triggers its removal in its last frame. The
    following might work...
    MovieClip(this.parent).removeChild(this);
    Unfortunately I couldn't get this to work. I placed it on the
    last frame of the SWF to be called - is that right?
    I am not sure I am doing it correctly...

  • Remove / unload external swf file(s) from the main flash file and load a new swf file and garbage collection from memory.

    I can't seem to remove / unload the external swf files e.g when the carousel.swf (portfolio) is displayed and I press the about button the about content is overlapping the carousel (portfolio) . How can I remove / unload an external swf file from the main flash file and load a new swf file, while at the same time removing garbage collection from memory?
    This is the error message(s) I am receiving: "TypeError: Error #2007: Parameter child must be non-null.
    at flash.display::DisplayObjectContainer/removeChild()
    at index_fla::MainTimeline/Down3()"
    import nl.demonsters.debugger.MonsterDebugger;
    var d:MonsterDebugger=new MonsterDebugger(this);
    stage.scaleMode=StageScaleMode.NO_SCALE;
    stage.align=StageAlign.TOP_LEFT;
    stage.addEventListener(Event.RESIZE, resizeHandler);
    // loader is the loader for portfolio page swf
    var loader:Loader;
    var loader2:Loader;
    var loader3:Loader;
    var loader1:Loader;
    //  resize content
    function resizeHandler(event:Event):void {
        // resizes portfolio page to center
    loader.x = (stage.stageWidth - loader.width) * .5;
    loader.y = (stage.stageHeight - loader.height) * .5;
    // resizes about page to center
    loader3.x = (stage.stageWidth - 482) * .5 - 260;
    loader3.y = (stage.stageHeight - 492) * .5 - 140;
    /*loader2.x = (stage.stageWidth - 658.65) * .5;
    loader2.y = (stage.stageHeight - 551.45) * .5;*/
    addEventListener(Event.ENTER_FRAME, onEnterFrame,false, 0, true);
    function onEnterFrame(ev:Event):void {
    var requesterb:URLRequest=new URLRequest("carouselLoader.swf");
    loader = null;
    loader = new Loader();
    loader.name ="carousel1"
    //adds gallery.swf to stage at begining of movie
    loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
    function ioError(event:IOErrorEvent):void {
    trace(event);
    try {
    loader.load(requesterb);
    } catch (error:SecurityError) {
    trace(error);
    addChild(loader);
    loader.x = (stage.stageWidth - 739) * .5;
    loader.y = (stage.stageHeight - 500) * .5;
    // stop gallery.swf from duplication over and over again on enter frame
    removeEventListener(Event.ENTER_FRAME, onEnterFrame);
    //PORTFOLIO BUTTON
    //adds eventlistner so that gallery.swf can be loaded
    MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
    function Down(event:MouseEvent):void {
    // re adds listener for contact.swf and about.swf
    MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
    MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
    //unloads gallery.swf from enter frame if users presses portfolio button in nav
    var requester:URLRequest=new URLRequest("carouselLoader.swf");
        loader = null;
    loader = new Loader();
    loader.name ="carousel"
    loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
    function ioError(event:IOErrorEvent):void {
    trace(event);
    try {
    loader.load(requester);
    } catch (error:SecurityError) {
    trace(error);
    addChild(loader);
    loader.x = (stage.stageWidth - 739) * .5;
    loader.y = (stage.stageHeight - 500) * .5;
    removeChild( getChildByName("about") );
    removeChild( getChildByName("carousel1") );
    // remove eventlistner and prevents duplication of gallery.swf
    MovieClip(root).nav.portfolio.removeEventListener(MouseEvent.MOUSE_DOWN, Down);
    //INFORMATION BUTTON
    //adds eventlistner so that info.swf can be loaded
    MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
    function Down1(event:MouseEvent):void {
    //this re-adds the EventListener for portfolio so that end user can view again if they wish.
    MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
    MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
    var requester:URLRequest=new URLRequest("contactLoader.swf");
    loader2 = null;
    loader2 = new Loader();
    loader2.name ="contact"
    loader2.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
    function ioError(event:IOErrorEvent):void {
    trace(event);
    try {
    loader2.load(requester);
    } catch (error:SecurityError) {
    trace(error);
    addChild(loader2);
    loader2.x = (stage.stageWidth - 658.65) * .5;
    loader2.y = (stage.stageHeight - 551.45) * .5;
    // remove eventlistner and prevents duplication of info.swf
    MovieClip(root).nav.info.removeEventListener(MouseEvent.MOUSE_DOWN, Down1);
    //ABOUT BUTTON
    //adds eventlistner so that info.swf can be loaded
    MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
    function Down3(event:MouseEvent):void {
    //this re-adds the EventListener for portfolio so that end user can view again if they wish.
    MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
    MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
    var requester:URLRequest=new URLRequest("aboutLoader.swf");
    loader3 = null;
    loader3 = new Loader();
    loader3.name ="about"
    loader3.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
    function ioError(event:IOErrorEvent):void {
    trace(event);
    try {
    loader3.load(requester);
    } catch (error:SecurityError) {
    trace(error);
    addChild(loader3);
    loader3.x = (stage.stageWidth - 482) * .5 - 260;
    loader3.y = (stage.stageHeight - 492) * .5 - 140;
    removeChild( getChildByName("carousel") );
    removeChild( getChildByName("carousel1") );
    // remove eventlistner and prevents duplication of info.swf
    MovieClip(root).nav.about.removeEventListener(MouseEvent.MOUSE_DOWN, Down3);
    stop();

    Andrei1,
    Thank you for the helpful advice. I made the changes as you suggested but I am receiving a #1009 error message even though my site is working the way I wan it to work. I would still like to fix the errors so that my site runs and error free. This is the error I am receiving:
    "TypeError: Error #1009: Cannot access a property or method of a null object reference."
    I'm sure this is not the best method to unload loaders and I am guessing this is why I am receiving the following error message.
         loader.unload();
         loader2.unload();
         loader3.unload();
    I also tried creating a function to unload the loader but received the same error message and my portfolio swf was not showing at all.
         function killLoad():void{
         try { loader.close(); loader2.close; loader3.close;} catch (e:*) {}
         loader.unload(); loader2.unload(); loader3.unload();
    I have a question regarding suggestion you made to set Mouse Event to "null". What does this do setting the MouseEvent do exactly?  Also, since I've set the MouseEvent to null do I also have to set the loader to null? e.g.
    ---- Here is my updated code ----
    // variable for external loaders
    var loader:Loader;
    var loader1:Loader;
    var loader2:Loader;
    var loader3:Loader;
    // makes borders resize with browser size
    function resizeHandler(event:Event):void {
    // resizes portfolio page to center
         loader.x = (stage.stageWidth - loader.width) * .5;
         loader.y = (stage.stageHeight - loader.height) * .5;
    // resizes about page to center
         loader3.x = (stage.stageWidth - 482) * .5 - 260;
         loader3.y = (stage.stageHeight - 492) * .5 - 140;
    //adds gallery.swf to stage at begining of moviie
         Down();
    //PORTFOLIO BUTTON
    //adds eventlistner so that gallery.swf can be loaded
         MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
    function Down(event:MouseEvent = null):void {
    // re adds listener for contact.swf and about.swf
         MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
         MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
    //unloads gallery.swf from enter frame if users presses portfolio button in nav
         var requester:URLRequest=new URLRequest("carouselLoader.swf");
         loader = new Loader();
         loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
         function ioError(event:IOErrorEvent):void {
         trace(event);
         try {
         loader.load(requester);
         } catch (error:SecurityError) {
         trace(error);
         this.addChild(loader);
         loader.x = (stage.stageWidth - 739) * .5;
         loader.y = (stage.stageHeight - 500) * .5;
    // sure this is not the best way to do this - but it is unload external swfs
         loader.unload();
         loader2.unload();
         loader3.unload();
    // remove eventlistner and prevents duplication of gallery.swf
         MovieClip(root).nav.portfolio.removeEventListener(MouseEvent.MOUSE_DOWN, Down);
    //INFORMATION BUTTON
         //adds eventlistner so that info.swf can be loaded
         MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
         function Down1(event:MouseEvent = null):void {
         //this re-adds the EventListener for portfolio so that end user can view again if they wish.
         MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
         MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
         var requester:URLRequest=new URLRequest("contactLoader.swf");
         loader2 = null;
         loader2 = new Loader();
         loader2.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);    
         function ioError(event:IOErrorEvent):void {
         trace(event);
         try {
         loader2.load(requester);
    }      catch (error:SecurityError) {
         trace(error);
         addChild(loader2);
         loader2.x = (stage.stageWidth - 658.65) * .5;
         loader2.y = (stage.stageHeight - 551.45) * .5;
    loader.unload();
    loader2.unload();
    loader3.unload();
         // remove eventlistner and prevents duplication of info.swf
         MovieClip(root).nav.info.removeEventListener(MouseEvent.MOUSE_DOWN, Down1);
    //ABOUT BUTTON
         //adds eventlistner so that info.swf can be loaded
         MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
         function Down3(event:MouseEvent = null):void {
         //this re-adds the EventListener for portfolio so that end user can view again if they wish.
         MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
         MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
         var requester:URLRequest=new URLRequest("aboutLoader.swf");
         loader3 = null;
         loader3 = new Loader();
         loader3.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
         function ioError(event:IOErrorEvent):void {
         trace(event);
         try {
         loader3.load(requester);
    }      catch (error:SecurityError) {
         trace(error);
         addChild(loader3);
         loader3.x = (stage.stageWidth - 482) * .5 - 260;
         loader3.y = (stage.stageHeight - 492) * .5 - 140;
         loader.unload();
         loader2.unload();
         loader3.unload();
         // remove eventlistner and prevents duplication of info.swf
         MovieClip(root).nav.about.removeEventListener(MouseEvent.MOUSE_DOWN, Down3);
         stop();

  • Loading multiple consecutive .swf files in Flash 8

    I have a question and hope that someone may be able to help;
    this might be a piece of cake for you...
    I have a container .fla movie and would like to load
    consecutive external .swf files. Right now I have a play button
    triggering the loading of the next movie, but what I would REALLY
    like is a smooth transition from .swf to .swf using a listener so
    that the next .swf will load once the previous one has finished. I
    have a counter which determines the next .swf in order.
    So far, my code is this:
    Counter:
    stop();
    //SETUP OUR COUNTER
    var mcCounter:Number = 0;
    //THIS BLOCK IS ONLY TO HANDLE THE LOADER AND THE FIRST
    MOVIE, movie0.swf
    var myMCL:MovieClipLoader = new MovieClipLoader();
    var loadListener
    bject = new Object();
    myMCL.addListener(loadListener);
    myMCL.loadClip("movie" + mcCounter + ".swf", 6);
    loadListener.onLoadComplete = function():Void {
    _level0.play();
    //-------------------------<CLIP
    LOADERS>------------------------------\\
    function loadNextClip():Void {
    if(mcCounter < 6) {
    mcCounter++;
    var nextMCL:MovieClipLoader = new MovieClipLoader();
    nextMCL.addListener(this);
    nextMCL.loadClip("movie" + mcCounter + ".swf",6);
    //LOADS PREVIOUS CLIP , WON"T GO PAST ZERO
    function loadPrevClip():Void {
    if(mcCounter > 0) {
    mcCounter--;
    var prevMCL:MovieClipLoader = new MovieClipLoader();
    prevMCL.addListener(this);
    prevMCL.loadClip("movie" + mcCounter + ".swf",6);
    //-------------------------</CLIP
    LOADERS>------------------------------\\
    Any suggestions? I appreciate ANY help you can offer. I have
    been unsuccessfully looking for hours online, and can't find any
    examples, although it doesn't seem as if it should be the hardest
    thing in the world.
    Thanks!

    You need a monitor to know when one movie clip has completed
    play. A simple
    monitor could be adding onEnterFrame handler to the
    container_mc when
    MovieClipLoader onComplete or onInit is fired. In that
    handler a test to see
    when the loaded clip's _currentframe == the loaded clip"s
    _totaframes.
    Ex:
    this.createEmptyMovieClip("container_mc",
    this.getNextHighestDepth());
    container_mc._x = 0;
    container_mc._y = 0;
    var swfNumber:Number = 0;
    var swfNumberMax:Number = 25;
    var swfNamePrefix = "MovieClipLoaderDetectEndOfPlay_Movie";
    var mclListener
    bject = new Object();
    mclListener.onLoadStart = function(target_mc:MovieClip)
    target_mc.startTimer = getTimer();
    mclListener.onLoadComplete = function(target_mc:MovieClip)
    target_mc.completeTimer = getTimer();
    mclListener.onLoadInit = function(target_mc:MovieClip)
    var timerMS:Number = target_mc.completeTimer -
    target_mc.startTimer;
    target_mc.play();
    target_mc.onEnterFrame = function()
    trace(this._currentframe)
    if (this._currentframe == this._totalframes)
    trace("Load Next Swf")
    loadNextSwf()
    var container_mcl:MovieClipLoader = new MovieClipLoader();
    container_mcl.addListener(mclListener);
    function loadNextSwf()
    swfNumber++;
    if (swfNumber <= swfNumberMax)
    var swfSuffix = ((swfNumber<10)?"0" :"") + swfNumber;
    container_mcl.loadClip(swfNamePrefix + swfSuffix + ".swf",
    container_mc);
    loadNextSwf()
    Lon Hosford
    www.lonhosford.com
    May many happy bits flow your way!
    "dragonlilly" <[email protected]> wrote in
    message
    news:[email protected]...
    I have a question and hope that someone may be able to help;
    this might be
    a
    piece of cake for you...
    I have a container .fla movie and would like to load
    consecutive external
    .swf
    files. Right now I have a play button triggering the loading
    of the next
    movie, but what I would REALLY like is a smooth transition
    from .swf to .swf
    using a listener so that the next .swf will load once the
    previous one has
    finished. I have a counter which determines the next .swf in
    order.
    So far, my code is this:
    Counter:
    stop();
    //SETUP OUR COUNTER
    var mcCounter:Number = 0;
    //THIS BLOCK IS ONLY TO HANDLE THE LOADER AND THE FIRST
    MOVIE, movie0.swf
    var myMCL:MovieClipLoader = new MovieClipLoader();
    var loadListener
    bject = new Object();
    myMCL.addListener(loadListener);
    myMCL.loadClip("movie" + mcCounter + ".swf", 6);
    loadListener.onLoadComplete = function():Void {
    _level0.play();
    //-------------------------<CLIP
    LOADERS>------------------------------\\
    function loadNextClip():Void {
    if(mcCounter < 6) {
    mcCounter++;
    var nextMCL:MovieClipLoader = new MovieClipLoader();
    nextMCL.addListener(this);
    nextMCL.loadClip("movie" + mcCounter + ".swf",6);
    //LOADS PREVIOUS CLIP , WON"T GO PAST ZERO
    function loadPrevClip():Void {
    if(mcCounter > 0) {
    mcCounter--;
    var prevMCL:MovieClipLoader = new MovieClipLoader();
    prevMCL.addListener(this);
    prevMCL.loadClip("movie" + mcCounter + ".swf",6);
    //-------------------------</CLIP
    LOADERS>------------------------------\\
    Any suggestions? I appreciate ANY help you can offer. I have
    been
    unsuccessfully looking for hours online, and can't find any
    examples,
    although
    it doesn't seem as if it should be the hardest thing in the
    world.
    Thanks!

  • Trouble loading an external swf file implemented with AS3

    I am using Adobe Flash CS3
    At first, I tried
    swf_mc.loadMovie("//swf file
    location");
    It gave me
    quote:
    Warning: 1060: Migration issue: The method loadMovie is no
    longer supported.
    USE: var l = new Loader(); addChild(l); l.load(new
    URLRequest("your url"));.
    Well, the given code isn't working at all.
    But since it is a migration error, I thought maybe I can just
    save it into Flash5 format with AS1. Then it worked with most
    external swf files. However, the one I am trying to load is a swf
    file with AS3, so my older version swf can't load it at all.
    Anyone has any ideas about how to load an external AS3 swf
    file?

    AS3 is a completely different beast than AS1 or 2. loadMovie
    was removed from the language.
    The answer to your question is two fold. First, Adobe was
    kind enough to give us the code when it finds a migration issue.
    var _ldr:Loader = new Loader();
    addChild( _ldr );
    _ldr.load( new URLRequest( "your url") );
    Handling progress has also changed. I have a ContentLoader
    package on my site that you're free to use that should familiarize
    you with the new way that things are done in AS3.
    http://sd-dezign.com/blog/?page_id=10

  • Component Slider not working when loaded from another swf file

    I have a simple Flash application that uses a component Slider to increase or decrease the size of the text in a TextArea (ta). It works perfectly fine on its own, however, when I try to load the same swf file from another application, I get the following error...
    ReferenceError: Error #1069: Property fl.managers:IFocusManager::form not found
    on fl.managers.FocusManager and there is no default value.
    at fl.controls::Slider/thumbPressHandler()
    Code...
    import fl.events.*;
    import flash.text.TextFormat;
    ta.text = "Lorem ipsum dolor sit amet";
    var tf:TextFormat = new TextFormat();
    tf.color = 0xCCCCCC;
    tf.font = "Trebuchet MS";
    tf.size = 12;
    slider.addEventListener(SliderEvent.THUMB_DRAG, sliderChange);
    style();
    function style():void
        ta.setStyle("textFormat", tf);
    function sliderChange(e:SliderEvent):void
        tf.size = slider.value;
        ta.setStyle("textFormat", tf);
    Could the containing swf file that I'm loading the slider swf file in anyway effect the slider application? I don't quite understand why it works on its own, but not when loaded from another app.

    add a slider component to the main (loading) swf's library.

  • HtmlLoader and local content problems

    I'm having trouble with the HtmlLoader class and loading/displaying local content that contains flash files.
    As example, I load a local page with a flash video player and no video, but it's ffine if the file isn't local. Or a page with a flash google map, same thing, fine from web, nothing from local...
    Is there some method to allow this stuff?
    Thanks in advance!
    -Zeke

    Was the SWF your HTMLLoader is loading published with the "Access network only" Local Playback Security option:
    General discussion with focus on Flash Professional:
    http://www.adobe.com/devnet/flash/articles/local_network_playback.html
    Ways to set this option when using Flex/FlashBuilder:
    http://blogs.adobe.com/flexdoc/2008/06/the_security_sandbox_in_flex_b.html
    Note: Use the custom compiler option, use-network=false, if you want to override the Flex Builder default compiler option. This would change the settings to local-with-filesystem
    Chris Thilgen
    AIR Engineering

  • Loading local content security problem

    var playlistlink:URLRequest = new URLRequest("playlist.xml");
    var playlistloader:URLLoader = new URLLoader();
    try {
    playlistloader.load(playlistlink);
    }catch (e:Error){
    addError("error:loading xml");
    both swf and playlist.xml put into same domain. When I run
    the flash there's no problem.
    However, it seems not working when I embed the swf into a
    html which in another domain, then there's a security problem. When
    I embed swf into some blog post it even seems not running!
    Anyone have any thought on that?

    You'll need to have a crossdomain.xml file in domain you are
    loading the playlist.xml file from.
    A corssdomain.xml file might look like this. Note: This file
    allows all other domains, which is probably not what you should
    have in production.
    <?xml version="1.0"?>
    <cross-domain-policy>
    <allow-access-from domain="*" />
    </cross-domain-policy>

  • Problem when applet going to load local machine jar files

    hi all,
    I have an applet that contains a 'core' module(jar) and 'core dependency' modules(jars).To reduce the applet download time i decided to load some heavy weight and lesser use 'core dependency' jars from local machine and core jar module and other low weight and highly use 'core dependency' jar modules from applet archives. I use the same class loader that used to load the applet archives for load local machine 'core dependency' modules.
    eg- this.getClass().getClassLoader().loadClass("class")
    When applet starts, Local machine 'core dependency' jar modules start loading but it couldn’t find classes in the core module (that download from archives) and stop the loading applet . But when i run that applet using IDE it is work fine. Please someone help me to solve this problem.
    Exception in thread "thread applet-com.dfn.pro.ui.UIContext-1" java.lang.NoClassDefFoundError: com/dfn/pro/plugins/dataupdate/UpdatableTable
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(Unknown Source)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$000(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at com.dfn.pro.plugins.JarClassLoader.invokeClass(Unknown Source)
    at com.dfn.pro.plugins.PluginContext.loadPlugins(Unknown Source)
    at com.dfn.pro.plugins.PluginContext.analyzeDependancies(Unknown Source)
    at com.dfn.pro.plugins.PluginContext.<init>(Unknown Source)
    at com.dfn.pro.plugins.PluginContext.getPluginContext(Unknown Source)
    at com.dfn.pro.ui.UIContext.init(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.ClassNotFoundException: com.dfn.pro.plugins.dataupdate.UpdatableTable
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)

    eg- this.getClass().getClassLoader().loadClass("class")Try using Thread.currentThread().getContextClassLoader() instead of this.getClass().getClassLoader().

  • Trouble loading group of swf files to server.

    Hi, all,
    I have a swf file that has dependent files and it doesn't load on the server so that it plays. It plays on my local computer when I click the index.html file that came with the swf that I want to play, but not when I load it to the server for my web site.
    The folder that I was sent to load onto the server includes
    a subfolder with the swf file that I need to play, but also
    an index.html file,
    a menu.swf file,
    a debug.swf file,
    an exit.swf file and
    an AC_RunActive Content.js file.
    Loading the whole folder on the site, no matter what the path I enter to get there, only brings up a blank screen. The files are there on the server, I can see them, and the file size is the same as on my local computer, so I think they loaded correctly, they just don't play. The closest I've seen is when I make the path to the menu, but then a progress bar shows up for the menu and it never finishes loading.
    I don’t make flash files myself, so I don’t even feel that I have the vocabulary to ask the right questions. Is there a name for this kind of grouping of  files (as described above?)  How do I load it on the server so it plays?
    I'm working in a Dreamweaver site. I don't know if the problem is in how I'm making the path in Dreamweaver or how I'm loading the files on the server. . . or something else.
    Help!

    It looks like a file path problem, which Flash Player can't resolve.
    I'd recommend posting in the Dreamweaver forum and let the pros over there have a look at your code.

  • How to load an AS3 swf file into a AS2 swf file?

    Hi,
    i am trying to display a swf file using AS3 in a flash site which uses AS2. I know that loading the swf file in the normal way, into a dummy movieclip (loadMovie) or into a new level (loadMovieNum), doesn't work. The AS2 based flash site doesn't understand the new file. Is there another way to get around this problem?
    Many thanks
    92 North Ltd
    Leeds website, graphic and web banner design
    Phone 0113 815 1158
    http://www.92north.com

    Thanks kglad. Will give that a try
    92 North Ltd
    Leeds website, graphic and web banner design
    Phone 0113 815 1158
    http://www.92north.com

  • How to correctly load an external swf file into iosAir app? I'm getting blank screen.

    So this code works flawlesly on Air for Android, it even works fine when I test the movie in Flash, but once I export it, I'm getting a blank screen. I made an swf with a square and withotu any code, and flash still fails to load it. It's weird cause everything works fine when I use the interpreter debugging option, but when I switch to standard debugging the blank screen appears on my ipad. I've read somewhere that it's caused by the way flash saves the link to external files. Thus after the file is compiled Flash fails to find the prefiously added files, which results in a blank screen. There's clearly something wrong with how the process of compiling the application.
    Tried this:
    var Xpos:Number = 0;
    var Ypos:Number = 0;
    var loader:Loader = new Loader();
    var link:URLRequest = new URLRequest("Untitled-1.swf");
    loader.load(link);
    addChild(loader);
    And this:
    var ldr:Loader = new Loader();
    ldr.load(new URLRequest("Untitled-1.swf"));
    ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, loaded, false, 0, true);
    function loaded(event:Event):void {
    addChild(event.target.content);
    But nothing works. I'm still getting a blank screen. Is there any way to add the swf file manually into the descriptor file cause flash most likely messes it up? I don't really want to use through command line.

    Read this article, especially the bit about loadercontext and currentdomain:
    http://blogs.adobe.com/airodynamics/2012/11/09/packaging-and-loading-multiple-swfs-in-air- apps-on-ios/

  • Can not load an external swf file from my site

    Hi ...
    I have a fla file which is loading external swf files from my local folders.
    I inserted some of the swf files to a web site and tried to load them from the site, not from my local folder...
    So it gave me a security error like below:
    *** Güvenlik Sanal Alanı İhlali ***security domain-area violation
    http://www.celiktek.com.tr/KIRIL.swf' SecurityDomain öğesi -- security domain element, 'file:///C|/Users/Acer/AppData/Local/Temp/Untitled%2D1.swf' uyumsuz bağlamına erişmeye çalıştı - tried to reach this incompatible url
    SecurityError: Error #2070: Güvenlik sanal alan ihlali -- security area violation: http://www.celiktek.com.tr/KIRIL.swf arayanı - searcher of this can not reach stage in file:///C|/Users/Acer/AppData/Local/Temp/Untitled%2D1.swf içindeki Stage'e erişemiyor. -
    at flash.display::Stage/requireOwnerPermissions()
    at flash.display::Stage/get numChildren()
    at KIRIL_fla::MainTimeline/frame1()
    so in my computer, I can load this swf , but how from a website ?
    thnx ...

    Thnaks ...
    I tried to use the securiyt panel that is openede and I added there my site
    www.celiktek.com.tr/KIRIL.swf
    but I still take the error
    *** Güvenlik Sanal Alanı İhlali ***
    http://www.celiktek.com.tr/KIRIL.swf' SecurityDomain öğesi, 'file:///C|/Users/Acer/AppData/Local/Temp/Untitled%2D1.swf' uyumsuz bağlamına erişmeye çalıştı
    SecurityError: Error #2070: Güvenlik sanal alan ihlali: http://www.celiktek.com.tr/KIRIL.swf arayanı file:///C|/Users/Acer/AppData/Local/Temp/Untitled%2D1.swf içindeki Stage'e erişemiyor.
    at flash.display::Stage/requireOwnerPermissions()
    at flash.display::Stage/get numChildren()
    at KIRIL_fla::MainTimeline/frame1()
    from my code
    var req:URLRequest=new URLRequest("http://www.celiktek.com.tr/KIRIL.swf");
    var lod:Loader=new Loader();
    lod.load(req);
    addChild(lod);
    lod.x=0;
    does this code works on your computer ... I know it is a weird question ... you dont have to try ...

  • Need your Help with Swapping SWF File Problem

    Hello,
    I have two separate Flash SWF files which I would like upload
    into the same HTML file. But I would like to load only one of them
    at the time and would like to have a Button on each SWF Flash file
    which causes the other SWF to be loaded.
    hmmm.. I am not sure if I managed to make sense. :o) Let me
    try it one more time. :o) I would like to swap one SWF file for
    another SWF file by clicking on the buttons which are placed on the
    SWF files! :o)
    I was wondering if that is possible or I should think of
    another way to get around this problem of mine.
    Thank you very much for your help and have a great day.
    Cheers,
    Babak

    Khoramdin wrote:
    > Hello,
    >
    > I have two separate Flash SWF files which I would like
    upload into the same
    > HTML file. But I would like to load only one of them at
    the time and would
    > like to have a Button on each SWF Flash file which
    causes the other SWF to be
    > loaded.
    >
    > hmmm.. I am not sure if I managed to make sense. :o) Let
    me try it one more
    > time. :o) I would like to swap one SWF file for another
    SWF file by clicking
    > on the buttons which are placed on the SWF files! :o)
    make one swf as a holder. call it main.fla main.swf file.
    Embed that file in your html document. In that file place
    button with the
    following action :
    on (release) {
    loadMovieNum("second.swf", 1);
    in that file have a button with action to load the 3rd file :
    on (release) {
    loadMovieNum("3rd.swf", 1);
    by loading them in same level (1) they will replace each
    other.
    Pretty simple..uh ?
    Regards
    Urami
    Happy New Year guys - all the best there is in the 2006 :)
    <urami>
    http://www.Flashfugitive.com
    </urami>
    <web junk free>
    http://www.firefox.com
    </web junk free>

Maybe you are looking for