Hi Every1

I have been making a site in dreamweaver which has drop down html navigation above a rollover flash animation (a carosell of images with text appearing over it when rolled over - all made in flash and imported in). I am really stuck though! I have managed to get the flash animation to sit underneath the dropdowns and the rollover works fine....but....when navigating but I can't seem to get it to stop animating! It interferes with the drop down menu and is really irritating! am really stuck on how to freeze a flash animation when using navigation above it. Can anyone help!!!!???

Cheers

Gem

Dani AI

Generated

asked for the files and described that the dropdown sits above the carousel but the SWF keeps reacting while the menu is open. Layering alone doesn't stop the movie's internal rollovers — either tell the SWF to pause, or block events from reaching it. Two practical solutions:

  1. Recommended — expose pause/resume methods from the SWF and call them from JavaScript. Example (AS3, put this on the main timeline or document class early on):
import flash.external.ExternalInterface;

function pauseCarousel():void {
    try { MovieClip(root).stop(); } catch (e:Error) {}
}
function resumeCarousel():void {
    try { MovieClip(root).play(); } catch (e:Error) {}
}

if (ExternalInterface.available) {
    ExternalInterface.addCallback("pauseCarousel", pauseCarousel);
    ExternalInterface.addCallback("resumeCarousel", resumeCarousel);
}

Call from the page when the menu opens/closes:

var swf = document.getElementById('carousel'); // id used in object/embed
try { swf.pauseCarousel(); } catch (e) {}
// later: try { swf.resumeCarousel(); } catch (e) {}

Make sure the embed/object has id (and name for IE), allowScriptAccess set appropriately, and the callbacks are registered before JS calls them.

  1. Fallback — if you cannot change the SWF, place an invisible blocker div above the SWF while the menu is open so the SWF no longer receives mouse events (it will still animate, but rollovers will stop). Minimal idea:
/* CSS */
#flashBlocker { position:absolute; left:0; top:0; width:500px; height:300px; display:none; z-index:9999; background:transparent; }

/* JS */
document.getElementById('flashBlocker').style.display = 'block'; // on menu open
document.getElementById('flashBlocker').style.display = 'none';  // on menu close

Troubleshooting: if JS calls fail, call them after window.onload or have the SWF notify the page when ready. If the SWF is cross-domain, scripting may be blocked unless allowed. Setting wmode to opaque or transparent is often needed for stacking, but can affect performance — test across browsers. Using a library like SWFObject for embedding reduces id/name/compatibility headaches.

Recommended Answers

All 5 Replies

can you attach your entire code along with flash file as here, it'll help us to understand problem.
still, i think setting z-index property of dropdown may help you.

Cool thanks so much for helping - At work now and don't know where to go with it next. I have zipped everything i think you will need - take a look :-) Cheers for this

Gem


can you attach your entire code along with flash file as here, it'll help us to understand problem.
still, i think setting z-index property of dropdown may help you.

did you solve that? where is the attachment.

I attached it to the previous message - It was 7mb zip I attached flash files and index html. Any suggestions? Could I send it to your email possibly?

Cheers again, :-)
Gem

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.