I am rather new to Flash and I am having what I consider to be a strange result which I do not know how to address.

I am building an HTML site using CSS. Last week I embedded a SWF which scrolls a simple movie over the banner\ header. This worked and works fine except for this; Today, I attempted to switch the banner image (JPEG) with another-- same file format (JPEG), same dimensions as the original header image. I edited the CSS to reflect the new header image name. I saved the CSS and switched to my index.html file to view the change and what I see is the previous header image still present with the Flash running over it. Wrong image. :sad: I tried a few things such as moving the old header image out of the image folder so it could not be accessed-- the old, moved image was still there on the HTML index preview :eek:. How could this possibly be?

Weird. It seems as if the Flash was somehow grabbing and holding the first image and always running this old image. As far as I can tell, it is not directly referenced in the embed code at all.

When I remove the entire Flash embed code the new header appears-- great:), but I want the Flash with it. :confused:

I closed the HTML editor and re-opened the index.html file (thinking it could be a memory error on my machine or something, not the code). This did nothing. The old banner\ header STILL.

I've run out of things to try.

Any help would be greatly appreciated.

Regards,
MattyD.

Dani AI

Generated

For — the key clue is that removing the SWF makes the new JPEG appear. That means the visible old banner is coming from the Flash layer (either compiled into the SWF or loaded by it) or the SWF itself is being served from a cached copy. was on the right track; asked for code — below are focused tests and fixes that pinpoint which of those is happening and resolve it.

Quick checks (to identify the source)

  • Open the browser DevTools → Network and reload with caching disabled (DevTools open usually disables cache). Look for requests for the banner filename and for the SWF; this shows whether the SWF is requesting the old image or whether the old SWF is being re-used.
  • Inspect the embed/object tag for any FlashVars or parameters that pass an image filename.
  • If the SWF was produced locally, open the FLA Library to see whether the image is embedded; if the FLA is unavailable, use a SWF inspector/decompiler to view embedded assets.

Simple fixes/examples

  • Force fresh fetches by versioning the resources:
#header { background: url("banner.jpg?v=2") no-repeat; }

<object data="banner.swf?ver=2" width="..."></object>
  • If the image is embedded in the SWF, update the FLA (replace the asset in the Library) and re-publish the SWF. If the SWF loads the image externally, update the URL passed to it (FlashVars or load code) or rename the image and update the reference.
  • Clear browser cache, restart the browser, test in another browser or in private/incognito mode. If a CDN or proxy is present, purge that cache too.

Notes and cautions

  • Remember server-side case-sensitivity (Linux hosts). After publishing, confirm the updated SWF was uploaded and that the embed tag points to that exact file. If direct access to the SWF source is not possible, replacing the SWF with a rebuilt file (or renaming it and updating the embed) is the fastest way to eliminate caching ambiguity.

Recommended Answers

All 2 Replies

Member Avatar for Member #46692

do you have some code to look at?

I can think of only a few causes for this:

1. Your old banner was somehow incorporated into the flash image (maybe during image editing).

2. There is a place you missed in your code where the old image is still referenced.

3. Your browser is not refreshing.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.