Solved

Implimenting Facebook like in AS3 project

Posted on 2012-04-11
2
549 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

617 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