Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Implimenting Facebook like in AS3 project

Posted on 2012-04-11
2
Medium Priority
?
562 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 83

Expert Comment

by:leakim971
ID: 37834476
0
 
LVL 22

Accepted Solution

by:
rascalpants earned 2000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Find out what you should include to make the best professional email signature for your organization.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
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…
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.
Suggested Courses

916 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