Problem in loading secondary swf

Hi,
I am trying load a font as swf for IOS application.i tried load to it from both application directory and application storage directory.but it always throws the following error.
Fast debuging mode everything works fine.
Air Sdk 3.8
Flash Builder 4.7
swf version 20
Error 3747: Multiple application domains are not supported on the operating system.
Code i used to load the swf.
var context:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain,null);
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, fontLoadComplete);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
var strPath:String = "assets/fonts/font.swf"
var urlReq: URLRequest = new URLRequest();
urlReq = strPath;
loader.load(urlReq, context);
please correct me if i am doing any thing wrong in loading swf with as3 code.
Regards,
Saravanan

Hi Nimit,
Sorry for late reply.
Actually problem is in my side.I am loading two swfs one with code in side another without code.
I used loader content for only swf containing code inside but both the swfs requires to specify the loader content to same application domain.
Its working fine after set the loader content to both swfs.
sorry for trouble and thanks for the response.
Regards,
Saravanan.G

Similar Messages

  • Problem when load more swf files work with xml files into my movie

    hi ;
    I have one flash file & more of swf files which work with xml files .
    when I load one swf file into my flash file  and remove it and load anther one on the same movieclip in my flash file it load the old swf file.
    when i load one on movieclip and remove it and load anther swf  on anther movieclip the file doesn`t work  and stoped.
    when test my flash file to load and remove swf files without xml file it work fine but when repleaced the swf files with other work with xml files the problem hapend.
    thanks;

    YOu should trace the names of the files that are being targeted for loading to see if they agree with what you expect.  If you want help with the coding you will need to show the code that is relevant to your problem (not all of it)

  • Problem to load external swf

    hi! I have a movie clip with a background image and also I have another movie clip that load the first movie clip with a Loader, but in the second movie clip, do not see the image of the first movie clip.
    some idea?

    loader = new Loader();
    var mRequest:URLRequest = new URLRequest("test.swf");
    loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgress);
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
    loader.load(mRequest);
    private function onComplete(e:Event):void
         loader.width = 1000;
         loader.height = 1000;
         addChild(e.currentTarget.content);
    this is my code

  • About loading multiple swfs

    Hello folks...
    I have some serious problem with loading multiple swfs in a
    swfLoader whithin an application...
    The problem is that... every time I load another swf in a
    swfloader,
    the memory that the Internet Explorer uses justs keeps going
    up and up
    and one time (maybe after 15 - 20 minutes) it just crashes...
    To be more specific, my application loads a new swf in a
    regular basis (every 30 seconds)
    to make it like a slideshow...
    and it also has fonts embedded in it
    yet to minimize the total memory used by this application,
    I've did somthing like this...
    var sys:SystemManager = contentLoader.content as
    SystemManager;
    if (sys && sys.numChildren>0) {
    sys.removeChildAt(0);
    contentLoader.content.loaderInfo.loader.unload();
    contentLoader.source= DisplayManager.convertToAppSWFName (
    subAppID );
    and every application has an removedEventHandler which
    listens to removed Event,
    and removes all listeners registered to it when it is removed
    from this display list..
    So I'm very curious why the memory usages just keeps
    rising...
    If you have any hints, they'd be greatly appreciated...
    Thanks in advance!!!!

    Loading external swf containing code (even a single stop() !) is not allowed on iOS...

  • Load a swf

    Hi,
    I have a problem with loading another swf from the main one.
    In the main movie a have a button that can load another swf
    file, I use this code for call it.
    this.createEmptyMovieClip("container",
    this.getNextHighestDepth());
    play_btn.onRelease = function(){
    container.loadMovie("story.swf")
    Is loading fine, but the problem is that in the main movie at
    the frame 230 (last one) I have to go to a website:
    getURL("
    http://www.myweb.com/home.asp",
    window="_self")
    The loaded movie (story.swf) has 1300 frame, but this stop to
    work at the 230st frame and go to the website.
    I am missing something and I dont know how fix it. Any help
    will be apreciate.
    Thank you.
    Regards,
    Tom

    What exactly is your problem? If you have the getURL on the
    230th frame, then once it hits that frame, its going, no matter
    what frame your other SWF is on. So, what are you trying to
    accomplish here? Please give a more detailed description.
    ps
    getURL("
    http://www.myweb.com/home.asp",
    window="_self")
    should be
    getURL("
    http://www.myweb.com/home.asp",
    target="_self")

  • Problem in loading SWF file

    Hi All,
    I am facing a problem in file loading. I have a file
    https://shopping.easycite.com/admin/tree/main.swf and in that file
    loading another file named “editNodeFome.swf”. To load
    "editNodeFome.swf" i am using related path. But the file is not
    loading.
    mcLoader.loadClip("editNodeFome.swf", _root.tempForm_mc);
    Can any one help me to find out the solution?

    show your mcl code or use trace(mcLoader) to confirm it
    exists along with _root.tempForm_mc. and make sure editNodeFome.swf
    is in the same directory as the html file that embeds
    main.swf.

  • AS3 load external swf problem, please help...

    Hey guys, I am really in need of an answer here. I would tremendously grateful if someone has the answer. I'll keep it simple and right to the point:
    1. I have created "index.swf" in AS3. Has it's own "MainClass" class.
    2. I created "holder.swf" which is the main landing page. Has 2 buttons, for the viewer to load the site in fullscreen or standard.
    3. In the timeline of "holder.swf" I have created 2 frames, 1st frame containing the buttons, second frame containing the AS3 external swf loader script.
    It does not seem to want to load my "index.swf".
    I have tested a million different ways, it load other swf's just fine, AS2 and AS3, but for some strange reason it just will NOT load "index.swf".
    This is driving me crazy, I have a feeling it has something to do with a class conflict. I have tried (import MainClass;) in the first frame of "holder.swf" and no luck.
    PLEASE GUYS, LET ME KNOW IF YOU KNOW THE ANSWER!
    THANK YOU SO MUCHO.
    Michael

    Hey kglad,
    Thanks for the quick reply!
    Well here is the problem... With the exception of a few things I need to update, as well as implementing some better preloaders etc... the site is running alright...
    About a week ago I decided that I wanted to site to start with the above landing page. A simple "holder.swf" which would give the viewer something to look at before entering the site... (ideally I want to find a script that will begin loading "index.swf" while the viewer is still on "holder.swf", but I'll figure that out later).
    Anyhow, I created "holder.swf" as I have many times before, and for some reason it does not seem to want to load "index.swf" into the second frame when instructed to do so... does that make sense?
    So... ideally I would like the site to start on the above graphic, then once the button is clicked, "index.swf" opens up...
    It's driving me crazy, because my code works on other swf's I've tested it with, just not with index.swf, which leads me to believe there is something in the MainClass.as file which is causing it not to load...
    What are your thoughts?
    Oh, and many thanks again!!!
    M

  • Load AS2 swf into AS3 swf problem

    I have a flash with AS3 and inside this swf i load in a AS2 swf.
    to load swf works just fine, but the problem is when i load this i want to go to
    a specific part of it, for example i want to go to frame 3 in the loaded swf.
    i must control this from the AS3 swf, does someone know if this is possible?
    thanks in advance

    so can i do like this then to go to frame 3 in my loaded swf?
    MovieClip(ldr.content).gotoAndStop(3); ?
    sorry for being such an airhead
    thanks for helping me out =)
    Date: Sun, 7 Jun 2009 10:25:09 -0600
    From: [email protected]
    To: [email protected]
    Subject: load AS2 swf into AS3 swf problem
    no.
    if, in your loaded swf, you have a function f1() on the loaded swf's main timeline and you load that swf using a loader (say ldr), use:
    MovieClip(ldr.content).f1();   // to call f1() in the loaded swf
    >

  • HELP PLEASE - loading external swf scale problem

    I have a Flex 3 Actionscript Project. Basically all it does it take some flash vars, set the sound volume,  and load an external swf using a loader and add the loader as a child. The problem is I want the loaded external swf to be scaled to fill the entire stage, even if it distorts it, and that doesn't seem to be happening.
    I really need to resolve this. ANY HELP APPRECIATED.
    Marcus

    Thanks for the reply!
    Here's basically what my code looks like (note: I cut some stuff out that wasn't relevant for the sake of clarity).
    private var swfLoader:Loader = null;
    public function MySwfContainer()  
        stage.scaleMode = StageScaleMode.EXACT_FIT;
        stage.align = StageAlign.TOP_LEFT;
        var request:URLRequest = new URLRequest(swfUrl);
        swfLoader = new Loader();
        swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,SWFLoader_Complete);
        swfLoader.load(request);       
    private function SWFLoader_Complete(event:Event):void
        addChild(swfLoader);
    What I am observing is that if a swf larger than the stage area is loaded it clips it rather than scale it down and make it fit.
    Marcus

  • Fiexed! AIR 3.7 on ios load packaged swf problem

    I have fixed this, thanks. It's because this:
    <mxmlc file="${SOURCE_DIR}/${APP_NAME}.${APP_EXTENSION}"
    output="${OUTPUT_DIR}/${APP_NAME}.swf"
    static-rsls="true" It's the problem
    accessible="true"
    configname="air"
    debug="${DEBUG_FLAG}"
    failonerror="true"
    fork="true"
    maxmemory="512m">
    Hi, nice guys
    Thanks for your time to watch my proble!
    I'm develop IOS App by AIR 3.7. I have seen this about load swf http://blogs.adobe.com/airodynamics/2012/11/09/packaging-and-loading-multiple-swfs-in-air- apps-on-ios/  . Everything works fine in debug mode, but when I release it , everything is gone.
    I'm using AIR 3.7 in GPU renderer mode, and load SWF with some code. I have add LoaderContext.
    var l:LoaderContext=new LoaderContext(false, ApplicationDomain.currentDomain);
    l.allowCodeImport=true;
    When I debug in Fast mode, everything is ok, in Standard mode package get the Errors:
    Error occurred while packaging the application:
    java.lang.NegativeArraySizeException
              at com.adobe.air.ipa.SWFUtils.read(SWFUtils.java:205)
              at com.adobe.air.ipa.SWFUtils.inspect(SWFUtils.java:250)
              at com.adobe.air.ipa.SWFUtils.<init>(SWFUtils.java:181)
              at com.adobe.air.ipa.SWFSplitter.main(SWFSplitter.java:68)
    Exception in thread "main" com.adobe.air.InvalidInputException: Invalid input. Not a valid swf file
              at com.adobe.air.ipa.SWFSplitter.main(SWFSplitter.java:105)
    Compilation failed while executing : ADT
    When I use a empty project to load a test swf, get the Error:
    Main Thread (Suspended: Error: Error #3747: Multiple application domains are not supported on this operating system.)
    Anybody know how to fix this ?
    Thanks!

    i have same problem. but i did not understand where is this code? where should i look?
    """<mxmlc file="${SOURCE_DIR}/${APP_NAME}.${APP_EXTENSION}"
    output="${OUTPUT_DIR}/${APP_NAME}.swf"
    static-rsls="true" It's the problem
    accessible="true"
    configname="air"
    debug="${DEBUG_FLAG}"
    failonerror="true"
    fork="true"
    maxmemory="512m">""""

  • AS3 - Load an SWF (problem)

    Hello,
    I have to make some kind of an portfolio where I have to load my .swf's and .f4v's I made past year.
    My code doesn't make me having errors.
    Code:
    var request:URLRequest = new URLRequest("bronbestanden/A_AndriessenB_Fotoalbum.swf");
    var laden:Loader = new Loader();
    laden.scaleX = laden.scaleY = 0.5;
    laden.x = 100;
    laden.y = 190;
    laden.load(request);
    addChild(laden);
    But when I click the button he loads my .swf's but plays it
    very very slow. The fps of both my portfolio and swf is exactly the same. I already put the code
    to load my .swf in another new file and there it works very fluently. All my other types of videos (.flv's and .f4v's) also
    run without any problem (even though my .f4v-files are bigger than my .swf's) Can anyone help me?
    Thanks

    // add some preloader entertainment display
    var request:URLRequest = new URLRequest("bronbestanden/A_AndriessenB_Fotoalbum.swf");
    var laden:Loader = new Loader();
    laden.scaleX = laden.scaleY = 0.5;
    laden.x = 100;
    laden.y = 190;
    laden.contentLoaderInfo.addEventListener(Event.COMPLETE.loadCompleteF);
    laden.load(request);
    function loadCompleteF(e:Event):void{
    // remove your preloader display
    addChild(laden);
    MovieClip(laden.content).gotoAndPlay(1);

  • Loading External SWF - Problem

    Hi,
    Using MovieClipLoader I want to load external SWFs - and it
    is working fine
    if external swf doesn't have anything outside it's stage,
    otherwise it shows
    everything - that's the problem.
    For example, external swf's stage dimensions are 100x150, but
    it has some
    timeline animation (some objects scrolling through the stage,
    some bouncing
    text animation that sometimes goes off-stage, etc..).
    So when I load this external movie (banner.swf), I can see
    all these objects
    that were bouncing outside this 100x150 area (the stage of
    banner). Even
    more - the size of loaded movie is larger than 100x150px
    (because of these
    off-stage objects that are now visible). This way I'm getting
    positioning
    problems, too.
    var mcl:MovieClipLoader = new MovieClipLoader();
    mcl.loadClip("banner.swf", holder);
    mcl.addListener(listener);
    holder._x = Stage.width/2 - holder._width/2;
    holder._y = Stage.height/2 - holder._height/2;
    Thanks in advance,
    B.

    Hi kglad,
    Does doing that takes only into account width and height of the stage, or also considers off stage items (as in the initial question)?
    I am also looking at this issue and we can't have all the content providers modify their pre-existing flash applications to be displayed in the appropiate scale. We are looking to any of the following:
    find a way to get adobe air/flash to not consider the off stage elements on the width/height we set to the movie.
    find a way to get the stage size from the external movie and use that to auto calculate the resize needed.
    any other alternative that allows to have the same end result, which is loading up the external content at the size we specify and displaying well. We can actually hide content outside the stage, but we still need to know the appropiate scale / size to apply to the movie so what's visible matches the are where we want to show the content.

  • Problems loading Flex3 swf into AIR app

    This is a challenging problem that I have reduced down to the
    bare minimum and it is still reproduceable. I have built a minimal
    AIR application and added a SWFLoader to it which loads a SWF file
    named "Junk.swf" using an absolute path.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute" title="Hello World">
    <mx:Style>
    WindowedApplication {
    background-color:"0x999999";
    background-alpha:"0.5";
    </mx:Style>
    <mx:SWFLoader
    source="C:/myProjectFolder/renderers/Junk.swf" width="100%"
    height="100%" />
    </mx:WindowedApplication>
    This works fine if I run the application from within Flex3,
    however when I build an installer, install the application to my
    windows vista system and execute it from the desktop the Junk.swf
    will not display. If I replace the Junk.swf with another SWF of the
    same name created in Flash CS3 then it will display properly when
    my test app is executed from either Flex or the desktop.
    The contents of the loaded SWF don't appear to be an issue
    since even the simplest of Flex3 SWFs fail to display.
    Interestingly when I add listeners to the SWFLoader to
    determine if any errors are happening no error events are sent, but
    I do receive both the INIT and COMPLETE events which tells me that
    the Junk.swf is found and loaded, just not displayed.
    Any assistance or even ideas that I could try would be
    appreciated.

    that's why i added those comments about the swf's domain.  for locally loaded swfs, use:
    SFMltd wrote:
    Hi Kglad, Thanks for the Example.
    if i run my class with securityDomain = SecurityDomain.currentDomain; then it throws this error: SecurityError: Error #2142: Security sandbox violation: local SWF files cannot use the LoaderContext.securityDomain property.
    The swf file im trying to load is stored locally so i guess this error makes sense. However if i comment out that line i get the same "cannot access Stage owned by app" error?
    See below for class:
    package  {
      import flash.display.MovieClip;
      import flash.filesystem.File;
      import flash.events.Event;
      import flash.net.FileReference;
      import flash.events.MouseEvent;
      import flash.display.Loader;
      import flash.net.URLRequest;
      import flash.system.LoaderContext;
      import flash.system.ApplicationDomain;
      import flash.system.SecurityDomain;
      public class assetPreview extends MovieClip {
      private var loader:Loader;
      private var mainSWF:MovieClip = new MovieClip();
      public function assetPreview() {
      addEventListener(Event.ADDED_TO_STAGE, initialise);
      public function initialise(e:Event):void
      removeEventListener(Event.ADDED_TO_STAGE, initialise);
      var allowSWF:LoaderContext = new LoaderContext(false,ApplicationDomain.currentDomain);
    // allowSWF.securityDomain = SecurityDomain.currentDomain;
      loader = new Loader();
      loader.load( new URLRequest(settingsXML.pathToSWF),allowSWF);
      loader.contentLoaderInfo.addEventListener(Event.COMPLETE, viewPreview);
      public function viewPreview(e:Event):void
      addChild(mainSWF);
      mainSWF.addChild(loader);

  • Problem loading one SWF into another in Flash AS3

    I am trying to load an SWF file in another SWF file. The child SWF file works fine when run standalone like if I set visibility of an item to true or false, it works fine. But when the SWF is loaded into a parent SWF, I am not able to execute such commands, neither I get any errors...

    are both swfs as3 swfs?
    is the code in the loaded swf and is that code referencing objects in the loaded swf?

  • Please Help with background color problem in loaded .swf

    I am stuck!
    This is Flash CS4...
    I created a flash application which loads in many other little flash applications (.swf files) based on menu selections.
    When I change one of the little applications the changes are viewable except when I change the background color.
    After the first time I view the application, the background color changes do not carry over to the main app.  I run the little ones stand alone and they show the new color, then I run the main app and any other changes I have made are there but not the color change.  When I remove the file and the load fails, the old backround color still displays in the container movie clip the .swf was previously loaded into.
    I have tried several different options and the only thing that worked was renaming and copying and deleting and making a big mess.  There has to be a way to force a refresh of this mysteriously saved color. doesn't there?
    Please help!
    Thanks!
    Vivian

    Hi Antonia
    I am loading the swf into an instance of a movie clip:
    var myLoader:MovieClipLoader = new MovieClipLoader();
    myLoader.loadClip("Capitalization.swf",  contCapitalization);
    it is the background of Capitalization.swf that will not change
    this is AS 2 since the app was created before I upgraded
    Any ideas?

Maybe you are looking for