繁体   English   中英

Flash重定向SWF文件

[英]Flash redirect SWF file

有没有一种方法来获取点击事件,然后在swf嵌入式对象上重定向?

下面是我目前拥有的代码,但似乎没有用

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="560" height="80" id="ad_cat" align="">
                    <param name="movie" value="http://roadsonline.com.au/assets/ads/COA0460_560x80.swf?clickTAG=catredir.php">
                    <param name="wmode" value="transparent" /> 
                    <embed src="http://roadsonline.com.au/assets/ads/COA0460_560x80.swf?clickTAG=catredir.php" quality="high" width="560" height="80" name="movie"  wmode="transparent" align=""  type="application/x-shockwave-flash" plugins page="http://www.macromedia.com/go/getflashplayer"> 
                </object>

SWF由两部分组成:HTML和clickTAG。

我相信您的html应该可以工作-尽管我建议您使用http://yoursite.com/redirect.php之类的硬链接。 那么,让我们谈谈Flash吧?

不久前,我为我的员工编写了有关点击标签的教程,其中介绍了您需要立即执行的操作。 这是AS2:

http://ryanhollingsworth.com/index.php/banner-ad-tutorials/item/34-actionscript-20-basic-clicktag-and-fundamentals

AS3 ClickTAG:

  import flash.display.MovieClip;

    var hit = new MovieClip();
    hit.graphics.beginFill(0xFFFFFF);
    hit.graphics.drawRect(0,0,stage.stageWidth,stage.stageHeight);
    var clicky = new SimpleButton(null,null,null,hit);
    this.addChild(clicky);

     clicky.addEventListener(MouseEvent.CLICK, function(e){
 if(root.loaderInfo.parameters.clickTAG) navigateToURL(new URLRequest(root.loaderInfo.parameters.clickTAG), "_blank");
 e.stopPropagation();
 });

进一步阅读: http : //helpx.adobe.com/flash/kb/pass-variables-swfs-flashvars.html

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM