Multiple SWF's in AIR

Where can I find out how to create a AIR application using
Flex to create Multiple SWF's to use.
Example Of this could be:
I have three business processes:
Accounts Receivable as one SWF
Accounts Payable as one SWF
Human Resources as one SWF
I want to do this so I can regression test only those SWF's
that have been rebuilt.
A simple example or link in right direction would be great.
Thanks in Advance

Here is the Answer to the question
Create a Module I called it myModule
<mx:Module xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute" width="400" height="300">
</mx:Module>
Where you need to display it in my mxml do something like
<mx:ModuleLoader id="m1"
url="myModule.swf"
ready="init();"/>
in your init()
mm = myModule(m1.child)
don't forget the class var
private var mm:myModule;

Similar Messages

  • AIR for IOS, ApplicationDomain problem: Error #2007: Parameter Possible symbol clash in multiple swf

    I am exporting a game for IOS in Flash CS6.
    I have isolated classes, except a framework for static utilities that do not clash, but I still get this message when exporting for IOS.
    AIR for desktop, even with ApplicationDomain.currentDomain works and does not give any error. Same on android.
    When I export the same exact project for IOS, it triggers that error randomly in different parts.
    All related with a call to a method on superclass, the instantiation of an internal class, or of a Vector typed to a custom internal class.
    TypeError: Error #2007: Parameter Possible symbol clash in multiple swfs, abcenv must be non-null.
    The line that triggers the error:
    return new RouletteChoserItemDev(num, data);
    Any help is appreciated.
    UPDATE
    I have changed the code into:
    var item:RouletteChoserItemDev;
    var MyClass:Class = RouletteChoserItemDev;
    item = new MyClass(num, data);
    Now I get this funny error:
    Error #1034: Type Coercion failed: cannot convert device.plugins.rouletteLobby::RouletteChoserItemDev@6284bc9 to .
    Yes, cannot convert to ".", a dot!

    *FOUND A SOLUTION*
    The way ApplicationDomain.sameDomain works on Android and Desktop, and on IOS, IS DIFFERENT!!!
    I probably have to file this under AIR bugs.
    Anyway:
    - In loaded SWFs, classes which are not already stored in parent SWF CANNOT be instantiated.
    I.E.
    var c:MyClass = new MyClass(); // Will not work
    var c = new MyClass(); // Will not work
    var c:MyClass = getDefinitionByName("fullpackage.MyClass"); // Will not work
    var c = getDefinitionByName("fullpackage.MyClass"); // WORKS!!!!!
    var c:DisplayItem = getDefinitionByName("fullpackage.MyClass"); // WORKS!!!!!
    So, it seems that classes stored in local loaded SWF will not be accessible directly. Even though tracing it trace(MyClass) works well, the class cannot be used in code in any place. Variables cannot be typed, and class can only be instantiated with getDefinitionByName();
    All this, is true ONLY on IOS, same exact project and settings, will not trigger any error in AIR for Desktop or for Android.
    But since obviously we use the same codebase for all devices, this IOS *feature* has to guide the way we code, even though we break a few important OOP best practices.
    Hope I spared someone else the 3 days including an entire weekend I had to invest to find this out.

  • Loading multiple swfs using air 3.6 for ios

    Adobe, can you please provide us with the code to load multiple swf files for ios. Please provide examples. The code below loads multiple swfs, but the swfs stall, so this does not seem to be a solution.
    Code description: A flash file made up of 4 frames with forward and back buttons that navigate from frame to frame. The code loads three different swf files in frames 2, 3 and 4.
    Frame 1:
    var myLoader:Loader;
    var loaderContext:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain, null);
    if(myLoader == null){myLoader = new Loader(); addChild(myLoader); }
    else {myLoader.unload();}
    Frame 2:
    myLoader.unload();
    myLoader.load(new URLRequest("file1.swf"),loaderContext);
    Frame 3:
    myLoader.unload();
    myLoader.load(new URLRequest("file2.swf"),loaderContext);
    Frame 4:
    myLoader.unload();
    myLoader.load(new URLRequest("file3.swf"),loaderContext);

    I've just tried loading, unloading and then loading again same SWF with 2 library objects linked for AS3 export. It worked both on simulator and on device in debug mode. When I look inside swf it does contain AS3 code.
    So is my swf a pure asset SWF? Or Intellij Idea 12 that I'm using does stripping automatically?
    And then I've read your comment at http://forums.adobe.com/message/5217325#5217325 and run 'swfdump' utility on my .swf file. Looks like there's no ABC2 code, that's why app was able to load, unload and load again the same swf.
    public dynamic class net.games.bg extends flash.display.MovieClip
      native public function bg():*;
      native public var one:flash.display.MovieClip;
      native public var three:flash.display.MovieClip;
      native public var two:flash.display.MovieClip;
    public dynamic class net.games.z1 extends flash.display.MovieClip
      native public function z1():*;
    I can access objects as instances through root  or as objects through getDefinition.
    private var aLoader : Loader;
    private function init():void
                load1();
            private function load1():void
                aLoader   = new Loader();
                var url:URLRequest = new URLRequest("levels/expirementlevel1.swf");
                var loaderContext:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain, null);
                aLoader.load(url, loaderContext); // load the SWF file
                aLoader.contentLoaderInfo.addEventListener(flash.events.Event.COMPLETE, handleSWFLoadComplete1, false, 0, true);
            private function handleSWFLoadComplete1(e:flash.events.Event):void {
                var levelObjectsMC:flash.display.MovieClip = e.target.loader.content;
                for (var i:uint = 0; i < levelObjectsMC.numChildren; i++){
                    trace ('\t|\t ' +i+'.\t name:' + levelObjectsMC.getChildAt(i).name + '\t type:' + typeof (levelObjectsMC.getChildAt(i))+ '\t' + levelObjectsMC.getChildAt(i).x);
                var LibraryClass:Class = e.target.applicationDomain.getDefinition("net.games.z1") as Class;
                var myLibraryObject:flash.display.MovieClip = new LibraryClass as flash.display.MovieClip;
                trace(' load 1 ' + myLibraryObject);
                aLoader.unload();
                load2();
                //addChild(levelObjectsMC);
            private function load2():void
                aLoader   = new Loader();
                var url:URLRequest = new URLRequest("levels/expirementlevel1.swf");
                var loaderContext:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain, null);
                aLoader.load(url, loaderContext); // load the SWF file
                aLoader.contentLoaderInfo.addEventListener(flash.events.Event.COMPLETE, handleSWFLoadComplete2, false, 0, true);
            private function handleSWFLoadComplete2(e:flash.events.Event):void {
                var levelObjectsMC:flash.display.MovieClip = e.target.loader.content;
                for (var i:uint = 0; i < levelObjectsMC.numChildren; i++){
                    trace ('\t|\t ' +i+'.\t name:' + levelObjectsMC.getChildAt(i).name + '\t type:' + typeof (levelObjectsMC.getChildAt(i))+ '\t' + levelObjectsMC.getChildAt(i).x);
                var LibraryClass:Class = e.target.applicationDomain.getDefinition("net.games.z1") as Class;
                var myLibraryObject:flash.display.MovieClip = new LibraryClass as flash.display.MovieClip;
                trace('load 2 x ' + myLibraryObject.x);
                aLoader.unload();

  • Can I use multiple swfs in iOS app?

    Hello everybody,
    I have to create an app for iOS from an existing Flash project.
    On the stage of the main flash multiple swfs are loaded dynamically .
    Is it possible to compile, in addition to the main file, all the other swfs too?
    If I load the swf in the "Included files” on “Setting AIR for IOS” menu, they are copied as swf, making impossible to use the app on iPad.
    Thanks to all

    Thanks,
    I left a component in the external swf library...
    Now it works!

  • Creating IPA file with Multiple SWF files using ADT

    Iam successfully able to create ipa files using the ADT package but my next requirement is to create an IPA file with multiple swf files.I think it might be easy if your SWF files are regular the tough part is my swf file has lot of action script in it so the only option is to through the command prompt and using the ADT package of Adobe AIR.So now i have 10 SWF files like this and iam creating ipa file for each swf seperatly but now I want to put all of the swf files into one ipa file.Please let me know if i was not clear in my description

    I think you are trying to explain how to load two swf's one with action
    script and loading an other swf file which should be non action script.If
    you read my requirement carefully.I have all the same type of swf's and
    these swf are automatically created as a form of output for xcelsius dash
    board software.Iam capable of creating individialu ipa files from these swf
    files.So when I try to combine the same kind of swf files the first error
    its giving is the file name which I have used in the xml.in the main file
    name for the swf file its not considering the two swf file name in the
    initial window.so the adt package in the command line is not understanding
    the file name from the xml and the command prompt and giving error this swf
    file does not exist.So please consider how to combine two swf files with AS3
    into one ipa file.These swf files are not editable,Let me know if you find
    any idea to achieve this

  • Loading SWF's in AIR for iOS

    Hi,
    I am working on a project in AIR for iOS.  It's great that we as flash developers are now able to compile our actionscript code for iOS.
    The project i'm working on is divided in different SWF-files.  There is one master SWF file that loads the others when needed.
    Now i can't get loading of a swf file actually working.  The only thing i see is the background of the child being displayed, but then the program freezes and no actionscript code of the child gets exectuted.
    The children swf's are loaded with a simple Loader:
    var loader:Loader = new Loader();
    childLayer.addChild(loader);
    var url:URLRequest = new URLRequest("child.swf");
    loader.load(url);
    When i publish the master swf file i include the children swf files in the package.
    Is it actually possible to use multiple swf's in your iOS projects?
    And what are the limitations for this?
    Thanks.
    greeting,
    Bert

    You can control your external swf from your main.swf in the following method:
    loadswf(clips[0]);
    function loadswf(tmp:String):void{
        passedString=tmp;
        ldr= new Loader();
        ldr.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressListener);
        ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, swfLoaded);
        ldr.load(new URLRequest(animPath+tmp));
        function progressListener (e:ProgressEvent):void{
            ploader.visible=true;
        function swfLoaded(e:Event):void {
            mcExt = e.target.content as MovieClip;
            ldr.contentLoaderInfo.removeEventListener(Event.COMPLETE, swfLoaded);
            mcExt.addEventListener(Event.ENTER_FRAME,onEnterfn);
            ploader.visible=false;
            addChild(mcExt);
    function onEnterfn(e:Event):void{
        var num:int=mcExt.currentFrame;
        switch(passedString){
            case clips[0]:
                if (num==1) mcExt.play();
                if (num==9) {
                   mcExt.skipmc.addEventListener(MouseEvent.CLICK,skipfn);
                    function skipfn(e:MouseEvent):void{
                        mcExt.stop();
                       mcExt.removeEventListener(Event.ENTER_FRAME,onEnterfn);
                        gotoAndStop("help");
                if (num==mcExt.totalFrames){
                   mcExt.removeEventListener(Event.ENTER_FRAME,onEnterfn);
                    gotoAndStop("help");
                break;

  • IE running under XP can't handle multiple SWF files, Why?

    I noticed that IE 8 running under Windows XP cannot handle multiple swf files in one page.
    Up to about 10 files is no problem they are loaded and we can play them ( buttons that start a small audio file).
    But more of these files in one page will stop IE.
    Firefox ( 3.6.28) runs them fine.
    And also IE 8 and/or Firefox under Windows 7 handles them perfectly.
    Has anyone any idea what can cause this and how to resolve this?
    Thanks,
    Onno Tomson
    The Netherlands

    Sorry...I still don't get it. What is it about Windows FUS that keeps iTunes from running running the process twice? It can run many other non-Apple windows apps in multiple user sessions (commercial apps, open source apps, audio/video apps, networked apps). I can even run two different virtual machines at the same time under two different user sessions.
    Why can iTunesHelper.exe run twice but iTunes.exe cannot? Why can I run Safari at the same time? Quicktime Player runs fine under multiple user sessions.
    Blaming it on Windows and/or FUS sounds like FUD. Can anyone give a valid technical reason? Semaphores? Mutexes? An admission (and explanation) that the Windows version is purposely crippled?

  • How to load multiple swfs to my main flash file??

    I am using the following code
    In actions for Frame 1:
    var myrequest:URLRequest=new URLRequest("A.swf");     
    var myloader:Loader=new Loader();
    myloader.load(myrequest);
    img1.addEventListener(MouseEvent.CLICK, clickButton);
    function clickButton(event:MouseEvent):void{               
        stage.addChild(myloader);
    img1.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_5);
    function fl_ClickToGoToAndStopAtFrame_5(event:MouseEvent):void
         gotoAndStop(13);
    In action for Frame 13:   (img2 is another button)
    img2.addEventListener(MouseEvent.CLICK, unloadFunction);
    function unloadFunction(event:Event):void{
         stage.removeChild(myloader);
    This code works perfectly fine. My only problem is, How do I get multiple swf loaded. When I tried to copy and paste the same code for the other swf, but the following errors appear. I'm pretty sure theres a way to have multiple swfs (btw the multiple swfs will be linked from different frames).
    Scene 1, Layer 'PAGES!', Frame 2, Line 7 1021: Duplicate function definition.
    Scene 1, Layer 'PAGES!', Frame 2, Line 2 1151: A conflict exists with definition myloader in namespace internal.
    Scene 1, Layer 'PAGES!', Frame 2, Line 1 1151: A conflict exists with definition myrequest in namespace internal.
    Can someone please help me with this. Thanks

    You define the same variable or function names more than once in a file.  But you can reuse them in other frames.  Try something more like the following in frame 2....
    myrequest=new URLRequest("A.swf");     
    myloader.load(myrequest);
    leave all of the rest out for starters... the same function from frame 1 can be re-used without rewriting them.  I don't know what the deal is with img1, but if you need to change what it does, then add that back in.

  • How to bundle a .FLA and multiple .SWF files in one .EXE?

    Hi,
    I have a .FLA file which uses loadMovieNum() to load various
    .SWF files when each one is called by the user clicking on a
    button. Each .SWF file also uses loadMovieNum() to call a second
    .SWF file. When I publish the .FLA file as a .SWF file it all works
    beautifully.
    Now I need to package the entire project into a Windows
    projector .EXE file for offline use on a computer without the Flash
    Player. When I publish the main .FLA file as a .EXE file, the .SWF
    files still load, although they blink before fully loading and
    displaying steadily.
    What I would really like to do is to bundle all the .SWF
    files into the .EXE file so when I send the finished project to the
    end user, they only have to deal with one file, rather than a
    folder with the .EXE file and multiple .SWF files.
    Is there a way to do this?
    I am using Flash 8 Professional.
    Thanks,
    Cam

    Since this isn't going to be web-based, why not include all
    the external swf files into the same Flash file and then use
    attachMovie?
    This will allow you to create one .exe file that would
    contain EVERYTHING. Since you aren't worried about loading speeds,
    you don't have to load the movie clips, but can simply create one
    large Flash file.

  • Adding multiple swf files to Dreamweaver

    I'm trying to upload multiple .swf files to my website with
    no luck. I've done this with previous versions of Dreamweaver but
    with CS3 I'm finding it won't happen. I've done the Insert ->
    Media -> Flash action as before and exported my files to be read
    in Adobe Player 8 but nothing then happens after the files have
    been uploaded yet locally everything works fine. I've uploaded a
    scripts file also but all of the .swf files are linked from
    different folders, could this have any effect?
    What am I doing wrong?
    Chris.

    CJR 2007 wrote:
    > I'm trying to upload multiple .swf files to my website
    with no luck. I've done
    > this with previous versions of Dreamweaver but with CS3
    I'm finding it won't
    > happen. I've done the Insert -> Media -> Flash
    action as before and exported my
    > files to be read in Adobe Player 8 but nothing then
    happens after the files
    > have been uploaded yet locally everything works fine.
    I've uploaded a scripts
    > file also but all of the .swf files are linked from
    different folders, could
    > this have any effect?
    >
    > What am I doing wrong?
    Generally making sure that the SWFs are at the remote
    location where you think they are supposed to be (and where the
    code thinks they are supposed to be) as well as making sure that
    the active content JavaScript file(s) are uploaded and are present
    where the page is expecting them to be. Beyond that, for anyone to
    see what is wrong with your page(s), you have to post a link to
    your page(s).
    Danilo Celic
    | Extending Knowledge Daily :
    http://CommunityMX.com/
    | Adobe Community Expert

  • Multiple SWF's in one player

    I'm trying to build a page with multiple swfs on one page in DWCS3. What I would like is to be able to  click on thumbnails and have the thumbnails bring up the swf in the main player. I have been able to code for wmvs -- but they don't work in mozilla.
    Can anyone point me to some code or a tutorial? Is this more of a flash issue and do I have to learn major AS? I have been out of flash since 8.
    Thanks.

    Hi
    Believe it or not this is quite simple (well maybe not so simple ), all you have to do is create an xml playlist and ... (sorry! just having one of my funny days), seriously here are the links to the tutorials, if you get stuck, let me know as I have done this for both types of server a number of times.
    For streaming server - http://www.adobe.com/devnet/flash/articles/video_player_print.html .
    For progressive (normal use) - http://www.adobe.com/devnet/flash/articles/video_playlist.html
    PZ

  • 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...

  • SWF Player in AIR -  not displaying window component and Popup ..?

    Hi Friends.....
    I have developed  SWF Player in AIR,but getting some error when swf playing....
    Popup or  window components are not displaying properly  when swf is playing ,
    please give me a solution to solve this....?
    i think swf playback taking high memory that why preventing new component creation ...right...?
    Thanks..

    Hi Jim,
    for application with application sandbox and for top-most html documents you could for example:
    <script type="text/javascript">
         function clicked()
              if(window.runtime)
                   var app = window.runtime.flash.desktop.NativeApplication.nativeApplication;
                   if(app) app.exit();
              return false;
    </script>
    <a href="#" onclick="clicked();">CLOSE</a>
    or even:
    if(window.nativeWindow)
         window.nativeWindow.close();
    I think this works without installing any additional javascript sources, see:
    http://livedocs.adobe.com/flex/3/html/help.html?content=AboutHTMLEnvironment_4.html
    kind regards,
    Peter

  • Using 1 movieclip in multiple swf's. possible?

    Ls,
    I was wondering if it is possible to have a movieclip that you can like export and then share in multiple .swf files.
    This, without importing them from external libraries in the .fla files afcourse.
    So like i have a movieclip containing different type tile bitmaps (i do that why im asking)
    I use these tiles in the editor and in the game .swf;
    Changing the(adding to) graphics has me importing the mc from from one .fla into the other.
    Is it possible to make mc in a .fla, export it and dynamicly import it?
    Or can I read the library from the other .fla dynamically?
    Regards,
    mac

    So, and I'm asking not arguing, all i have to do is make a .swf with all my movieclips in there and no code.
    correct, but you must assign a class to each movieclip in the swf's library that you want to use.
    Then load the swf and use the assigned class in my code in different modules.
    yes
    Then, when adding graphics to the movieclips, i dont even have to recompile my code?
    correct, any change to the graphics of your movieclips will be reflected in all the swf's that load that movieclip containing resource swf.  no code needs to be redone or recompiled to reflect the graphic changes.

  • Question on launching SWF's with AIR support

    I apologize in advance for my ignorance in this, but I am just getting started using Flex/Flash.
    The Adobe PDF Driver SDK recommends using Flash for the driver UI.  One of the entries in the configuration file for the driver is for specifying the path to the SWF file.  It is this SWF file that is shown when the driver UI is displayed.
    I have a need in the driver I am creating to access the File system, and so I need to build this SWF as an AIR app (so I can include flash.filesystem.*).  But the problem is that I can only specify the name of the SWF file in the configuration file, and can't tell it to run adl.exe nor specify the descriptor file.
    Is there any way to build an AIR app (as a desktop app) without it needing adl or the descriptor file?
    I am currently using a trial version of Flash Builder, but ultimately the SWFs will need to be created on the fly using the command-line compiler (amxmlc).

    I apologize in advance for my ignorance in this, but I am just getting started using Flex/Flash.
    The Adobe PDF Driver SDK recommends using Flash for the driver UI.  One of the entries in the configuration file for the driver is for specifying the path to the SWF file.  It is this SWF file that is shown when the driver UI is displayed.
    I have a need in the driver I am creating to access the File system, and so I need to build this SWF as an AIR app (so I can include flash.filesystem.*).  But the problem is that I can only specify the name of the SWF file in the configuration file, and can't tell it to run adl.exe nor specify the descriptor file.
    Is there any way to build an AIR app (as a desktop app) without it needing adl or the descriptor file?
    I am currently using a trial version of Flash Builder, but ultimately the SWFs will need to be created on the fly using the command-line compiler (amxmlc).

Maybe you are looking for

  • How can I repair "an access violation has occurred"

    I found this message after you install the update of an audio software (Pro Tools 8.0.5) and after trying to listen to an audio recording "an access violation has occurred." In a later appeared to me the message "/ System / Library / Extensions / CDS

  • Flow charts for work flow in dynpro / webdynpro

    hey is it possible to add flow charts ( not by pictures ) to a program in dynpro or webdynpro  ? i need some how to visualize all the station flow  in my work flow ( the regular wf log is not good enough ) . any ideas ? regards ASA.

  • Help with my ipad and vodafone

    hello all hope someone can help me as im stuck. my ipad 2 broke about 3 weeks ago so took it to vodafone and they said they would try and fix it but could not so they sent it to apple last week had an email saying it was fixed and would be ready toda

  • How to append spaces into a jsp page

    i have some strings for which i have to append spaces ,but jsp page doesn't take more than one space . i am sending all these strings in the form of a vector . how this can be solved

  • IDVD does not advance slides in preview

    I created a slideshow in iDVD on my PowerMac. When imported into my new MacBook Pro, the slides appear fine in editing mode, but when previewed, the slides do not advance, though the audio track plays. Any suggestions would be much appreciated. Thank