Cache buster button code question (CS4/AS2)???

I have a  button that loads guestbook.swf. As guestbook would be updated by me I would like the latest non cached version of guestbook.swf to load always.
This is the current working code on the button-
[QUOTE]on (release) {
//load Movie Behavior
if(this.L == Number(this.frame)){
loadMovieNum("guestbook.swf",this.frame);
} else {
this.frame.loadMovie("guestbook.swf");
//End Behavior
}[/QUOTE]
I would like to do what this guy suggested-
[QUOTE=lewi-p;2581359]Using a random variable will work but it's not exactly efficient. If you  generate a random number everytime someone requests your SWF, your  server will be sending a brand new version every single time...your  bandwidth could potentially go through the roof!
I would suggest using a date & time based cache buster string...so  adding "movingly.swf?cache=20101028" (todays date). So in this case  everyone will get the same file that day.
lewi-p[/QUOTE]
I added his code like this to the button-
[QUOTE]on (release) {
//load Movie Behavior
if(this.L == Number(this.frame)){
loadMovieNum("guestbook.swf?cache=20101028" (todays date)",this.frame);
} else {
this.frame.loadMovie("guestbook.swf?cache=20101028" (todays date)");
//End Behavior
}[/QUOTE]
Well the button stopped working when I added that. How should the code look for it to work? Thanks

EDIT- It seems to be working when viewed in a browser, I was testing it as a plain swf  before. Does that make any sense? Will test more and check on the server and report back
I tried you code and it won't load the guestbook.swf. In the Output window I get- Error opening URL.........guestbook.swf?cache=undefined'
I made a test file and the working button without time/date stamp has this code and it loads the guestbook.swf-
on (release) {
    //load Movie Behavior
    if(this.frame == Number(this.frame)){
        loadMovieNum("guestbook.swf",this.frame);
    } else {
        this.frame.loadMovie("guestbook.swf");
    //End Behavior
I have tried the following two versions of code with the time/date code and guestbook.swf does not load.
on (release) {
//load Movie Behavior
if(this.L == Number(this.frame)){
var d:Date=new Date();
loadMovieNum("guestbook.swf?cache="+d.getTime(),Number(this.frame));
} else {
this.frame.loadMovie("guestbook.swf?cache="+d.getTime());
//End Behavior
on (release) {
    //load Movie Behavior
    if(this.frame == Number(this.frame)){
        var d:Date=new Date();
        loadMovieNum("guestbook.swf?cache="+d.getTime(),Number(this.frame));
    } else {
        this.frame.loadMovie("guestbook.swf?cache="+d.getTime());
    //End Behavior

Similar Messages

  • Where is the "done" button in Flash CS4 when using Flash Builder 4's new flash component or container?

    The documentation for Flash Builder 4 beta says that after opening flash from flash builder, I should click a "done" button in flash and flash should close and what I created in flash should be included as a component or container in Flash Builder.  Using the Flash Builder 4 beta on Windows, when I click on the "create in flash" button on the properties panel for either the new flash component or container, Flash CS4 opens, I create something in Flash and no "done" button is present.  Nor is anything present in the menus resembling a "done" option.  Where is it?

    Hi Jeffrey:
    Still no done button.  Now under commands in Flash I can convert symbols to flex components and containers and these show up in the Flash library.
    Thanks:
    Jim
    Date: Wed, 30 Sep 2009 09:58:10 -0600
    From: [email protected]
    To: [email protected]
    Subject: Where is the "done" button in Flash CS4 when using Flash Builder 4's new flash component or container?
    Hi,
    You may need to install FlexComponentKit.mxp to your Flash CS4 beforehand.
    Jeffrey
    Date: Tue, 29 Sep 2009 17:04:36 -0600
    From: mailto:[email protected]
    To: mailto:[email protected]
    Subject: Flex Where is the "done" button in Flash CS4 when using Flash Builder 4's new flash component or container?
    I apparently didn't get one.  I've looked under various workspace configurations.  Another thing that seems odd is that when Flash opens I get the opening panel that allows me to select the type of file and version of AS I want to use.  I select new file with AS3.  Any ideas on why the "done" button wouldn't be present and if the opening panel is what I should expect on opening Flash after clicking the "create in Flash" button?
    >
    >

  • How to cach enter button pressing in java 2D API

    hi guys,
    how to cach enter button pressing in java 2D API
    thanks
    siva

    thats input handling -> Belongs to AWT.
    Tip-> register an KeyListener and search for KeyEvent.VK_ENTER
    lg Clemens

  • Empty query cache with ABAP code

    Hi Experts,
    Is there any way to empty the query cache using ABAP code?
    Thank you!
    Regards,
    Sam

    Sam,
    You can clear cache by using transaction RSRCACHE. Also, you can use a BDC ABAP program to do it.
    -Saket

  • SAPUI5 Bootstrap Script Query For Application Cache Buster

    Hi,
    I am trying to implement Application Cache Buster. I am following Fiori Wave2 application structure.
    As Demokit says "To activate the Application Cache Buster the configuration data-sap-ui-appCacheBuster="./" must be added to the bootstrap script of the application page"
    But I don't get where to add the said configuration. I have Component.js(extends ComponentBase), Configuration.js, Main.view.xml and Main.controller.js. I am using "fioriSandboxConfig.json" to run the application.
    Any idea where to add the AppCacheBuster configuration?
    Kind regards,
    Rauf

    I think you have to add it to your index.html:
    <script src="https://sapui5.hana.ondemand.com/sdk/resources/sap-ui-core.js"
      id="sap-ui-bootstrap"
      data-sap-ui-libs="sap.m"
      data-sap-ui-theme="sap_bluecrystal"
      data-sap-ui-appCacheBuster="./">
      </script>
    Kind regards,
    Wouter

  • How can we create such navigation buttons using Flash CS4?

    Hi,
    How can we create such navigation buttons using Flash CS4 is in the following website? Please help me with any such tutorial to make my custom navigation bar/buttons.
    http://city.reallusion.com/join.html
    Thanks.

    While the Note 4 is a reasonably large device it still falls into the phone layout bucket. We need this layout to function on very small screens some as low as 320 pixels high and 240 pixels wide. These sorts of devices don't have the space for a full toolbar.

  • Servlet - button redirecton question! pls help

    I have a servlet and i have this button code
    output.println("<INPUT type='submit' name='pVisits' value='Last Visits'>");I would like to know when i push that button how do i open another servlet to a new page. Another servlet contains code to display my data.
    Cheers

    Doesent any one know how to use buttons in servlets that lead you to another servlet ?? Or is it too late here and every one is asleep?

  • Image button on question slides

    Hello,
    Can anyone tell me the best way to add a custom image button to a question slide in Captivate 8.01. I need to provide a help section to users who are taking a quiz.
    Many thanks

    I think you need to read this:
    Buttons on Question/Score Slides in Captivate 6? - Captivate blog
    The only interactive object that can be used on question slides, with some restrictions as you'll see, are shape buttons. And to make a shape button from an image:
    Turn an Image into a Button - Captivate blog

  • Dreamweaver CS3- Add this button code help

    Hi, I have a problem in Dreamweaver CS3. The problem is that when I insert my add this button code, in to the codeing area, it does not work.
    When I open my page in chrome, it simply says 'more shraeing services'. I will copy the code, in to this discussion. I would be greaftful if someone
    can help me resolve this problem, so I can get the add this button to work on my site. The final bits of code are as follows-
    <!-- AddThis Button BEGIN -->
    <div class="addthis_toolbox addthis_default_style addthis_32x32_style">
    <a class="addthis_button_preferred_1"></a>
    <a class="addthis_button_preferred_2"></a>
    <a class="addthis_button_preferred_3"></a>
    <a class="addthis_button_preferred_4"></a>
    <a class="addthis_button_compact"></a>
    <a class="addthis_counter addthis_bubble_style"></a>
    </div>
    <script type="text/javascript">var addthis_config = {"data_track_addressbar":true};</script>
    <script type="text/javascript" src="http://s7.addthis.com/js/300/addthis_widget.js#pubid=ra-4dd57258352fac8e"></script>
    <!-- AddThis Button END -->
    <!-- Place this tag where you want the +1 button to render -->
    <g:plusone></g:plusone>
        </div>
       </form>
    <script type="text/javascript" src="http://www.google.com/jsapi"></script>
    <script type="text/javascript">google.load("elements", "1", {packages: "transliteration"});</script>
    <script type="text/javascript" src="http://www.google.com/cse/t13n?form=cse-search-box&t13n_langs=am%2Cel%2Cml%2Cpa%2Cta%2Car% 2Cgu%2Cmr%2Cru%2Cte%2Cti%2Csa%2Cne%2Chi%2Cbn%2Cen%2Ckn%2Cfa%2Csr%2Cur"></script>
    <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script>
    <script type="text/javascript" src="http://www.google.com/cse/query_renderer.js"></script>
    <div id="queries"></div>
    <script src="http://www.google.com/cse/api/partner-pub-5783950232732081/cse/4522012035/queries/js?oe=UT F-8&callback=(new+PopularQueryRenderer(document.getElementById(%22queries%22))).render"></script>
      </div>
      <div align="center"></div>
    </div>
    <script type="text/javascript">var addthis_config = {"data_track_clickback":true};</script>
    <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4dd57258352fac8e"></script>
    <!-- AddThis Button END -->
    </div>
    <script type="text/javascript">
    <!--
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    //-->
    </script>
    </body>
    </html>
    Is there anything in this piece of code I should edit in order to make the add this button work? Many thanks

    A link to your page would be the best possible way to get help with this. 
    Code fragments don't tell the whole story.
    Nancy O.

  • Paypal button code

    Hello,
    I have Paypal code that allows me to sell 3 books, listed on one menu, all for the s.ame price, $17
    I need to add another book that costs $22.
    Please, can someone help me with the code?
    Thanks
    Alida

    If the block of code for the paypal button is basicly unreadable, then it is encrypted and you need create the button in the PayPal account. If you go to the account, you will see that it's all pretty intuitive. Then copy/paste the code PayPal generates into your web page in code view.
    If the button code is readable, then you can create a new button just by changing the obvious values, such as
    <input type="hidden" name="amount" value="22.00"/> for the amount.
    . . . or, you can also create a non-encrypted button in PayPal, just like an encrypted button, and paste the code into your page (in code view of course).

  • CS4/AS2.0 Newbie Question.. help please?

    Hey all, I'm a newbie on the forum and in Flash.
    I've used it before, made my pages into scenes, and
    everything worked fine. Apparently, this doesn't work anymore (I
    used an earlier version of Flash) in CS4, and everyone is
    recommending to use frame labels. This doesn't work either.
    This is a screenshot of my site right now.
    The ActionScript is the exact same in all three frames on the
    actions layer you see in the screenie.
    All I want is when clicking on the AboutUs button and
    WhatIsHypnosis button, that they go to the specified frame labels.
    The only one that works is the AboutUs button. I can click on
    it and it loads the content that its supposed to,but the home (the
    logo) and the second button do not work. They are clickable, just
    nothing happens.
    I've tried everything I can think of and that I have been
    able to find.
    Changing the type of frame label has no effect.
    Help please? I've been trying to fix this for a good 6-7
    hours.
    Screenshot:
    http://img407.imageshack.us/img407/2372/picture8sq4.png
    Thank you!

    Fixed. :)
    I have no clue what it was..
    I changed some frame labels around, renamed a few buttons,
    renamed some instances, and it magically worked. :)

  • Can't gotoAndStop ...what's wrong with this button code?

    Hi,
    I'm totally stumped as to why I can't navigate to another frame.
    I have put 2 days into this simple problem now and I'm ready to give up and go back to AS2.
    Please help!
    I'm using CS4; publish settings AS3, 10.0
    I have a button on frame 2 that should take me to frame 3 when clicked.
    (So far I've tried a hundred different ways but I don't get to frame 3...)
    Different things I tried...
    > Creating the button dynamically from the library...
    > Inserting it statically from the library on frame 2...
    > referencing the mainTimeline through a variable...
    > wrapping the gotoAndStop action in another function...(if placed directly on the timeLine the movie correctly goes straight to frame 3)
    > naming frame 3...
    > using 'nextFrame' instead of 'gotoAndStop'...
    etc..
    In most cases I don't get an error in the output panel and no compiler error either; it just doesn't work!!!
    (Just stays on the same frame after I click the button)
    Here's the code I think should work; but doesn't:
    function moveTo3 (event:MouseEvent):void {
        trace("button_clicked"); // always traces correctly; but movie does not go to frame 3 !!!
        gotoAndStop(3);
    f_btn.addEventListener(MouseEvent.CLICK, moveTo3);
    WHAT AM I MISSING HERE?
    Thanks in advance ...

    Hi Ned,
    I have to run out and don't have the time to deal with it right now but you're RIGHT.
    I do have an 'onEnterFrame' listener on frame 1 !
    It's doing some animation with a symbol and I don't think I removed the listener itself.
    I just set the object to null when it reached [alpha:0].
    THANKS!
    I'll check it out as soon as I can but I really think you got me looking in the right direction now.
    Thanks again,
    Connor
    (I'll post an update when I get back to it)

  • Session state and browser cache - Back button problem

    Hi all,
    I have a problem (and unless I'm missing something I think we all do) with session state and use of the browser's Back button. I really hope I'm just being dumb...
    Background scenario:
    Page P has a sidebar list allowing the user to select what content is displayed (e.g. 'stuff relating to X, Y or Z' where X, Y and Z are rows in, say, a table of projects). When a list entry is clicked, we branch to page P with the value of the list item placed in an application-level item (call it G_PROJECT). Reports on page P use G_PROJECT in their WHERE clauses.
    So, click list entry X and G_PROJECT is set to X and page P shows reports for project X.
    Page P also has a set of buttons which branch to various edit pages which allow attributes of page P's current project to be updated. These pages similarly use G_PROJECT in their WHERE clauses.
    Problem scenario:
    1. The user goes to page P and picks project X off the list. Project X's stuff is displayed (G_PROJECT = X).
    2. The user then picks project Y off the list. Project Y's stuff is displayed (G_PROJECT = Y).
    3. The user then clicks the browser's Back button. The page is served from browser cache, so project X's stuff is displayed, but G_PROJECT still = Y.
    4. The user clicks an 'Edit' button; we submit, and branch to an edit page which displays (and will edit) data for project Y because G_PROJECT still = Y.
    This is SERIOUSLY BAD NEWS - apart from being confusing, the user's edit permissions on projects X and Y may differ, and so the user may be able to perform 'illegal' updates.
    I've read what I can on this forum and the rest of the web looking for ways to a) inhibit browsers' 'Back' functions and/or b) prevent pages being cached by the browser, but none of them have worked for me.
    Short of waiting for browser manufacturers to recognise that the web is now full of applications as well as static pages, and enable robust programmatic control of cache behaviour, does anybody know how the problem can be avoided - or at least detected?
    Thanks,
    jd
    Failed attempts to date:
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="cache-control" content="no-store">
    <meta http-equiv="cache-control" content="private">
    <meta http-equiv="cache-control" content="max-age=0, must-revalidate">
    <meta http-equiv="expires" content="Wed, 09 Aug 2000 01:01:01 GMT">
    <meta http-equiv="pragma" content="no-cache">
    Disallowing duplicate submission (page attribute).
    window.history.go(1);

    Thanks Scott,
    I may be being dumb here but I don't see how that would help...
    P250_PROJECT and G_PROJECT are currently kept in sync by app logic. Whichever is used to drive, if the page is rendered from cache then the app logic is not executed, so the rendered page contents are not those keyed by P250_PROJECT, as illustrated in steps 1-4 of the problem above.
    The user sees X, the session items say Y. The engine doesn't know what the user is seeing.
    when page P is POSTed, its hidden item P250_PROJECT should always be used to derive the application item G_PROJECT. Then whether the page was pulled from cache or rendered anew via a click from the sidebar link, the project ID is determined by the contents of that page.
    As I said above I tried this, with the 'Edit' branch set to:
    Set these items: G_PROJECT
    With these values: &P250_PROJECT.
    but it makes no difference. The project ID is not determined by the rendered page contents - the engine gets the value of P250_PROJECT from session state.
    I can code the 'Edit' pages such that they check permissions and if necessary redirect back to p250 (conditional before-header branch), but that's a clunky cure rather than the prevention I was hoping for.
    Please tell me if my understanding is incorrect.
    jd

  • Do you want to save changes button code

    Hi guys,
    Quick question which I was wondering if anyone could help me out. When a form has changed and you press the x button you get the message do you want to save changes? with a yes or no option. Is it possible to put code in to trigger of these yes/no buttons when clicked and if so how would I go about doing this?
    Thanks.

    hello
    if i got your need so you will need to create alert
    then start coding
    examlpe
    1- create alert called save_record
    2- in key exit trigger write this code
    DECLARE
    al_id Alert;
    al_button NUMBER;
    BEGIN
    al_id := Find_Alert('save1');
    IF Id_Null(al_id) THEN
    Message('User_Warning alert does not exist');
    RAISE Form_Trigger_Failure;
    ELSE
    /* ** Show the warning alert */
    al_button := Show_Alert(al_id);
    ** If user pressed OK (button 1) then bring up another
    ** alert to confirm -- button mappings are specified
    ** in the alert design */
    IF al_button = ALERT_BUTTON1 THEN
    al_id := Find_Alert('Are_You_Sure');
    IF Id_Null(al_id) THEN
    Message('The alert named: Are you sure? does not exist'); Message('The alert named: Are you sure? does not exist');
    commit;
    exit form;
    RAISE Form_Trigger_Failure;
    ELSE
    al_button := Show_Alert(al_id);
    IF al_button = ALERT_BUTTON2 THEN
    null;
    END IF;
    END IF;
    END IF;
    END IF;
    END;
    Edited by: Khaled Farouk on 27-May-2013 07:09

  • Website cache and update related questions

    Please could someone help me with my questions? I have been searching and I hear so many views that I don't know what to think. The image has the question text in it.

    adninjastrator and kglad thanks for the help but I am still not getting anywhere  :-( Please stay with me. I tried the "blarg="+new Date().getTime());" method but it did not work for me. Maybe I did somethign wrong or I am just plain thick.
    I am posting a simple TEST.zip folder to mimic my questions. Everything is linked properly so could someone PLEASE PLEASE add the code to it so I can see what I am doing wrong?
    You can download the TEST.zip folder (73KB) here- http://www.mediafire.com/?e0gegmdvh4xzcvg
    It's completely safe to download and please ignore the annoying  pop up ads. I signed up for free service hence the ads. 
    So in the TEST.zip folder start with index.html. 
    1- There you will see >Enter Button< and >portfolio.pdf< button. Nothing will change on  index.html page but the portfolio pdf will be regularly updated. So I want the >portfolio.pdf< to fetch the latest pdf always. I assume the code will go on the >portfolir.pdf< button?
    2- >Enter Button< will take us to master.html page which contains master.swf.  Master.html is only a container but master.swf will be regularly updated and needs to always load the latest master.swf version.
    3- Load image.swf button will load image.swf. I want the button to load the latest image.swf file always.
    So if someone could take couple of minutes and add the code the correct way to achieve the 3 things I am trying to do then I would be ETERNALLY grateful!
    If you don't have an upload method to pass me the edited files then feel free to mail them to-
    [email protected]
    I hope someone replies. Thanks for helping me with your valuable time!

Maybe you are looking for

  • Acrobat 8 standard installation program rejects my serial number, says it's "invalid"

    I have a genuine product of Acrobat 8 Standard, and when I put the serial number in the installation program, I get rejected. The program says my s.n. is invalid. How do I solve this?

  • How do I check an iphone for a virus?

    I upgraded my husbands iphone to iOS5 software.  The iphone backup file that was saved to his PC had a Trojan Horse virus.  He lost everything on his phone because the iphone blocked restoring the phone and identifed the Trojan Horse virus.  His phon

  • Remove blank page from document in Pages

    HI there I have created a document only require 1 page however it has created 2 pages. The second page is blank and I wish to delete it. Thanks

  • How to display some components conditional!

    Hi All: Now in one of my page have two buttons, one cancel button and one confirm button,also hava some components, one of the components is af:panelForm which contains some inputTexts.The af:panelForm is displayed only when the sessionScope value 'd

  • Where is the simple 'fill' button on the new Numbers?

    Just upgraded to Yosemite and the new Numbers. In the old Numbers version I used, there was a button on the toolbar for 'fill' which I could use to change the background color of a line or a single cell. Now it seems I have to go to 'format' and then