HTMLLoader local content (SWF files) loading problems

Hello guys,.

I'm just to complete my request but I have a problem.

I am developing a desktop air app.

I use HTMLLoader to load SWF files local when you user tries to access a specific content on the application.

I accomplished successfully, but the loaded SWF file also load other files (assets and xml with translations files) and it does not work.

When a SWF file is loaded it will stop just on its own screen of loading (loading XML files).

All this happens 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?

Is a bit urgent... deadline is coming...

Thank you!

It is probably related to a path problem.

What is contentURL?

If it is anything other than swfname.swf, you have a problem.

Tags: Adobe Animate

Similar Questions

  • Mc.play () mc.stop () and swf file loaded AS2 works do not?

    Hello

    I am trying to load the swf file in another field using MovieClipLoader AS2 and then try to play and stop the parent SWF swf file load but it does not work on the field. It is working perfectly fine in pc local url i.e. file:///C:/Users/Sunil/Desktop/test/index.html (work as expected)

    But same time I put my setup all embed in html page then it doesn't work. Please see the newsletter link below.

    http://divinestreaming.com/projects/test/ - does not

    file:///C:/users/Sunil/desktop/test/index.html  (Work as expected)

    Rest all the AS2 MovieClip properties work as expected but play() and stop() does not.

    If I put the swf file in the same domain, then it works as expected but even time when I try to load the SWF to another area of my field so he doesn't.

    Please tell us how to solve this problem.

    Best regards

    Sunil

    you have errors in your tracing instructions, but who must be artifacts of forum or your code would not work locally.

    in any case, you should probably a Security.allowDomain () statement in your loaded swf file.

  • the construction of my portfolio on Muse site. Download my examples of banner ads that are SWF files, no problem. I need to download HTML5 banners I have done, but cannot get them on my page in Muse. Also, here the HTML5 banner ad to appear on a break, th

    Build my portfolio in Muse site. Download my examples of banner ads that are SWF files, no problem.

    I need to download HTML5 banners I have done, but cannot get them on my page in Muse.

    In addition, would be like HTML5 banner ad to appear in pause, then Viewer would click to watch it animate.

    Anyone know to solve it for it?

    Have you tried to insert via object > insert HTML?

    https://helpx.Adobe.com/Muse/topics/Embedding-HTML.html

    https://helpx.Adobe.com/Muse/using/adding-edge-animate-content.html

    Thank you

    Sanjit

  • How to read a variable main.swf (this content.swf of load) and use within the loaded movie?

    Hello

    How to read a variable main.swf (this content.swf of load) and use it within the content.swf?

    I have a variable called TextColor = 'Green' handmade film and I want to read this variable from inside the content movie?

    anyone can help!

    Thank you very much.

    MyGiantBrain thanks for your reply but kglad method worked very well.

    Thanks kglad but there is some changes to your code so that it works, and it is:

    trace (MovieClip (parent.parent) ["TextColor"]);

    Thank you

  • How to limit a swf file loaded in a scene or a layer?

    I imported a swf file in my main swf file, but I want to limit the file that I imported to a layer of surden and managers / scene.

    Can someone show me a nice easy way to do this? -Thanks in advance!

    The code I've used so far is:


    import flash.ui.Mouse;

    var myLoader:Loader = new Loader();

    var url: URLRequest = new URLRequest ("myexternalfile.swf");

    myLoader.load (url);

    addChild (myLoader);

    (optional)

    myLoader.x = 550;

    myLoader.y = 100;

    I corrected, thanks for trying to help me

    I used the code:

    If (myLoader! = null)

    {

    myLoader.unloadAndStop ();

    removeChild (myLoader);

    myLoader = null;

    }

  • Several external swf within a main swf file loading.

    Hello

    I'll build a Web site that loads multiple SWF files in a main swf. I also want some sovereign wealth funds to unload when I click on the button located on it.

    could someone help me on this please.

    Currently, I am only able to load a swf with this code, can I somehow load more that just a default swf? You can see the code below:

    var swf:MovieClip;
    var loader: Loader = new Loader();

    var defaultSWF:URLRequest = new URLRequest("swf/gallery.swf");
    Loader.Load (defaultSWF);
    addChild (loader);

    to load more than 1 swf at any time, you have more than 1 charger.

  • How can I control position to look for SWF files loaded by the class Loader?

    I created a grid of buttons that, when clicked, will load a specific swf and each swf, I would like to play in a certain part of the scene.  When to use the Loader class:

    var my_loader:Loader = new Loader();
    my_loader. Load (new URLRequest ("abc.swf"));
    addChild (my_loader);

    the swf file is always displayed at the top left. Is an attribute of the individual SWFS that I am loading, or can I address the position in the main sequence?

    Thank you-

    Sean

    ...

    addChild (my_loader);

    my_loader.x = 500;

    my_loader.y = 250;

  • How to determine the total number of images in the external .swf file loaded

    I have to be able to load both external .swf files and make them play in order. To do this, I need to know the number of images in the first .swf file so I can check _currentframe against _totalframes to determine when he is finished playing so that I can load another.

    Most of the stuff I see indicate that _totalframes on an external .swf can be determined by loading the .swf in a container clip and then check using a listener in the .onLoadInit. Like this:

    ------------------------------------------------------------------------------------------ ----------------------------

    this.createEmptyMovieClip ("tester_mc", 1);
    var mcListener:Object = new Object();

    mcListener.onLoadInit = {function (target_mc:MovieClip)}
    target_mc.onEnterFrame = function() {}
    If (this ._currentframe > = this ._totalframes) {}
    trace ("total frames =" + this ._totalframes);
    delete this.onEnterFrame;
    } else {}
    trace (target_mc._currentframe + "OF" + target_mc._totalframes);
    }
    }
    }

    var test_mc:MovieClipLoader = new MovieClipLoader();
    test_mc. AddListener (mcListener);
    test_mc.loadClip ("Ad_Group.swf", tester_mc);

    ------------------------------------------------------------------------------------------ -------------------------------------

    Unfortunately, this doesn't seem to work. The trace will always return a total number of frames of 1.

    I guess it's because the container clip has only 1 frame, and the external .swf timeline seems to be ignored.

    I would appreciate any ideas on how to raise the total number of frames of an external .swf file or, Alternatively, put it another way when it's done playing. (Not only the loading, but play until the end.)

    TIA,

    C

    I guess it's because the container clip has only 1 frame, and the external .swf timeline seems to be ignored.

    I wouldn't imagine. My guess is that the main scenario for the external swf file has only 1 frame and the rest of the animation is inside a movieclip in this timeline. You publish this swf? Can you open the FLA and check how many images is open on the main timeline?

    The approach that you have mentioned is about what there is. But he knows check a chronology. If there are many nested movieclips, it may be impossible to understand what timeline you really want to be 'THE' full chronology.

    If you have the FLA, you can have the video call function on the _root timeline which tells the main swf that has completed a movieclip or something like that.

    Also, I have in my head somewhere that I recently saw something that someone made similar to this one, but do not remember... If it appears in my head that I will post.

  • Order a swf file loaded into movieClip

    Help!
    I loaded a {swf slide} in a clip... on stage... with the help of the
    var loader:MovieClipLoader();
    using a clip of button it is embedded in a separate swf file that is loaded at run time
    but the {swf slide} is runing an interval I need of clare... so is there a way to talk to the swf file after you load it into a Movie Clip how do deal with that

    Post here when your site is ready. in this way other disciples of thread can check it also.

  • [Unload SWF] - automatically unloading a swf file loading - question of GC?

    Hi, I am trying to load some SWF style during execution using the StyleManager.loadStyleDeclarations. There are more than 4 style SWF and I load via a for loop and add the IEventDispatcher in a table as a reference... Files seem to load properly. But sometimes, some of the SWFS of style are automatically discharged. I see the [unload SWF] in the journal... I do not know how to avoid being GCed when loading files... Also, it seems that their loading / decompressed twice. Check the log below...

    [SWF] / Flex/com /... /styles/Common.swf - 45 421 bytes after decompression

    [SWF] / Flex/com /... /styles/StyleSkin.swf - 253 886 bytes after decompression

    [SWF] / Flex/com /... /styles/StyleSkin_Fonts.swf - 440 292 bytes after decompression

    [SWF] / Flex/com /... /styles/ StyleSkin _Assets.swf - 189 281 bytes after decompression

    [SWF] / Flex/com /... /styles/ StyleSkin _Assets.swf - 1 153 335 bytes after decompression

    [SWF] / Flex/com /... /styles/ Common.swf - 1 153 335 bytes after decompression

    [SWF] / Flex/com /... /styles/ StyleSkin _Fonts.swf - 1 153 335 bytes after decompression

    [SWF] / Flex/com /... /styles/ StyleSkin.swf - 1 153 335 bytes after decompression

    [Unload SWF] / Flex/com/marketlinx/mls/client/ui/styles / StyleSkin _Assets.swf

    /Flex/com/MarketLinx/MLS/client/UI/styles/common.swf [unload SWF]

    [Unload SWF] / Flex/com/marketlinx/mls/client/ui/styles / StyleSkin _Fonts.swf

    How to avoid files being GCed. is it because I have re using a single charger (loadStyleDeclaration) to load several files?

    Sorry, my bad on the last response. I meant - static-RSLS = true.

    -Darrell

  • Javascript .js file loading problem

    I have a .js file that has a function in there.

    function startUp()
    {
        openBISPushListener();
        jsonWelcomeMessage();
        setTimeout("checkCookie()",3000);
        loadCustomMenuItemsForPage();
    }
    

    I call it in my body onload

    
    

    I also have this tag on my html page

     
    

    If the javascript code is on the html page, it works.  If I use in firefox or chrome it works.  If I load on my 9330 6 curve os it does not trigger the javascript.

    I have it.   I had a few special characters HIDDEN in my js file.  Found using addon firebug for firefox.

  • How can I call functions of a SWF file loaded into another swf?

    Hello

    Please excuse my ignorance, I am very new to actionscript and flash.

    I have 2 Fund sovereigns - a.swf and b.swf.

    I load b.swf in a.swf with the following code:

    var swfLoader:MovieClipLoader = new MovieClipLoader();
    swfLoader.loadClip("b.swf", container_mc);
    

    Now in b.swf, I have a function as follows:

    public function sendData(){
      trace("I ran the function!");
    }
    

    So I did a lot of reading, from what I can tell, I should be able to perform the function of sendData() from code in a.swf, by typing:

    container_mc.sendData();
    

    but it's not working. What I am doing wrong?

    Thanks in advance,

    Adam

    container_mc. SendData();

    will work AFTER THAT b.swf is initialized.  That is to say, use a listener to detect that.

  • The RAW of Canon EOS 70 d files loading problems

    I recently changed my camera to an EOS 500 d to a 70 d and now find I can't open the RAW files, even if my Photoshop says that he is up to date when he is questioned through creative cloud.  However, when I check the version of Camera RAW uses in 2014 PhotoShopCC is 8.0.0.137.  I tried to find and download the recommended version 8.2, but everything gave me was to provide me with a DNG Converter, that has not helped.  I contacted the cat online Adobe but part-crossing lost the connection and I cannot restore again to complete the process of their operative took me through.

    Someone at - it ideas on how to solve this problem?  Moreover, the files open fine in Lightroom 5.5.

    Thank you for taking time to answer, that was kind of you.

    I managed to solve the problem by going to Adobe Labs and downloaded and installed a beta version of Camera RAW 8.6, it works a treat.

  • liaison between the SWF - file size problem

    I am building a presentation & have two separate sovereign wealth funds. It is about 80 MB, the other is 40 MB. When I tried to export more, I got a warning that it exceeded the 16 images of k I figured out how to work around that. But now I need to integrate the two sovereign wealth funds. If I take the smallest and import it into the largest one as a new scene that will blow up my ability to export again? Can I create a link between two separate swf using some sort of function gotoAndPlay? What are my options here? Any help is appreciated. Thank you.

    No, you can't do this or you go over your limit of 16 k images.

    I mean LOAD a swf into another using actionscript.  you will use a class movieclip or moviecliploader in as2 or loader in as3 class.

  • Problem with loading external swf files

    Hello

    I am currently working on a project which is an interactive and dynamic elemtry school presentation to the Denmark. I finished my project and it works perfectly, but only locally on my computer.

    The final draft should be implemented on the site and public work. I tried to implement the project on the site and unfortunately, it does not work as expected.

    When all the files where transferred to the ftp server, only a single files are responding and appear correctly.

    Interactivity of the project is based on a structure of Action script, which is based on the smooth transition between swf files (load another swf file after the action is triggered by clicking on a button) do any work.

    After days of trying to figure out the solution, I'm totally lost. One thing is to publish the project so that all action script will work and answer between swf files, and the other thing is to make it user-friendly for the Android and apple products.

    The presentation is quite heavy because of its loading external swf content files, which are images and movies.

    I really hope you can help me with my problem. I will gladly share the files and codes if it would help solve the problem.

    Best regards

    Agata

    It could be a problem of location of file from loading.  When you place a swf file in an HTML base for targeting anything that the SWF load becomes the folder of the html page.  You may need to adjust the target so that the target of swf files, load it as if it were in the same folder as the html page.

