Solved

Implimenting Facebook like in AS3 project

Posted on 2012-04-11
2
542 Views
Last Modified: 2012-06-01
We are creating a pure AS3 project, and would like to implement connectivity to facebook, i.e. the using facebook's "like" functionality, and possibly more later on.  We have run into some problems, however.  Our swf is loaded onto the web page using SWFObject 2.2, embedded dynamically.  We can have the like button appear, and it works, but we can't have both on screen at any time: if the swf is loaded, the like button is not, and vice-versa.

We have tried setting the wmode of the swfObject to both opaque and transparent, with no joy.  As I understand it, we need to give the like button a greater z-index than the SWFObject, but by default they ignore z-indices.  It also doesn't seem possible to dynamically embed the swf within a <div>, as that requires javascript, which won't run in the div.  Static embedding of the swf isn't a feasible option, as we require access to javascript from our swf.

Is there a way for us to have our swf dynamically embedded, and have the 'like' button placed on top, that allows us full functionality of our javascript code?
0
Comment
Question by:anotherfn
2 Comments
 
LVL 82

Expert Comment

by:leakim971
ID: 37834476
0
 
LVL 22

Accepted Solution

by:
rascalpants earned 500 total points
ID: 37882230
Why not just have flash call a JavaScript function using ExternalInterface.call("jsFunctionName");

then have your JS handle all of the hard work.  Then in your SWF you can just have your own facebook like image that the user clicks on, and communicates to the JS in the HTML page.


have you tried that yet?

rp
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now