Solved

Implimenting Facebook like in AS3 project

Posted on 2012-04-11
2
543 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

895 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

14 Experts available now in Live!

Get 1:1 Help Now