Flash objects in IE cache..!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ravenshield
    New Member
    • Sep 2007
    • 6

    Flash objects in IE cache..!

    Hi there all. (first of all, sorry about my bad english)

    I need some help over here. I'm developing an asp.net application that works as an administrator site for other application built in flash. The basic Idea is to generate xml dinamic so the flash movie can read its content any time is invoked..

    I was forced to implement a "preview" kind button that allows to see who the flash will be seen. So i've made an extra aspx page that contains the flash object.

    There comes the problem. The 1st time that u watch the preview its ok.. but seems like the object is stored on cache, so if u make any change in the content with asp, generate another xml, but the preview is still the same. So i have to go to my internet options, clear cache and then preiew so it works fine (I don want to do that)

    I've tryed everything.:

    meta tags: <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <META HTTP-EQUIV="Expires" CONTENT="-1">
    <meta HTTP-EQUIV="Cache-Control" content="no-cache" />

    Server side HTML Header edit:
    Response.Cache. SetCacheability (HttpCacheabili ty.NoCache);

    Flash code to avoid cache]:
    var dummyquery:Stri ng = (isLocalFile ? "" : ("?random=" + Math.random() + "&timestamp =" + (new Date()).getTime ()));
    mymc.loadMovie( "mymovie.swf"+d ummyquery);

    etc etc..

    All of them seems to work fine on Firefox.. but IE is the "!%%#.

    I dont know what else to do and i'm pretty frustrated now. So i'm asking for help.

    I appriciate every single answer that u gusy can give me.. thanks.!!!
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    Well you can try:
    Code:
    Response.Cache.SetNoStore();
    But the flash object is usually kept in a seperate cachin mechanism, so I dunno

    Comment

    • Ravenshield
      New Member
      • Sep 2007
      • 6

      #3
      Thank u very much men for a quick answer.!!

      yeah well.. i'd tried but seems not to work.. i dont know if im doing something wrong. this is the code of the "caller page". I got a gridview with all the pages that are loadable with flash, and the button "preview on it as a command:

      if (e.CommandName == "Preview")
      {
      // Generate Presentation's xml
      try
      {
      Presentacion presentacion = PresentacionDAO .get(IdPresenta cion, (String)Session["USER_ID"]);
      String nombre_presenta cion = presentacion.No mbre;
      Lamina[] laminas = LaminaDAO.GetAl lLaminas(IdPres entacion);
      Lamina lamina;
      int cantidad = laminas.Length;

      // Create the Index
      GeneradorConten ido.CrearIndice (cantidad, Server, nombre_presenta cion);


      for (int i = 0; i < laminas.Length; i++)
      {
      lamina = laminas[i];
      GeneradorConten ido.GuardarADis co(lamina.Conte nido, Server, i+1, nombre_presenta cion);
      }
      }
      catch (FormatExceptio n)
      {
      FormsAuthentica tion.RedirectTo LoginPage();
      }

      // and REdirect.!!!!

      // this random number was another patch for avoid cache.. didnt work also
      System.Random r = new Random();
      int rand = r.Next();

      foreach (DictionaryEntr y de in HttpContext.Cur rent.Cache)
      {
      String ess = de.Key.ToString ();

      }
      Response.Cache. SetNoStore();
      Response.Cache. SetCacheability (HttpCacheabili ty.NoCache);
      Response.Redire ct("Presentacio nes/" + p.Nombre + "/index.aspx?asd= " + rand);
      }



      it might be that im doing something very wrong.. but i dont think so because it works on Firefox very well...

      the other thing that i don't understand is the fact that the application is built under ASP.NET code.. witch seems to be native with Microsoft and his own explorer.. but it seems to avoid all the code...i mean.. wtfk?

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        The setnostore should be used alone and you'd want to remove the nocacheability line.

        The problem is that only stops the caching of the page, not of objects on it. You need the flash object itself to be marked as no cache.
        Which might be better directed over to the Flash/ActionScript section

        Comment

        • Ravenshield
          New Member
          • Sep 2007
          • 6

          #5
          ok.. ill try that.. ill head to AS people now...

          thanks for ur time..

          Comment

          • Ravenshield
            New Member
            • Sep 2007
            • 6

            #6
            I've FOUND A SOLUTION.. (just in case u want to know)

            the deal is to randomize the xml loaded everytime

            eg: xmlTodo.load("l aminas/"+numeroLamina+ ".xml?bola= " + Math.random());

            that way the flash is forced to look for the new version of the xml because there is no other called like that.!!

            (note: Seems like only works on web enviroment.. if u try to use this from flash compiler it will say something like "it cannot open whatever.xml?bo la=xxxxxx" because is not found..)

            Comment

            Working...