Embedding SWF causes it to be downloaded multiple times

I'm trying to add a loading spinner to my application. I'm using a Flash SWF to accomplish this. The issue I'm having is it looks like if I use the component which contains the spinner in multiple places each one downloads a copy of the SWF.
I've created a static Assets class as follows: (I've attached the spinner.swf file to this post)
package
    [Bindable]
    public class Assets
        [Embed("spinner.swf")]
        public static var spinner:Class;
Here's an example where I use this class:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
    xmlns:mx="http://www.adobe.com/2006/mxml"
    verticalAlign="middle" horizontalAlign="center">
    <mx:Image source="{ Assets.spinner }"/>
    <mx:Image source="{ Assets.spinner }"/>
</mx:Application>
The output in the console is:
[SWF] Users:hillel:Code:Test.swf - 676,864 bytes after decompression
warning: unable to bind to property 'spinner' on class 'Assets' (class is not an IEventDispatcher)
[SWF] Users:hillel:Code:Test.swf - 4,517 bytes after decompression
[SWF] Users:hillel:Code:Test.swf - 4,517 bytes after decompression
As a side question, how do I clear up the warning. The Assets class is marked as Bindable which I believe should make it an IEventDispatcher.
Thanks for your help,
Hillel

The SWF is not downloaded twice.  It is embedded as a byte array into your SWF and the byteArray is loaded from memory twice (once per instance).
Alex Harui
Flex SDK Developer
Adobe Systems Inc.
Blog: http://blogs.adobe.com/aharui

