Hi,
i want action script when click an a link it's goes to another page please help me

Thanx,
Sree

Dani AI

Generated

Brief, practical clarification tied to the thread: whether to open an external webpage or move the Flash playhead depends on two things — the ActionScript version and the intended target (external browser page vs. timeline inside the SWF). asked for a click-to-go-to-page solution and noted those two directions; below are concise AS3 patterns and troubleshooting notes that extend that advice.

AS3 — open an external URL from a button (button must have an instance name set in the authoring tool):

import flash.events.MouseEvent;
import flash.net.URLRequest;
import flash.net.navigateToURL;

myButton.addEventListener(MouseEvent.CLICK, openLink);

function openLink(e:MouseEvent):void {
    var req:URLRequest = new URLRequest("http://example.com");
    navigateToURL(req, "_blank"); // use "_self" to reuse the same tab
}

To move the playhead inside the same movie, call the movieclip timeline methods (cast root when needed):

import flash.display.MovieClip;
import flash.events.MouseEvent;

myButton.addEventListener(MouseEvent.CLICK, goFrame);

function goFrame(e:MouseEvent):void {
    MovieClip(root).gotoAndStop(2); // or gotoAndPlay("label")
}

Troubleshooting & context: confirm the FLA’s Publish > ActionScript version; set the button instance name; test via a web server (local file:// can trigger security restrictions); pop-up blockers or browser policy can affect new-window behavior. Finally, Flash Player reached end-of-life in 2020, so modern projects should migrate to HTML5/JS alternatives (Flash Player end-of-life notice). For AS3 API details see the official reference for navigateToURL ().

Member Avatar for Member #114696

If you want a hyperlink to another webpage tryout . Otherwise for another frame try gotoAndStop() and gotoAndPlay().

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.