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.

Similar Messages

  • Sharing jsp between multiple controllers

    Is there a way to share a jsp between 2 different controllers?
    If I put the shared jsp in its own directory and the 2 controllers in their own directories - I seem to be able to use netui:anchors and specifying the fully qualified "href" attribute - but not the "action" attribute. For example this works (but means I have to specify the exact controller):
    <netui:anchor href="/portlets/Controller1/findAction.do">
                find
    </netui:anchor>This does <b>not </b>work:
    <netui:anchor action="findAction">
                find
    </netui:anchor>Additionally, if I want a form to be on this shared jsp - I don't know of a way to use the netui tags to accomplish this... This example results in an error (as if it's trying to find the action in Global.app):
            <netui:form action="submitSharedForm">
                <table>
                    <tr valign="top">
                        <td>Foo:</td>
                        <td>
                        <netui:textBox dataSource="{actionForm.foo}"/>
                        </td>
                    </tr>
                </table>
                <netui:button value="submitSharedForm" type="submit"/>
            </netui:form>Are there other better techniques for sharing jsps between multiple controllers (jpf)? The only other thing I was thinking of trying to have a jsp found within the same directory as the controller include the shared jsp (which seems kind of tacky)...

    You may consider using a base pageflow controller that has the common JSPs
    in its directory. I have done that before like this:
    // inheritLocalPaths=true lets us inherit the JSPs from the base pageflow
    @Jpf.Controller(
    inheritLocalPaths=true
    public class MyChildController extends MyBaseController
    Ture Hoefner
    WebLogic Portal Engineering
    <Tim Rafert> wrote in message news:[email protected]..
    Is there a way to share a jsp between 2 different controllers?
    If I put the shared jsp in its own directory and the 2 controllers in
    their own directories - I seem to be able to use netui:anchors and
    specifying the fully qualified "href" attribute - but not the "action"
    attribute. For example this works (but means I have to specify the exact
    controller):
    <netui:anchor href="/portlets/Controller1/findAction.do">
    find
    </netui:anchor>This does <b>not </b>work:
    <netui:anchor action="findAction">
    find
    </netui:anchor>Additionally, if I want a form to be on this shared jsp - I don't know of
    a way to use the netui tags to accomplish this... This example results in
    an error (as if it's trying to find the action in Global.app):
    <netui:form action="submitSharedForm">
    <table>
    <tr valign="top">
    <td>Foo:</td>
    <td>
    <netui:textBox dataSource="{actionForm.foo}"/>
    </td>
    </tr>
    </table>
    >            <netui:button value="submitSharedForm" type="submit"/>
    </netui:form>Are there other better techniques for sharing jsps between multiple
    controllers (jpf)? The only other thing I was thinking of trying to have
    a jsp found within the same directory as the controller include the shared
    jsp (which seems kind of tacky)...

  • Local Shared Objects and multiple SWFs: mutexes necessary?

    I will have multiple SWFs on a single web page, each reading
    and writing the same SharedObject, which may be up to 100K in size.
    Will I need to create some sort of mutex scheme to ensure that one
    SWF isn't writing while another is reading, or do all SWFs on a
    page essentially run as a single-threaded application?

    >1) I don't think a SharedObject.flush is synchronous.
    I believe it is, as long as you're not attempting to write
    more data than the user has set for the Local Storage limit.
    http://livedocs.adobe.com/flex/3/langref/flash/net/SharedObject.html#flush()
    You'll note that flush is described this way: "Immediately
    writes a locally persistent shared object to a local file", and if
    it returns "SharedObjectFlushStatus.FLUSHED" that means that "The
    shared object has been successfully written to a file on the local
    disk". So I'd say that the normal operation of flush() is
    synchronous. However, the SharedObjectFlushStatus.PENDING state
    means that we've exceeded the limit set by the user, and are
    waiting for them to allow or disallow it. I believe (strongly) that
    that's the only case in which a netStatus event is sent.
    Do you read this differently?
    As far as multiple SWFs running as cooperative or preemptive
    multitasking processes, I'd really like to know the answer, but it
    probably doesn't matter. The more I read and think about this, the
    more it seems to me that Adobe has to prevent simultaneous reads
    and writes to a single Shared Object from taking place, as one use
    of it that I've read about is to share data between SWFs. For
    example:
    http://www.devarticles.com/c/a/Flash/Communication-and-Security-with-the-Flash-Communicati on-Server/1/

  • Sharing photos between multiple users on one Mac

    I'm trying to figure out how to easily share photos imported in by one user to other users in my family on my mac. I'm assuming we don't have to import them multiple times. It seems cumbersome to this new mac user to share them. I find the issue with iTunes. Any help?

    HI Darien,
    Here are all the links I have for the different kinds of sharing:
    SHARING IPHOTO LIBRARIES
    Sharing libraries between users on the same local network
    You can also share a library on the same machine between users the same way.
    Sharing libraries between users on the same machine...
    -both users must have sharing enabled in their iPhoto Preferences
    -both users must be logged in and have iPhoto running
    -Remember that you can only view the other library. You can't edit the photos or play the saved slideshows or view the made books or burn them to CD or DVD. The books and slideshows will show up as an album. You can play that album as an "on the fly" slideshow. You can drag images from the sharing library to your library in the source column to import them to your library. You can then edit, add to albums, books, slideshow, etc.
    Sharing links from Apple....
    Sharing your photos between computers
    About shared photos
    Turning off photo sharing
    Looking for shared photos
    SHARING ONE IPHOTO LIBRARY BETWEEN USERS ON SAME MACHINE
    You can try one of these three methods:
    1- Use iPhoto Library Manager-the paid version
    The documentation page will give instructions on how it is done.
    2- Sharing one iPhoto library between several users on one machine
    3- Share an iPhoto Library in tiger Using ACL's
    4- I have also read about ShareAlike
    There is no other info on the site about how it works.
    I strongly urge anyone wanting to try any of the methods for sharing one iPhoto Library folder among more than one user to backup all iPhoto Library folders before attemptin anything.

  • Sharing images between multiple help outputs

    Hi Everyone,
    Question: does anyone know if it is possible to have an image repository that sits outside of the help SSL such that multiple Webhelp systems can reference a common image repository?
    I'm using Rh10 to write help in English which then gets translated into many languages.
    The problem we face is that our installation DVD is now huge thanks to all these different help langauge resources.
    The images are repeated within each different language output.
    Thus I was asked recently if there are any efficiencies possible here - for example by sharing images (that are common to each language output) in one central folder.
    It makes a lot of sense, but as far as I can see it's not possible in Rh10.
    Can anyone confirm or deny?
    Many thanks in advance.
    Cheers,
    Andy

    You can have a Resource Manager for images but that is only so that you can ensure an image used in a project is the same as that repository. It is copied into each project and you get a warning if the two are different. It does not mean the image is outside the project.
    Try this though. It might just work. All your outputs are under one folder something like:
    Help Files
    ... English
    ... French
    etc.
    Now add a folder called shared images. Create a relative link in a topic to an image in that folder. You will lose functionality like missing images and they will likely not show in the Design Editor so it will be pretty horrible. Might give you what you want though. Can't stop right now to test it.
    Let us know the outcome.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • Sharing SharedObjects between Classes

    I have created a varable of Shared Object inside the Document Class
         EXAMPLE -> var so:SharedObject = SharedObject.getLocal("Barns","/");
    but inside of a movieclip class I have
         if(so.data.adams == "yes"){
              adamsHighlight.visble = true}
    and I get an error
    E:\Android 2.0\ohioMap.as, Line 12
    1120: Access of undefined property so.
    what am i missing here. I thought if it was public, it is shared throughout the project
    sorry new to classes.

    it is but so is not defined in your movieclip class unless you use:
    var so:SharedObject=SharedObject.getLocal("Barns","/");
    now, the so in your document class and in your movieclip class reference the same object.  eg,
    //doc class
    so.data.testvar="hi";
    //movieclip class
    trace(so.data.testvar);  // should trace 'hi'

  • SWFaddress deep linking between multiple swfs

    Hi, I am using SWFaddress to create deep linking within my
    website. It works great within the main swf, however when I load a
    new swf, the history chain becomes broken. I think it is to do with
    the Actionscript on the 1st frame on the loaded swf.
    The Actionscript in the 1st frames of both swf files is:
    #include "SWFAddress.as"
    function btnRelease() {
    SWFAddress.setValue(this.deepLink);
    function btnRollOver() {
    SWFAddress.setStatus(this.deepLink);
    function btnRollOut() {
    SWFAddress.resetStatus();
    SWFAddress.onChange = function() {
    var value = SWFAddress.getValue();
    if (_currentframe == 2 && value == '/') {
    play();
    } else {
    var frame = _currentframe;
    gotoAndStop('$' + value);
    if (frame == _currentframe) {
    gotoAndStop('$/error/');
    return;
    SWFAddress.setTitle(formatTitle(value));
    Should I amend the Actionscript in the loaded swf? The
    Actionscript in the 1st frame of a button is:
    this.deepLink = '/welcome/';
    this.onRelease = _root.btnRelease;
    this.onRollOver = _root.btnRollOver;
    this.onRollOut = _root.btnRollOut;
    stop();
    Hope someone can shed some light on this.
    Many thanks

    Bar,
    Why do you create separate projects? You can have multiple app defs in one project, all generating into their own subdirectories. See chapter on Team-based development in Dev Guide for more info.
    Anyway, even with separate projects (meaning separate web applications when running within JDev, you could still deploy everything in one ear file) this can be done. In this case, the deep link should be a goLink rather than a commandLink, and you should pass the deeplink query context as a request parameter, for example
    UrlToCallOtherApp?deepLinkId=123
    Then, in the deeplink target group, you should set the Enable DeepLinking expression to something like #{param.deepLinkId!=null} (or #{param.deepLinkId!='', if first one does not work}
    Steven Davelaar,
    JHeadstart Team.

  • Navigation Between multiple SWF files

    ok so I'm still working on this project and it got literally huge... at least huge enough to consume all of my 3 GB RAM memory and crash my Adobe Flash CS4. Anyway, I decided to put the site on several swf's but the problem is that I've never done that before so I have no idea how to navigate between them.
    Basically I have a main swf file, inside it there's an image (let's say its instance name is "projects_btn") that should take me to "Projects.swf", and I want to click on an "x" sign (its instance name is "xSign_btn") inside Projects.swf that would take me back to the main swf file "Bnaider2.swf".
    Any suggestions? thanks in advance...

    1. ok that link was very useful, thanks alot. project.swf is loading properly. But I donno what's going wrong, it just doesn't unload the project.swf when I click the xSign here's the code, maybe I've screwed something up:
    //On the main timeline of the project.swf file:
    xSign.addEventListener(MouseEvent.CLICK, xClickHandler);
    function xClickHandler(e:MouseEvent):void
         dispatchEvent(new Event("backHome"));
    // On the main time line of Bnaider.swf file:
    projectsImg2.addEventListener(MouseEvent.CLICK, onProjectsClick);
    function onProjectsClick(e:MouseEvent):void {
         var urlReq:URLRequest=new URLRequest("project.swf");
         var proLoader:Loader = new Loader();
         proLoader.load(urlReq);
         proLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loaderHandler);
         function loaderHandler(e:Event):void {
              addChild(proLoader);
         function loaderCompleteHandler(event:Event) {
              (event.currentTarget.content as MovieClip).addEventListener("backHome",xClickHandler);
         function xClickHandler(event:Event):void {
              proLoader.unload();
    2. the projects section of my site is divided into four swf's. First "project.swf" should load when I click on projectImg2 inside Bnaider.swf which is working fine so far (but doesn't unload once I click the xSign). Then I want "project2.swf" to load/run once I click on a button instantiated as "nextSwf" inside "project.swf". And on project2.swf as well, there's an xSign that once clicked  it should take me back to Bnaider.swf... and the same thing with the other two swf's. So... I donno, this is really getting too complicated for me, but if anyone could help I would really appreciate it cuz the whole project is due this Saturday and I've still got a few more things to work on as well... Thanks in advance...

  • Sharing library between multiple Computer accounts

    I have 2 users on my computer, with equal access. When I use the primary account, the iTunes functions normally. I placed the iTunes music library in the shared file.
    The other account cannot access the library without manually importing the songs, and this obviously is not updated when I buy/import new songs as the primary user.
    Any way to have the second user able to access the same library as the primary?
    Thanks in advance.
      Windows XP  

    (As long as we don't take the laptops on vacation and leave the external drive behind...)
    In those cases just copy the Domain.sites2 file to the laptop and run it from there while you're on the road. When you get home move it back to the external HD replacing the one there.
    Using it on the iDisk would be glacially slow.
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto (iPhoto.Library for iPhoto 5 and earlier) database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger or later), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 6 and 7 libraries and Tiger and Leopard. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.≤br>
    Note: There now an Automator backup application for iPhoto 5 that will work with Tiger or Leopard.

  • Using SharedObject between multiple apps

    Assuming I own and have access to two different apps' SharedObject variables ... is it possible to save settings from Game A and have it be remembered in Game B?
    Essentially, I'm just trying to bring settings from a "Lite" version of a game and if users choose to purchase and install the "Full" version, all of their settings from the "Lite" version will be remembered, saving them some hassle.
    Is this possible? Or is there a better way altogether that I just don't know about? Thanks!

    I think SharedObjects can only be seen by the app that created them. If you find otherwise, please let me know!
    I also wanted to share saved data from a lite game and a full game, but I think I would have had to use SQLite to achieve this.
    In the end I just set some of the early levels of the full version to be unlocked by default.

  • HT1203 hello, tried to follow the instructions for sharing music between multiple users on one computer however it does not seem to be working.

    hello, purchased a new iphone 5 and i now want to put all my music and picture from my 3gs onto it.  however its been several years since ive updated my 3gs and now itunes wont fint it when i try and conect it.

    Reset the iPhone & try again.
    Try a different cable.
    See Recover your iTunes library from your iPod or iOS device.
    tt2

  • Problem sharing media between multiple users on same Mac

    My wife and I have an eMac, running Mac OS 10.4.11, with iTunes 9.2.1(4).  We each have separate user accounts.  Previously, I had imported several albums into my iTunes library.  Now, my goal is to be able to share the albums that I had imported with my wife.  Simultaneously, our available hard drive capacity is getting limited, so I decided to put my iTunes media on an external fire wire drive by Iomega.  I followed article HT1449, transferring my media (and, not the other associated library files) and that part, at least, seems to be working fine.  The folder "iTunes media" is now located on a partition of the external drive.  As far as I can tell, both my wife and I have "read and write" permissions for this partition.  Ownership of the partition volume is "ignored".
    Now, as for setting up my wife's iTunes library and linking it up to the iTunes media folder on the external drive, I have followed HT1203 as a guide, changing the path of the media folder to the partition on the external drive.  But, it simply doesn't seem to have any effect.  There are no songs available within iTunes from her user account.
    I would appreciate any guidance on how to resolve this.  Thank you.

    AndyMcKay wrote:
    Chris, won't this copy the music contained in the external media folder, to the media folder under his wife's account?
    They are both using the same media folder so iTunes won't copy it anywhere.

  • "Sharing" Updates Between Multiple Macs?

    So I have three Macs in the house now, one iMac, and two Macbooks. So When there is a big update, I currently have to download the same update three times. Is there a way to download the package once on one computer and distribute it to the others across my LAN?

    Every update is eventually posted at http://www.apple.com/downloads/ Download them, install them manually after transferring them to the other machines.

  • Sharing Library with Multiple Users on  SAME COMPUTER

    My wife and I use Windows XP Pro. We imported all of our CDs to the iTunes on her user account. How do I access or import the library to the iTunes on my account? I want to avoid logging into her account to listen to the music.
    The help index has info on sharing music for multiple computers on a network but I didn't see an answer for sharing music between multiple user accounts in XP on one computer. PLEASE HELP!!!!

    Use tweakUI, google on it to get it and install it.
    More details are here or do a search discussions for "TweakUI" if you need more.
    http://discussions.apple.com/thread.jspa?messageID=1175181&#1175181

  • One ssid share between multiple companies

    Just curious, is it possible to create a single SSID and shared it between multiple dompanies?
    Any info, advice or documents would be greatly appreciated.

    Hello,
    May the link below help you out in solving your query:-
    http://www.wi-fiplanet.com/tutorials/article.php/2196451
    http://www.dummies.com/how-to/content/multiple-ssids-with-a-single-access-point-ap.html

Maybe you are looking for

  • Can I use a USB wireless adapter with my iMac G4 Flat Panel (it has no Airport card).

    I have just salvaged an iMac G4 15-inch Flat Panel from the skip and now have it running Mac OS X Tiger 10,4. It has a 700mhz cpu, 80Gb hard drive and 512mb of Ram. No airport card is fitted so I was wondering if a USB wireless adapter could be used

  • Prime Infrastructure 2.0 Device Configurations

    We use PI 2.0 physical appliance. Is it possible to save a shadow copy of the configs so that you get config in filesystem? We want to save the configs to an external server.  Actually we are using this feature in LMS. Regards

  • Audio Playback is terrible, what can I do? (WindowServer 99.8% CPU!)

    Hey all, I've got a strange problem. I can't do smooth playback on videos. When I say "smooth" I mean I can't get more than a second of playback. The video normally remains stable, but the audio is awful. Choppy, I can hear clicks and pops, sometimes

  • Multi language, how to approach this?

    Hi everyone, I have a website on which I want to offer multi language, but no idea what is the best way to do this. There 2 plans I have: 1: Of course all content (text) is in a database. If a user would want a different language, the user would clic

  • ITunes Folder Size and DVD Burn

    Not sure whether this is the right category. I'll put it in "iTunes", too. Got Sony DVDs. 4.7GB. When I click on the iTunes folder and "Get Info", it's shows 4.6GB in it. Try to drag and drop it in order to burn it onto a DVD for backup and get a mes