Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/actionscript-3/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Flash 从Facebook应用程序内的SWF导航到URL_Flash_Actionscript 3_Facebook_Facebook Graph Api - Fatal编程技术网

Flash 从Facebook应用程序内的SWF导航到URL

Flash 从Facebook应用程序内的SWF导航到URL,flash,actionscript-3,facebook,facebook-graph-api,Flash,Actionscript 3,Facebook,Facebook Graph Api,我试图让用户退出Facebook内的flash应用程序,通过鼠标点击进入youtube视频页面 _storyVO.youtubeid是youtube ID,它在本地运行良好 到目前为止,我已经尝试: 将文本字段放置在精灵中并添加MouseeEvent。单击调用以下命令的侦听器: navigateToURL(new URLRequest("http://www.youtube.com/watch?v=" + _storyVO.youtubeid), "_self"); 或 两者都会失败并发出安全

我试图让用户退出Facebook内的flash应用程序,通过鼠标点击进入youtube视频页面

_storyVO.youtubeid是youtube ID,它在本地运行良好

到目前为止,我已经尝试:

将文本字段放置在精灵中并添加MouseeEvent。单击调用以下命令的侦听器:

navigateToURL(new URLRequest("http://www.youtube.com/watch?v=" + _storyVO.youtubeid), "_self");

两者都会失败并发出安全警告

在文本字段中使用htmlText,如:

textField.htmlText = "<a href='http://www.youtube.com/watch?v=" + _storyVO.youtubeid + "'>watch on youtube</a>";
textField.htmlText=”“;
->也会因安全警告而失败

  • 除了使用FBJSBridgeUtil类调用JavaScript函数外,JS函数内部还有一个“window.location.href”,事实证明,它也不起作用

任何帮助都将被感激,肮脏的黑客也一样。谢谢。

事实证明,使用带有htmlText的文本字段和使用目标“\u blank”的a-href可以很好地工作:

textField.htmlText = "<a href='http://www.youtube.com/watch?v=" + _storyVO.youtubeid + "' target='_blank'>watch on youtube</a>";
textField.htmlText=”“;
如果我需要它成为一个按钮,我只需创建一个文本字段,其中包含随机文本和所需的a href,以匹配按钮的高度,将其放在顶部,alpha=0,background=true,以便在facebook中有一个很好的矩形点击区域:

textField.background = true;
textField.htmlText = "<a href='" +_storyVO.tweetLink + "' target='_blank'>RANDOM</a>";
textField.x = button.x;
textField.y = button.y;
textField.alpha = 0;
textField.background=true;
textField.htmlText=“”;
textField.x=按钮.x;
textField.y=按钮.y;
textField.alpha=0;
textField.background = true;
textField.htmlText = "<a href='" +_storyVO.tweetLink + "' target='_blank'>RANDOM</a>";
textField.x = button.x;
textField.y = button.y;
textField.alpha = 0;