如何在同一窗口AS3中打开链接

时间:2014-01-20 15:24:48

标签: jquery actionscript-3 flash

我正在尝试让我的代码在同一个窗口中打开一个链接,而不是每次都打开一个新链接。这是我目前的代码。点击时有四个按钮可打开链接。我已经为每个添加了SELF命令,但是它已经完全停止了。请帮帮忙?

 Mouse.hide();
cursor_mc.startDrag(true);

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

myButtonContact.addEventListener(MouseEvent.CLICK, goThereCont);
function goThereCont(e: MouseEvent) {
    var request: URLRequest = new URLRequest("I'VE HIDDEN THE LINK OBVIOUSLY");
    navigateToURL(request, "self");
}

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

myButtonStills.addEventListener(MouseEvent.CLICK, goThereStills);
function goThereStills(e: MouseEvent) {
    var request: URLRequest = new URLRequest("I'VE HIDDEN THE LINK OBVIOUSLY");
    navigateToURL(request, "_self");
}

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

myButtonAnim.addEventListener(MouseEvent.CLICK, goThereAnim);
function goThereAnim(e: MouseEvent) {
    var request: URLRequest = new URLRequest("I'VE HIDDEN THE LINK OBVIOUSLY");
    navigateToURL(request, "_self");
}

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

myButtonFilm.addEventListener(MouseEvent.CLICK,goThere);
function goThere(e:MouseEvent){
    var request:URLRequest = new URLRequest("I'VE HIDDEN THE LINK OBVIOUSLY");
    navigateToURL(request, "_self");
}

1 个答案:

答案 0 :(得分:0)

你走了。

navigateToURL(request,"_self");