html flash地址,flash插入html以后地址失效的问题

潘哲
2023-12-01

http://qcyn.sinaimg.cn/Images/zhuanti/cmodel/gallery.swf

这个FLASH,在浏览器单独打开,是有链接的

当我把flash插到http://qcyn.sina.com.cn/zhuanti/cmodel/里面的时候链接就不能点了,有遇到过同样问题的同学帮忙解决下.

一下是AS的部分代码

function init(){

playDirection = "left";

imgSpeed = 8;

rotateSpeed = 3500;

centerX = Stage.width / 2 - 170;

centerY = Stage.height / 2 - 170;

this.createEmptyMovieClip("imgHolder", 1);

imgHolder._x = centerX - 470;

imgHolder._y = centerY - 180;

imageWidth = 500;

imageHeight = 330;

targetAlpha = new Array();

targetAlpha = [0, 30, 80, 100, 80, 30, 0];

targetX = new Array();

targetX = [centerX - 55, centerX - 50, centerX + 10, centerX + 120, centerX + 330, centerX + 470, centerX + 370];

targetY = new Array();

targetY = [centerY + 260, centerY + 180, centerY + 120, centerY + 50, centerY + 120, centerY + 180, centerY + 260];

getImageDepth = new Array();

getImageDepth = [0, 100, 112, 200, 112, 100, 0];

targetS = new Array();

targetS = [10, 60, 80, 100, 80, 60, 10];

targetVisible = new Array();

targetVisible = [true, true, true, true, true, true, true];

leftBtn.swapDepths(3000);

rightBtn.swapDepths(3001);

disable_btn.swapDepths(3002);

textVisible = new Array();

textVisible = [false, false, false, true, false, false, false];

totalNum = imgNum;

indexNum = 1;

disable_btn._visible = false;

disable_btn._width = Stage.width;

disable_btn._height = Stage.height;

disable_btn.onRollOver = function () {

this.useHandCursor = false;

leftBtn.gotoAndStop(1);

rightBtn.gotoAndStop(1);

};

for (var _loc3 = 0; _loc3 < totalNum; ++_loc3) {

imgHolder.attachMovie("img", "img" + _loc3, _loc3 + 10);

var _loc2 = imgHolder["img" + _loc3];

_loc2.no_txt.text = _loc3;

_loc2._visible = false;

_loc2._x = centerX;

_loc2._xscale = 50;

_loc2._yscale = 50;

_loc2._alpha = 0;

_loc2.no_txt.text = _loc3;

_loc2.no_txt._visible = false;

loadThumbs(thumb_image[_loc3], _loc2.thumbs);

loadThumbs(thumb_image[_loc3], _loc2.thumbs2.th);

_loc2.desc_txt.autoSize = true;

_loc2.desc_txt.text = img_name[_loc3];

_loc2.desc_txt.text = img_name[_loc3];

_loc2.desc_txt._x = _loc2.desc_txt._x - _loc2.desc_txt.textWidth + 10;

_loc2.textBg._width = _loc2.desc_txt.textWidth + 20;

_loc2.textBg._x = _loc2.desc_txt._x - 10;

_loc2.desc_txt._visible = false;

_loc2.textBg._visible = false;

}// end of for

imgHolder.img2.desc_txt._visible = true;

imgHolder.img2.textBg._visible = true;

imgHolder.img2.onRelease = function () {

trace(img_link[this._name.substr(3)]);

};

setMovie();

diable_btn.swapDepths(210);

diable_btn.onRollOver = function () {

leftBtn.gotoAndStop(1);

rightBtn.gotoAndStop(1);

this.useHandCursor = false;

};

} // End of the function

function setMovie() {

for (var _loc2 = 0; _loc2 < totalNum; ++_loc2) {

posNum = (indexNum + _loc2) % totalNum;

var _loc1 = imgHolder["img" + _loc2];

_loc1._visible = targetVisible[posNum];

_loc1.desc_txt.autoSize = true;

_loc1._x = targetX[posNum];

_loc1._y = targetY[posNum];

_loc1._xscale = targetS[posNum];

_loc1._yscale = targetS[posNum];

_loc1._alpha = targetAlpha[posNum];

_loc1.swapDepths(getImageDepth[posNum]);

} // end of for

} // End of the function

