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.

Similar Messages

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

  • 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();

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

  • 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

  • Can i use multiple-Swfs in one page to implement the real multi-thread?

    When there are multiple .swfs  in one web page,  if there will be multiple instaces of flashPlayer and run in multiple thread ?-- Per Swf Per instance and Per thread, is it?

    hi,
       It will not work at all In web browser enviornment. If you considering to
    make a scheme in which u use two swfs one helper swf for background
    processing and another for Displaying Front End.Problem remains there if you
    manage to send data from your one swf to the other in same page using
    localConnection . When the processing starts in the helper swf whole page
    will going to be stucked for the period until the helper swf has done
    processing the data.So its no use at all. Altough this library can help you
    make time slice based threads http://code.google.com/p/async-threading/

  • Loading multiple SWFs and storing them (code not working under Firefox 23 and Chrome)

    Hey guys,
    Anyone has any idea why this code suddenly don't work anymore? (It works under internet explorer but not firefox and chrome
    The code under is placed on my main swf to preload all my external swfs and store them for not having to wait too long to access them.
    Thx guys.
    I took the code from here btw: http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs#snippet
    I'm running flash player 11.8.800.94... It used to work under Firefox and Chrome
    var _swfLoader:Loader;
    var _swfRequest:URLRequest;
    var _swfPathArr:Array = new Array("00.swf", "01.swf", "02.swf");
    var _swfClipsArr:Array = new Array();
    var _swfTempClip:MovieClip;
    var _loadedSWFs:int;
    startLoading(_swfPathArr);
    function startLoading(pathArr:Array):void {
    _swfLoader = new Loader();
    _swfRequest = new URLRequest();
    loadSWF(pathArr[1]);
    function loadSWF(path:String):void {
    setupListeners(_swfLoader.contentLoaderInfo);
    _swfRequest.url = path;
    _swfLoader.load(_swfRequest);
    function setupListeners(dispatcher:IEventDispatcher):void {
    dispatcher.addEventListener(Event.COMPLETE, onSwfComplete);
    function onSwfComplete(event:Event):void {
    event.target.removeEventListener(Event.COMPLETE, onSwfComplete);
    _swfTempClip = event.target.content;
    _swfTempClip.customID = _loadedSWFs;
    _swfClipsArr.push(_swfTempClip);
    if(_loadedSWFs <_swfPathArr.length - 1) {
    _loadedSWFs++;
    loadSWF(_swfPathArr[_loadedSWFs]);
    } else {

    Hi kglad,
    The problem was coming from my server.
    I recently played with some settings  from a "cache control tool" offered by my hosting but i thought i had it back at default. Turns out i must've missed something. Now i have the .html caching on and everything works good on all browser.
    I have another question tho...
    I'd like to know if there's a way to cache an html file without having to ask my hoster to cache all of my htmls...
    I'm using this code now but maybe there's a way to add something that will cache this page specifically?
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>title</title>
    <script language="javascript">AC_FL_RunContent = 0;</script>
    <script src="fluid_site.js" language="javascript"></script>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
    <link href="style.css" rel="stylesheet" type="text/css" media="screen"/>
    </head>
    <!--url's used in the movie-->
    <!--text used in the movie-->
    <!-- saved from url=(0013)about:internet -->
    <script>
        if (AC_FL_RunContent == 0) {
            alert("This page requires fluid_site.js.");
        } else {
            AC_FL_RunContent(
                'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
                'width', '100%',
                'height', '100%',
                'src', 'index',
                'quality', 'medium',
                'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
                'align', 'middle',
                'play', 'true',
                'loop', 'true',
                'scale', 'showall',
                'devicefont', 'false',
                'wmode', 'window',
                'id', 'index',
                'name', 'index',
                'menu', 'false',
                'allowFullScreen', 'false',
                'allowScriptAccess','sameDomain',
                'movie', 'index',
                'salign', ''
                ); //end AC code
    </script>
    <body>
    <noscript>
        <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="100%" height="100%" id="index" align="middle">
        <param name="allowScriptAccess" value="sameDomain" />
        <param name="allowFullScreen" value="false" />
        <param name="MENU" value="false">
        <param name=wmode value=window>
        <param name="movie" value="index.swf" /><param name="quality" value="medium" /><embed src="index.swf" quality="medium" width="100%" height="100%" wmode="direct" name="fluid_site" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
        </object>
    </noscript>
    </body>
    </html>
    Thanks

  • Basic preloader for multiple swfs?

    I've looked at 100+ discussions around the web, not one good answer.
    I want some AS3 script equivalent to the following script (which I've made-up):
    loadallthefollowingswfs.intocache("home.swf", "products.swf", "contact.swf");
    I want a bunch of different swfs, all of which are in the same directory, to be loaded into the cache prior to viewing any of the swfs.
    I would like to put this script into the first frame of an index.swf
    Upon loading ALL of the swfs into the cache, it will move on to frame 2 of the index.swf and continue forward.
    All of the other discussions around the web state to either "have each swf load once it is opened" (I don't want that, I want them all preloaded into the cache prior to viewing any one of the swfs), or the discussions say "you should combine all of the flas into a single fla and just preload that one swf file (I don't want that either, I want seperate fla/swf files).
    Anyone have any suggestions on how to load multiple swfs into the cache when accessing one frame of an swf?
    Thank you.

    Greetings,
    Actually I just want to ask you guys about  how will I be able to use these snippet? I tried to insert a trace inside the else area of the if statement, but, didn't showed up any results in the output window...
    BTW: I just paste this snippet inside a new layer new flash file and saved it along with the two .swf files.
    var swfA:Array=["home.swf","works.swf"];
    var index:Number = 0;
    var targetMC:MovieClip=this.createEmptyMovieClip("targetMC",this.getNextHighestDepth());
    targetMC._alpha = 0;
    var mcl:MovieClipLoader=new MovieClipLoader();
    var lo:Object = {};
    lo.onLoadInit = function(target:MovieClip)
    index++;
    if(index<swfA.length)
    loadF();
    else
    // all are  loaded.  do whatever
    trace("Load Ok...");
    loadF();
    function loadF()
    mcl.loadClip(swfA[index],targetMC);
    here's my code
    var swfA:Array=["home.swf","works.swf"];
    var index:Number = 0;
    var targetMC:MovieClip=this.createEmptyMovieClip("targetMC",this.getNextHighestDepth());
    targetMC._alpha = 0;
    var mcl:MovieClipLoader=new MovieClipLoader();
    var lo:Object = {};
    lo.onLoadInit = function(target:MovieClip)
    index++;
    if(index<swfA.length)
    loadF();
    else
    // all are  loaded.  do whatever
    trace("Load Ok...");
    loadF();
    function loadF()
    mcl.loadClip(swfA[index],targetMC);

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

  • Using iTunes on multiple ipods and PCs

    I currently have an iPod mini (purchased 2005) which I use in conjunction with iTunes on my PC. My mini is now on its last legs, and so my partner and I are going to get some replacements: two iPod shuffles (one each) and a classic to put our combined music collections on.
    There are a couple of things that I could use help with.
    1.) How do I connect the three new iPods that we're going to buy to my existing iTunes library?
    2.) Is it possible to create a combined iTunes library that is shared between my PC and my partner's PC, so that we can each share each other's music? (My partner is not currently on iTunes and would have to sign up first).
    3.) Is it possible to use our shared iPod classic both on my PC and on my partner's? (My PC runs on windows xp and my partner's on windows 2000).
    Thanks for your help!

    There are several different ways to use multiple iPods with one computer, have a look at this help page for suggestions and choose the method that suits you best: How to use multiple iPods with one computer
    If you want to connect and use an iPod on more than one computer or with more than one library you need to change the update preference in the iPod Summary tab to "Manually manage music and videos" and click Apply. The content of iTunes and the iPod are not syncronised in this mode so the two can be different. You can directly access the content of the iPod and play it through iTunes and you can drag and drop whatever you want to the iPod from either library (iPod shuffles can only be used with one library by the way):
    Using iPod with Multiple computers
    Managing content manually on iPod and iPhone
    Syncing Music to iPod
    Something else to be aware of when using an iPod in manual mode is that the "Do Not Disconnect" message will remain on the display until you physically eject the device: Safely Disconnect IPod

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

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

  • Sharing SharedObjects between multiple .swfs

    Relatively simple problem; I have a project that I think may be more manageable if I break it up into multiple small .swf files rather than having a gargantuan mega .swf.
    Now, I know that I could use a root .swf and load data from the others, but I think that it'll be a lot easier to debug and update if I'm using separate self-contained .swfs, so this is the direction I'm currently investigating.
    However, the .swfs won't really work unless I can have user-data persist between them, so I'm wondering if I can load a SharedObject saved by another .swf file? Are there any important caveats that I need to be aware of?
    In particular, can anyone give me sample code that would allow me to do this with both an online and offline copy of the files; i.e - if I run the same set of .swfs from haravikk.com, and locally, I want them to still be able to share data with one-another. In this case though I won't need to worry about sharing data between a local copy and haravikk.com, just so long as the files themselves can pass data within whatever domain they're loaded it should be fine.

    To do this I still need to make sure that all .swfs are retrieving/flushing their SharedObjects to the same domain though, right?
    I'm curious, is there a good way to work out what the right domain is dynamically?
    For example; say I have "Menu.swf", and "About.swf", both store in the same folder "MySite", so the files are located at "MySite/Menu.swf" and "MySite/About.swf" respectively. To avoid tying the files to a particular domain-name (so it can still work offline) I'd like to grab the current location of the .swf, and remove the file-name so that I have a domain containing just the enclosing folder.
    Is there a best way to do this? Basically so I can have my .swf files using a consistent domain for storing/saving, while still supporting relocating the files, so they will work offline if I copy them to my local machine for example.

Maybe you are looking for