Maybe you are looking for

  • Tecra 8000: Question on the HARD disk and the password

    Hi allA market recently my son bought an old laptop Toshiba T8000. Personally, I have absolutely no knowledge of the laptop myself as a desktop is everything I've ever used.However, I recharged the battery and the power, it asks for a password, even

  • Registration of the laptop (DynaBook E8/520CDE)

    GD day again! Question: How can I save my laptop (Toshiba DynaBook E8/520CDE, was purchased from the Japan, Sept 2004, like a second hand) on the website of Toshiba if missing in the list of models available on this machine? There is not the DynaBook

  • During the installation of Vista Service Pack 2 I get the following error message: ERROR_INVALID_PARAMETER (0 x 80070057)

    Ideas: You have problems with programs Error messages Recent changes to your computer What you have already tried to solve the problem Remember - this is a public forum so never post private information such as numbers of mail or telephone!

  • Configuration of AAA

    Hi all I have configured aaa on my switch cisco with the following commands. and I was told that I used a few unnecessary commands that aren't needed. What would be the effect of suppressing the red lines? any help will be much appreciated. AAA new-m

  • Read an XML file with elements of namespace

    I'm a beginner with XML and for the first time that I have to read a file with columns.I try this code, but the result is always the same: no selected lines.variable xml_response VARCHAR2 (4000)START : xml_response :='<? XML version = "1.0" encoding