How to make flash movie as html link
<a>embed tag</a>
not working?

Any ideas?

Dani AI

Generated

Brief summary and practical options (OP cannot edit the SWF; correctly points out that embedding the link inside the Flash is the cleanest solution). Because several replies mention embedding or iframes (, ), here are HTML-side approaches that work when the SWF cannot be changed, their trade‑offs, and a modern recommendation.

A. Transparent HTML overlay (fast, reliable when the whole movie should be a link)

  • Embed the SWF in a positioned container, set the Flash to windowless mode (wmode="opaque" or "transparent") so HTML can sit above it, then place an absolutely positioned, full‑size anchor over the player. This makes the whole movie act as a normal link. Caveats: overlay blocks interaction with the Flash (no inner buttons), windowless mode can affect performance and full‑screen behavior, and some browsers/plugins treat windowless Flash differently.

Example:

<div style="position:relative; width:640px; height:360px;">
  <!-- SWF embed here (include param wmode="opaque") -->
  <a href="https://example.com" target="_blank" rel="noopener"
     style="position:absolute; inset:0; z-index:10; display:block; background:transparent; text-indent:-9999px;">
    Open link
  </a>
</div>

B. JavaScript <> Flash bridge (preserves internal controls if available)

  • Works only if the SWF exposes ExternalInterface methods. If so, JS can call those methods to trigger a navigate action inside the SWF (keeps internal interactivity intact). If the SWF does not expose such methods, this option is not possible without editing the SWF.

C. Long‑term: replace with HTML5 video + JS slider

  • Flash is deprecated. Rebuilding the slider with a top HTML5 <video> (or iframe for hosted players) and a thumbnail carousel (many JS libraries available) gives full control over links, accessibility, and mobile support.

Troubleshooting notes: test with Flash disabled, check cross‑domain restrictions, test keyboard/focus behavior after adding wmode, and prefer the HTML5 rebuild for long‑term compatibility.

Recommended Answers

All 7 Replies

0 down vote

if you want to link a piece of flash to a web site simply in the .fla . Insert a new layer , name this layer a (for actionscript/actions) . Inside type the following, say the thing you wanted someone to click on was a button which you named ,as a movie clip * mcbutton * :

mcbutton.onRelease = function:void () {
getURL("http://www.yahoo.com");
};

Wasim Ullah Sulehri

0 down vote

This will work in Actionscript 3

you need to use the navigateToURL() command which requires a URLRequest. Add a mouseclick event listener to the stage and in the function that is called in the event listener call the navigateToURL() command, passing the URLRequest of the url you want it to link to.

// add the click event listener to the stage
stage.addEventListener(MouseEvent.CLICK, onClickHandler);
//define the onClickHandler function to go to the url
  function onClickHandler(evt:MouseEvent):void{
      navigateToURL(new URLRequest("http://www.google.com"));
    }

Wasim Ullah Sulehri

I cant edit the flash files. that is my requirment.
Can we achive this through html?
Basically what i want is the video slider like youtube use to have – where the video playing is at top and underneath it in small boxes are the other videos. There is also an arrow to the right and to the left where you can scroll through the other videos at the bottom and if you select one it will start playing up above in the larger area.

I have done some research and finally finds a slider similar to youtube but that is for images. If i changes it to videos i cant make them link

I hope you understand my problem?

Load an external Flash file and link that in Flash. Like this:

EXAMPLE.

Member Avatar for Member #805952

That needs flash. You can link to the flash file like so:

<a href="http://example.com/your_flash_object.swf">Link text</a>

or you can embed it in the page:

<object width="500" height="400">
<param name="flash_thing" value="your_flash_file.swf">
<embed src="your_flash_file.swf" width="550" height="400">
</embed>
</object>

Try to use <iframe>.

just google it and you find lots of ideas from here ....

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.