Similar Messages

  • I've downloaded OS X Mountain Lion from the App store , it still shows download on purchases . I've downloaded multiple time and still shows download.

    I've downloaded OS X Mountain Lion from the App store , it still shows download on purchases . I've downloaded multiple times and still shows download in App store purchasesSoftware is showing OS X 10.8.3 .

    Is this what you see?
    That Download button is telling you it is available for downloading. Since you have paid for it and you are entitled to multiple downloads, that button is correct.

  • [svn:osmf:] 13557: Fixing problem where a lingering TraitAggregationHelper causes elements to be added multiple times on ParallelDisplayObjectTrait .

    Revision: 13557
    Revision: 13557
    Author:   [email protected]
    Date:     2010-01-17 10:05:12 -0800 (Sun, 17 Jan 2010)
    Log Message:
    Fixing problem where a lingering TraitAggregationHelper causes elements to be added multiple times on ParallelDisplayObjectTrait.
    Modified Paths:
        osmf/trunk/framework/MediaFramework/org/osmf/composition/ParallelDisplayObjectTrait.as

    Revision: 13557
    Revision: 13557
    Author:   [email protected]
    Date:     2010-01-17 10:05:12 -0800 (Sun, 17 Jan 2010)
    Log Message:
    Fixing problem where a lingering TraitAggregationHelper causes elements to be added multiple times on ParallelDisplayObjectTrait.
    Modified Paths:
        osmf/trunk/framework/MediaFramework/org/osmf/composition/ParallelDisplayObjectTrait.as

  • CSS downloaded multiple times

    Hey there,
    I've got an issue with Firefox 30 since a few days.
    On many websites I've checked, it actually downloads CSS stylesheets multiple time, even when it gets a 304 the first time. I really don't understand what's going on.
    Example on Mozilla's website (from console) :
    GET https://www.mozilla.org/fr/firefox/new/ [HTTP/1.1 200 OK 997ms]
    GET https://mozorg.cdn.mozilla.net/media/css/tabzilla-min.css [HTTP/1.1 304 Not Modified 43ms]
    GET https://mozorg.cdn.mozilla.net/media/css/firefox-resp-min.css [HTTP/1.1 304 Not Modified 48ms]
    GET https://mozorg.cdn.mozilla.net/media/css/firefox_new-min.css [HTTP/1.1 304 Not Modified 54ms]
    GET https://mozorg.cdn.mozilla.net/media/img/firefox/new/header-firefox.png [HTTP/1.1 304 Not Modified 59ms]
    GET https://mozorg.cdn.mozilla.net/media/img/firefox/new/firefox-logo.png [HTTP/1.1 304 Not Modified 63ms]
    GET https://mozorg.cdn.mozilla.net/media/img/firefox/new/browser.png [HTTP/1.1 304 Not Modified 359ms]
    GET https://mozorg.cdn.mozilla.net/media/img/tabzilla/tab.png [HTTP/1.1 304 Not Modified 43ms]
    GET https://mozorg.cdn.mozilla.net/media/img/firefox/new/bg-noise.png [HTTP/1.1 304 Not Modified 49ms]
    GET https://mozorg.cdn.mozilla.net/media/css/firefox_new-min.css [HTTP/1.1 200 OK 159ms]
    GET https://mozorg.cdn.mozilla.net/media/css/firefox_new-min.css [HTTP/1.1 200 OK 99ms]
    GET https://mozorg.cdn.mozilla.net/media/css/firefox_new-min.css [HTTP/1.1 200 OK 77ms]
    GET https://mozorg.cdn.mozilla.net/media/css/firefox-resp-min.css [HTTP/1.1 200 OK 87ms]
    GET https://mozorg.cdn.mozilla.net/media/css/firefox_new-min.css [HTTP/1.1 200 OK 192ms]
    GET https://mozorg.cdn.mozilla.net/media/css/firefox-resp-min.css [HTTP/1.1 200 OK 196ms]
    GET https://mozorg.cdn.mozilla.net/media/css/firefox_new-min.css [HTTP/1.1 200 OK 132ms]
    GET https://mozorg.cdn.mozilla.net/media/css/firefox-resp-min.css [HTTP/1.1 200 OK 234ms]
    GET https://mozorg.cdn.mozilla.net/media/css/firefox_new-min.css [HTTP/1.1 200 OK 195ms]
    GET https://mozorg.cdn.mozilla.net/media/css/firefox-resp-min.css [HTTP/1.1 200 OK 185ms]
    Tried at a friend's house, same result.
    Anyone else having this issue ? Has it already been reported ? Could it be just us ? :/
    Kind regards,
    Lyn.

    Is the cache enabled and working?
    You can check that on the about:cache page via the location/address bar.
    In case you are using "Clear history when Firefox closes":
    *do not clear the Cache (Firefox will disable the disk cache in this case, see about:cache)
    *Tools > Options > Privacy > Firefox will: "Use custom settings for history": [X] "Clear history when Firefox closes" > Settings
    *https://support.mozilla.org/kb/remove-browsing-search-and-download-history
    Note that clearing "Site Preferences" clears all exceptions for cookies, images, pop-up windows, software installation, passwords, and other website specific data.

  • Ipod touch wont show up in itunes after trying to download multiple times

    Downloaded itunes today and tried to connect my ipod touch, itunes then told me i needed the latest version(10.6) so i go back and download again and it says the same thing muliple times! (yes i restarted the computer and everything) so frustrated i dont know what im doing wrong

    Have you tried here:
    iOS: Device not recognized in iTunes for Windows
    including:
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP
    or
    Removing and reinstalling iTunes, QuickTime, and other software components for Windows Vista or Windows 7
    What version of iTunes do yu have? You do have at least XP with SP3?

  • Few deliveries not combining causing walk the pick line multiple times

    Hi All,
    There are several deliveries that are not combining causing the pickers to have to walk the pick line 2 and 3 times for each group.
    Example:
    Delivery D1 has two orders O1 and O2and Delivery D2 has shelf orders O3 and O4. According to the client, the first two orders O1 and O2 should have combined with the later two orders O3 and O4. They all belong to the same delivery group 6735950 and the same customer .
    Could you please enlighten the reason behind these deliveries not combing together...
    Thanks in advance.
    Regards,
    Sanjeet

    Suman,
    Before raising any sales transaction we will customise item categories according to our scenarios. I am mentioning only to that item category. In case you cannot find it, raise a sales order when you enter your sold to party , material, qty, po number and press enter you will find a column "Itca" next to customer material num column. Make a note of it.
    Then enter vov7 tcode get authorization, else check in the Development/Quality server where you will be given display/change option. choose the item category and click details button. On entering this details screen , scroll down wherein you will be seeing "Bill of material/Configuratio" header within this you can see the field " Create delivery Group". Click Inside the box and press F4 or click the drop down box. There you will be seeing these two options
    X Form delivery group with one delivery date OR
    A -Delivery group with correlated schedule lines under Bill Of Material / Configuration tab". Choose the releavant option. and click save.
    After Completing this, raise the sales order and click "Shipping" (it is in the overview screen not in the Header details or item details) tab then you will see column.
    Else It means that you have not done the configuration
    Proceed as follows.
    Check IMG --> Logistics Execution  --> Shipping --> Grouped deliveries --> Define group of Deliveries & Define other group of deliveries
    Note : Check the No. ranges assignment within this groups.
    Regards
    Sathya

  • Updates for Apps need to be downloaded multiple times to work

    I have iTunes 10.5.3 and when I download an update to an app, iTunes continues to show an update to that app as available.
    The download progresses normally and is shown as done when complete. However, the app is still shown in iTunes as having an update available.
    Usually if I re-download the update the app is updated and shown as done and will be synced OK, but sometimes I need to re-download the app 3 or 4 times to update.
    I have only started experiencing this issue since updating to iTunes 10.5.3 and OSX 10.7.3. I have performed all the usual housekeeping routines such as reinstalling iTunes, repairing disk permissions, clearing caches etc.
    Regards
    Mitch

    I was just about to post on the same subject.  I have the exact same thing happening in the last week.
    Don't think it has anything to do with 10.7.3 as I've been on that for some time ( as a registered dev).
    One of the annoying things for me was that one of the 'updates' was over 1Gb, asnd redownloading was a pain. 
    In some cases, If I delete the app, then re-download, the update notification goes away, but today with iGIZMO magazine that is not working.

  • Downloading stalls and have to restart multiple times. plenty of mem. left

    I am having trouble downloading without restarting the download multiple times. My computer is up to date and I have plenty of memory.

    Large files? Small files? Various web sites?
    Which browser?
    Same thing happens with different browsers?

  • TS1474 iTunes movies have to be downloaded from the cloud multiple times.

    Since upgrading to iOS 7, movies and tv shows I download onto my iPad and computer keep disappearing into the cloud. I then have to download multiple times. I only use my iPad with wifi so it's really annoying. Not sure if I have the setup wrong.

    Hi,
    Your main computer will have your original tracks. All your synced devices will have the matched/uploaded versions.
    To get the benefit of the upgraded tracks on your main library, you need to delete the original and then download the matched version. You don't need to do anything with uploaded songs.
    Ps make sure you have a backup of your original songs.
    Jim

  • Have restarted my computer multiple times, because of ios5 and it is still freezing at the same loading spot each time of the download. this is my 10th time attempting at updating the software

    i have plugged in my phone attempting at the new ios5 download multiple times and to begin with it claims to me that it cannot restore my ipod but gives no reason. but i continues with the download, and now i have a blank iphone with no data on it at all, says to plug it into itunes, so i do and it freezes in the same spot about a tenth of the way full of the bar below the apple logo.

        roadpup27, having multiple replacement devices is no fun! I'm sorry you have to endure this experience with your phone. I would like to help with your issue and ensure you that we do not anticipate our certified like new phones having issues. They go through a 100-point check and in most cases work just as well or better than a new phone because they have updated software. I hope your replacement phone works for you so that you do not miss any events or be delayed. Although we can not compensate you for your phone issues, we will continue to replace your phone until you have a working device if the phone is under warranty. Please keep us posted.
    KinquanaH_VZW

  • Download multiple flv or swf at a time

    does anyone knows how to download multiple flv & swf?
    currently im using SWF & FLV Player which only allows single download at a time...

    If you use Firefox you could download .fla videos with a plugin named DownloadHelper. I don't know if it works for swf.

  • Embedded swfs max number

    Is there a maximum number of swf assets I can embed in an fla using this syntax:
    [Embed(source ="../swfs/swf1.swf", symbol = "symb" )]
    var SWF1:Class;
    var swf1:MovieClip = new SWF1();
    swf1.gotoAndStop(1);
    [Embed(source ="../swfs/swf2.swf", symbol = "symb" )]
    var SWF2:Class;
    var swf2:MovieClip = new SWF2();
    swf2.gotoAndStop(1);
    [Embed(source ="../swfs/swf3.swf", symbol = "symb" )]
    var SWF3:Class;
    var swf3:MovieClip = new SWF3();
    swf3.gotoAndStop(1);
    I'm doing this in flash cs5 with a bout 20 or 30 swf files and at one point it compiles but some or all movieclips are shrunk down to one blank frame.
    I check using this:
    var allPages:Array = [swf1,swf2,swf3...];
    var t:int = 0;
    for each(var clip:MovieClip in allPages) {
        var f:int = clip.totalFrames;
        t+=f;
        trace(f);
    trace(t);
    trace(this.totalFrames);
    Sometimes this code above does not even get executed and the compiled swf does not respond at all.
    Each swf contains anywhere between 500 and 3500 frames. Sometimes I embed the same swf multiple times to grab different symbols in it.I have had no luck determining the root of the cause:
    -number of embedded swfs?
    -size of the embedded swfs?
    -number fo frames in an embedded swf?
    -total number of frames in the main swf?
    Can anyone help?

    I don't think Apple has ever published the limit of Public (WAN-side) IP addresses that can be handled by its AirPorts or Time Capsules.
    ... and yes, they can "point" to different devices on the LAN. To allow for the distribution of these Public IP addresses, the Connection Sharing option should be set for: Distribute a range of IP addresses, from within the AirPort Utility.
    ref: AirPort Utility > Select the base station > Manual Setup > Internet > Internet Connection > Connection Sharing = Distribute a range of IP addresses

  • WAD: Problems when exporting to PDF with embedded .swf

    I'm using Web Application Designer (WAD) 7 and have created a template with an "Export to PDF" button and an embedded .swf flash file which is an Xcelsius dashboard.
    What i'm trying to do is show the information I want on my dashboard and then export that to a PDF to email out to multiple users who would be interested in the data each month.  If exporting to PDF isn't the best route to get a snapshot of this dashboard out to other users and there's an easier way please let me know, but here are the issues i'm having:
    1) When I have the dashboard showing the information I want and click the "Export to PDF" button, the dashboard reloads as the PDF settings window pops up and gets reset back to it's initial state.
    2)  If I ignore problem #1 and click on 'OK' in the Export dialog anyway after selecting PDF settings, my Adobe Reader pops up but then shows a message saying "The file cannot be opened because it has no pages".  Basically it doesn't see the .swf as being a component to take a snapshot of and print on a PDF. I did try adding a text component just so there was something on the template and I then get a PDF with that text component showing and no .swf snapshot.
    Has anyone come up with a workaround for this?  I've tried using the BEx Broadcaster with the 'Send' option but get the same results in regards to the blank page.
    Thanks as always for the help!

    Thanks for the reply.
    The dashboard is connected to a query in NetWeaver BI to get its data.  So the request of the user is to be able to adjust the dashboard to show the information they need (well say of a certain region) and then take a snapshot of that and email it out to co-workers in Group A.  Then the user will adjust the dashboard to show other data (for a different region we'll say) and take a snapshot to email out to co-workers in Group B. etc and etc.
    I have looked into installing a PDFCreator print driver but that wouldn't be feasible to get it on all machines in the business.  I've also looked into getting it as a .jpeg which would suffice, but am unsure if there is a way to do it with script and connect that to the dashboard when a button is pushed (will look into this).  This seems like a topic for over in the Xcelsius forum now.
    I used the following code within the <body></body> tags of the WAD's xhtml to embed the .swf:
    <object id="dashboard" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" height="600" width="800" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" >
    <param name="Movie" value="bwmimerep:///sap/bw/mime/Customer/JavaScript/dashboard.swf" />
    <embed src="bwmimerep:///sap/bw/mime/Customer/JavaScript/dashboard.swf" name="dashboard" type="application/x-shockwave-flash" />
    </object>

  • Firefox doesn't play embedded swf

    I've looked on many forums, including Firefox, with no real answer. Running Firefox 4. It just doesn't play embedded SWF. My Adobe Flashplayer is up to date, so is the plugin. The page displays properly. But the area that should be displaying a movie is just represented by a tiny square. No error message appears. The same page doesn't show the movie in IE9 either.
    Now from looking at the page information, it just requires Flashplayer 6 and above for the SWF area. I do have Flashplayer 10. The plugin says Shockwave Flash player 10 is up to date. Many other pages with different types of embedded movies play properly.

    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    Also check that you aren't blocking cookies.
    *https://support.mozilla.org/kb/Cookies
    *http://kb.mozillazine.org/Cookies
    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    *Tools > Options > Advanced > Network > Cached Web Content: "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Tools > Options > Privacy > Cookies: "Show Cookies"
    Note that a reset imports cookies, so isn't really suited if cookie issues are a possible cause, unless you clear the cookies.

  • My iPhone 3GS 16gb, is stuck in restore mode, downloaded and tried to do a restore multiple times. Keep getting an error The iPhone "iPhone" could not be restored. Unknown error occured (-1). Cannot get it out of restore mode, keeps rebooting!

    My iPhone 3GS 16gb, is stuck in restore mode, downloaded and tried to do a restore multiple times. Keep getting an error The iPhone "iPhone" could not be restored. Unknown error occured (-1). Cannot get it out of restore mode, keeps rebooting!
    I have tried to hold the "home" and "power" button to reboot
    I have tried powering it off
    I have tried, to unplug the cable, hold the "home" button and then plug it in.
    Can't check the SN or warranty, cause it is stuck in restore mode.
    Is the hard drive gone? Should there be something replaced.

    http://support.apple.com/kb/TS3694#error1
    Error 1 or -1
    This may indicate a hardware issue with your device. Follow Troubleshooting security software issues, and restore your device on a different known-good computer. If the errors persist on another computer, the device may need service.
    Usually this is caused by your antivirus or firewall blocking iTunes access to the Internet. It can also occur if the phone is jailbroken or if the computer you are using was ever used to jailbreak an iDevice.

Maybe you are looking for

  • Bluetooth drivers for printers

    hello I have just got a bluetooth usb for my canon mp600, the problem is though that the disc supplied is the mini sized version which I am told not to insert into my mac mini. So the adding new device keeps failing and needs these drivers....ANY IDE

  • Read numbers from a .txt file and display them in a graph

    How can I get Labview 7 to read from a txt. file containing a lot of coloumns with different datas? There`s only two of the coloumns that are interesting to me, the first, that contains the time of the measuring, and one in the middle, that contains

  • Irritating "Open with" issue in the context menu

    Hi all, When I click on a file and then choose "Open with" in the context menu, I get multiple instances of the same program instead of just one instance. For example, if I click on a document, the context menu may have 4 instances of Preview and 3 i

  • WLC 5508 - Ignoring Primary discovery request received on non-management interface (2) from AP

    Hello, Im receving this error on my syslog server: capwap_ac_sm.c:1443 Ignoring Primary discovery request received on non-management interface (2) from AP already checked the configuration and everything seems ok. They are registered and with clients

  • Unable to start up Personal Web Sharing (OS X 10.3.9)

    I have been trying to start up Personal Web Sharing since yesterday. It keeps saying "Web Sharing starting up...", but nothing ever happens. Actually, what I want to do is to set up a test server environment (not a real server for everyone on the web