function rotateMovie() {

disable_btn._visible = true;

for (var _loc3 = 0; _loc3 < totalNum; ++_loc3) {

posNum = (indexNum + _loc3) % totalNum;

var _loc2 = imgHolder["img" + _loc3];

_loc2._visible = false;

_loc2._visible = targetX[posNum];

_loc2.desc_txt._visible = textVisible[posNum];

_loc2.textBg._visible = textVisible[posNum];

if (textVisible[posNum] == true) {

_loc2.onRelease = function() {

getURL(img_link[this._name.substr(3)]);

};

} // end if

var _loc4 = new mx.transitions.Tween(_loc2, "_x", mx.transitions.easing.Back.easeOut, _loc2._x, targetX[posNum], imgSpeed, false);

new mx.transitions.Tween(_loc2, "_y", mx.transitions.easing.Back.easeOut, _loc2._y, targetY[posNum], imgSpeed, false);

new mx.transitions.Tween(_loc2, "_xscale", mx.transitions.easing.Back.easeOut, _loc2._xscale, targetS[posNum], imgSpeed, false);

new mx.transitions.Tween(_loc2, "_yscale", mx.transitions.easing.Back.easeOut, _loc2._yscale, targetS[posNum], imgSpeed, false);

new mx.transitions.Tween(_loc2, "_alpha", mx.transitions.easing.Back.easeOut, _loc2._alpha, targetAlpha[posNum], imgSpeed, false);

_loc2.swapDepths(getImageDepth[posNum]);

_loc4.onMotionFinished = function () {

disable_btn._visible = false;

};

} // end of for

} // End of the function

function loadThumbs(linkUrl, movLoader) {

var _loc3 = new MovieClipLoader();

var _loc2 = new Object();

_loc2.onLoadProgress = function (target, bytesLoaded, bytesTotal) {

pctLoaded = Math.floor(bytesLoaded / bytesTotal * 100);

target._parent.pBar_mc.gotoAndPlay(2);

if (!isNaN(pctLoaded)){

if (pctLoaded >= 100){

target._parent.pBar_mc.gotoAndPlay(2);

this.gotoAndPlay(2);

} // end if

} // end if

};

_loc2.onLoadError = function (target_mc, errorCode, httpStatus)

{

};

_loc2.onLoadInit = function (target)

{

new mx.transitions.Tween(target._parent.pBar_mc, "_alpha", mx.transitions.easing.Strong.easeOut, target._parent.pBar_mc._alpha, 30, 100, false);

target._width = imageWidth;

target._height = imageHeight;

};

_loc3.addListener(_loc2);

_loc3.loadClip(linkUrl, movLoader);

} // End of the function

function autoRotate()

{

leftBtn.gotoAndStop(1);

rightBtn.gotoAndStop(1);

if (playDirection == "right")

{

if (indexNum < totalNum)

{

++indexNum;

rotateMovie();

} // end if

if (indexNum == totalNum)

{

indexNum = 0;

} // end if

} // end if

if (playDirection == "left")

{

if (indexNum > 0)

{

--indexNum;

rotateMovie();

} // end if

if (indexNum == 0)

{

indexNum = totalNum;

} // end if

} // end if

} // End of the function

stop ();

init();

rightBtn.onRelease = function ()

{

if (indexNum < totalNum)

{

++indexNum;

rotateMovie();

} // end if

if (indexNum == totalNum)

{

indexNum = 0;

} // end if

};

leftBtn.onRelease = function ()

{

if (indexNum > 0)

{

--indexNum;

rotateMovie();

} // end if

if (indexNum == 0)

{

indexNum = totalNum;

} // end if

};

leftBtn.onRollOver = function ()

{

this.gotoAndStop(2);

clearInterval(id);

};

rightBtn.onRollOver = function ()

{

this.gotoAndStop(2);

clearInterval(id);

};

rightBtn.onRollOut = function ()

{

this.gotoAndStop(1);

playDirection = this._name.substr(0, 5).toString();

id = setInterval(autoRotate, rotateSpeed);

trace (playDirection);

};

leftBtn.onRollOut = function ()

{

this.gotoAndStop(1);

playDirection = this._name.substr(0, 4).toString();

id = setInterval(autoRotate, rotateSpeed);

trace (playDirection);

};

id = setInterval(autoRotate, rotateSpeed);

 类似资料: