如何添加一个sharethis按钮,我的flash文件?我的、按钮、文件、sharethis

2023-09-08 15:31:44 作者:花渡

我一直在寻找这个解决方案有一段时间没有找到任何良好稳固的解决方案。我所看到的一切都可以是2岁不工作。

我希望做的是使用一个MC在我的Flash文件像一个按钮,当用户点击打开的sharethis弹出来分享这个特殊的视频的网址。该网站的API文档真的不触及闪存正与sharethis。 任何帮助会做。

谢谢

解决方案

分享这个工作在HTML,框架和使用JavaScript。 就需要一个外部接口来使用它。我不知道我们是在同一页上时,你说住在瑞士法郎。您可能需要将其绑定到某个对象或种类来实现它。

你检查 Barklund.org 为他们的工作对ShareThis和 ExternalInterface的?

他们已经破裂的程序如下:

  

首先,干脆去sharethis.com   发行部分和自定义   窗口小部件。取而代之的将小部件   您希望code段   键,把它的头部   你的网站。

 &LT;脚本类型=文/ JavaScript的 src="http://w.sharethis.com/button/sharethis.js#publisher=636e055b-a4a2-4f9c-872c-b7aa9a701bb0&amp;type=website&amp;send_services=email&amp;post_services=facebook%2Clinkedin%2Cmyspace%2Cdigg%2Cdelicious%2Ctwitter%2Creddit%2Ctechnorati%2Cword$p$pss%2Cblogger%2Cgoogle_bmarks%2Cwindows_live"></script>
 

  

然后创建一个小的JavaScript   类似的功能:

 函数份额(URL,标题){
    VAR S = SHARETHIS.addEntry({
      网址:网址,
      标题:标题
    },{按钮:假的,弹出:真});
    s.popup()
    返回false;
  }
 

  

最后,简单的调用这个函数   从使用Flash    ExternalInterface的:

 变种网址:字符串=htt​​p://www.barklund.org/blog/2009/05/06/using-sharethis-with-flash/;
VAR标题:字符串=Barklund.org  - 使用ShareThis与Flash;
进口的flash.external.ExternalInterface;
ExternalInterface.call(共享,网址,标题);
 

也有从笔者的一些评论说,有因改变了API中,但问题例如为我工作好。如果没有,你可以检查出有使用 2007-06-18用执行Flash

I have been searching for this solution for some time have not found any good solid solutions. Everything I have seen is either 2 years old and does not work.

What I would like to do is use a MC in my flash file to act like a button and when clicked open the sharethis pop up to share this particular video's url. The site API docs really don't touch on Flash working with sharethis. Any help would do.

Thanks,

Matt

解决方案

Share This works in HTML,frames and uses javascript. You would need an external interface to use it. I am not sure we are on the same page when you say live in the swf. You may have to bind it to some object or the sorts to achieve it.

Did you check Barklund.org for their working on ShareThis and ExternalInterface ?

They have broken down the procedure as follows

First, simply go to sharethis.com publisher section and customize your widget. Instead of placing the widget code snippet where you want the button, put it in the head section of your website.

<script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=636e055b-a4a2-4f9c-872c-b7aa9a701bb0&amp;type=website&amp;send_services=email&amp;post_services=facebook%2Clinkedin%2Cmyspace%2Cdigg%2Cdelicious%2Ctwitter%2Creddit%2Ctechnorati%2Cwordpress%2Cblogger%2Cgoogle_bmarks%2Cwindows_live"></script>

Then create a little javascript function like:

  function share(url, title) {
    var s = SHARETHIS.addEntry({
      url: url,
      title: title
    }, {button:false,popup:true});
    s.popup()
    return false;
  }

Finally, simple call this function from Flash using ExternalInterface:

var url:String = "http://www.barklund.org/blog/2009/05/06/using-sharethis-with-flash/";
var title:String = "Barklund.org - Using ShareThis with Flash";
import flash.external.ExternalInterface;
ExternalInterface.call("share", url, title);

There are also some comments from the author saying there were problems due to the change in the API but the example worked well for me. If it does not you can check out there Using AddThis with Flash implementation