![]() |
AJAX and Actionscript
I have a page (genre.php) that has different songs and on this page you can rate each song. I also have a flash mp3 player that pops up in a different window so you can hear each song. Members want the ability to rate songs from the mp3 player. I've already added this functionality to update the DB courtesy of actionscript. The problem I am running into is how can update the main page (genre.php) with the new rating from the mp3 player? I think the problem I am running into is setting the correct image to be updated.
I was going to do this all in flash but I'm using SWFObject to embed the .swf files and its really slow for the page to load since its loading 50 songs per page. I was thinking of doing something like this... Code:
//var xmlHttp = create XMLHTTPRequest according to browserI've never used AJAX and very minimal javascript experience but I can understand the basics so feel free to use any jargon necessary. Quote:
Edit: I didn't want to just post a bunch of unnecessary code. Please tell me if you need to see other code in order to assist me on this situation. Edit: How do I change the Thread Title as its confusing seeing that I'm not necessarily needing actionscript and AJAX to communicate. Although, if you know of a way to do that, that will be helpful too :thumbsup: |
Sometimes...I feel like I'm on my own...j/k. I fixed it. :D Apparently was overthinking this and wanted to query the DB to find out the rating once it posted. When thats simply not necessary since I can call javascript directly from actionscript. So really all that needed to be done is write a function on the parent page (genre.php) and pass the parameters via actionscript.
genre.php Code:
//code that opens the child window container my mp3 playerCode:
//this is how I call that function from my actionscript |
| All times are GMT +1. The time now is 05:52 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.