trying to create a flash object for my website. it is just a 400x200 frame that rotates a bunch of pictures for my products. i want each picture to be an individual link but so far i can only make the object link to one page. any ideas how to do this?

Dani AI

Generated

Short version: two practical routes — make the SWF itself handle per-image links (if keeping Flash), or migrate the rotator to an HTML5 slider (recommended). Driving slides from an external data file (XML or JSON) is the cleanest option and avoids fragile frame-timing hacks; this follows @iamthwee’s XML suggestion and is more robust than the frame-timed URL swap approach mentioned by . Note: Adobe ended support for Flash Player on December 31, 2020 and blocked Flash content from running on January 12, 2021, so Flash is no longer a safe choice for public sites. Adobe Flash Player EOL. (adobe.com)

If staying with Flash, put each image filename plus its target URL in an external XML or JSON file and load it at runtime; when the slide changes, update a currentUrl value and use a click handler to open that URL. Use navigateToURL() for a simple open or ExternalInterface.call() to delegate to JavaScript when you need more control. Keep the visible bitmap and the hit area separate so animations do not swallow clicks, and test from an HTTP server (the Flash local sandbox can block network/file loads). Be aware browsers/pop-up blockers and the Flash security model require the open to be a direct user gesture. navigateToURL docs. ExternalInterface reference. (airsdk.dev)

Best long-term fix: export the images and build a small HTML/CSS/JS rotator where each slide is wrapped in an anchor (<a>) — reliable linking, touch support, and better SEO. See the anchor element reference for link semantics. MDN: The a element. (developer.mozilla.org)

Recommended Answers

All 2 Replies

Put the code for the URL according to your time frame so that by the time the picture shows up the URL has changed.

Member Avatar for Member #46692

Best way is to drive this via an xml file.

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.