0
您好我有一個小的閃存如下動作腳本2.0
public function startApp() : Void
{
mcWindowRoot.refToClass = this;
mcNext = mcWindowRoot;
_oLogoutDelegate = Delegate.create (this, onLogoutHandler);
_oWindowManagerRef.addEventListener ("onLogout", _oLogoutDelegate);
loadWhatNext();
}
/**
* Enter description here
*
*/
function loadWhatNext (mc : MovieClip) : Void
{
var doneFinish = mcNext.container.attachMovie ("done", "done", mcNext.container.getNextHighestDepth());
//var returnPage = mcNext.container.attachMovie ("item", "item", mcNext.container.getNextHighestDepth() ,
//{
//_x : 135, _y : 230
//});
var miRefTemp = _oWindowManagerRef;
//returnPage.item_txt.htmlText = _level0.account_Return;
//returnPage.onPress =
doneFinish.onPress = function()
{
trace ("AccountNext returnPage.onPress doneFinish.onPress")
trace ("AccountNext miRefTemp " + miRefTemp)
trace ("AccountNext this.refToClass " + this._parent._parent.refToClass)
trace ("AccountNext this " + this)
this._parent._parent.refToClass.closeWindow();
_oShell.loadWindow("", null);
}
if (aNextdata != undefined && aNextdata.length > 0)
{
for (var i = 0 ; i < 3; i ++)
{
if (aNextdata [i].text != undefined)
{
var tempItem = mcNext.copy.attachMovie ("item", "item" + i, i,
{
_x : 143, _y : 150 + (i * 20)
});
tempItem.item_txt.htmlText = aNextdata [i].text;
tempItem.url = aNextdata [i].link;
tempItem.refToClass = _refWindow;
var asInterpreter = new asFunctionInterpreter (_oWindowManagerRef._oWindowManagerRef.oController.propertiesMap.get ("BaseURL") , this);
var deepLinks : Object = new Object();
deepLinks = asInterpreter.getAsSingleURL (aNextdata [i].link);
tempItem.deepLinks = deepLinks;
trace("Next :: LINKS : " + tempItem.wModule);
tempItem.oShell = _oShell;
tempItem.onPress = function()
{
if (this.deepLinks.type == "internal")
{
this.oShell.loadWindow(this.deepLinks.wModule , this.deepLinks.wParams);
}
else
{
getURL (this.deepLinks.link, "_blank");
}
this.refToClass.closeWindow();
}
}
}
} else
{
trace ("end tab " + _refWindow);
}
}
/**
* Enter description here
*
* @param evt
*/
private function onLogoutHandler (evt : Object) : Void
{
_oWindowManagerRef.removeEventListener ("onLogout", _oLogoutDelegate);
closeWindow();
}
/**
* Enter description here
*
*/
public function closeMyWindow() : Void
{
_global._doNav ('windowType:wclose')
}
/**
* Enter description here
*
*/
public function removeMyWindow() : Void
{
_oWindowManagerRef.removeWindow (idWindow);
}
}
如果你可以從代碼的這部分
if (aNextdata != undefined && aNextdata.length > 0)
我正在三通一低於其他,但我的問題看只是第一個鏈接是打開在一個新的頁面,應該打開在同一頁面,所以我應該怎麼做,請幫助我謝謝你。