Php :: MySQL Or XML: Saving User Votes On Server From A Flash Movie?

Nov 21, 2009

A project of mine involves a flash movie (.swf) in a webpage, where the user has to pick from a number of items, and has the option to thumbs up or thumbs down (vote on) each item.So far I have gotten this to work during each run of the application, as it is currently loading the data from an XML file - and the data is still static at the moment.I need to persist these votes on the server using a database (mySQL), such that when the page is reloaded, the votes aren't forgotten.Has anyone done this sort of thing before?The two mains methods that I have found on the 'net areeither direct communication between AS3 and the SQL using some sort of framework, orpassing the SQL query to a PHP file, which then executes the SQL query and returns the SQL to AS3.

Which of these methods is the better option?For the latter method (involving PHP), I have been able to find resources on how to acheive this when attempting to retrieve information from the database (i.e. a read operation), but not when attempting to send information to the database (i.e. a write operation, which is needed when the users vote). How is this done?Edit: Implemented solutionSomewhere in the PHP file:

if ($action == "vote")
{
$id = $_POST['id'];

[code]....

View 2 Replies


Similar Posts:


Flex :: Downloading A File From A Server And Saving It In A Specific Location Without User Intraction

Jun 23, 2010

I want to download a file from the server and save it in a particular location of the disk without user interaction. All this I want to do it in Flex.

View 1 Replies

Php :: Multiupload Of Files Using Flash Uploader And Php And Saving Into Mysql Database?

Mar 24, 2012

I want to develop a backend admin solution to save images for a post using some multiupload flash uploader. I mean that kind o f uploader, where when you click on browse and than in the open dialogue box you can choodse mulitple files using CTRL plus LEFT MOUSE CLICK).I would like to save every new image to the database. With saving I mean, creating a new row for every item(image) in my table called images:1.id (automaticallyncreasing)2.file_name3.user_who_uploaded_that_bookI would like also to limit the number of files that can a user uplaod (e.g. max 20 files) somewhere in the config file.

View 2 Replies

Hack A Flash Game To Increase Votes Or Score?

Nov 10, 2011

I want to know about hacking a flash game...like in a flash game how to hack to increase your votes or score ... As there are flash games in Facebook,how to hack them

View 2 Replies

ActionScript 2.0 :: [CS4] Flash/PHP/MySQL Multi-User Interaction?

May 22, 2009

On load - Get the current position of the movieclip object on stage which is stored in MySQL through PHP.When the user moves the movieclip object, update the x and y position of the object by sending it to MySQL through PHP.It's a pretty simple way of understanding Flash/PHP/MySQL Integration and I find it much less complex than a socket server but I don't think it's efficient enough to use with the constant queries. [URL] Does not really work very well, dont think the Y position works at all lol, when you refresh the page it is suppose to save your current object position into the database then load it again but it appears a bit buggy, not completely sure why - I'm pretty new to Load/Send but it doesnt matter much. Also the movement appears to be lagged too and opening a new window as a 'new user' does not share the same instance of the object on stage (I think that would require me to make seperate ID's for each user though to give them their own unique objects on stage.)Is there any better (more efficient and reliable) way of creating a stage for multi-user interaction (like player characters for a game which move around by user key input, not a chat room)...Which does not involve the use of a socket server?

View 1 Replies

Php :: Saving The £ Symbol To A Mysql Database?

Jan 7, 2011

I have a problem with saving the £ symbol to a mysql database.I am running a flex front end, with a php + mysql backend When I save a record from flex, the string gets sent to the server as "This amount is £10" php views the string as above, and when it gets saved into the DB, it gets saved as "This amount is £10".

My understanding is that this is correct based on MySQL or PHP is appending a whenever the £ is used I now retrieve the above record, and it gets sent to flex as "This amount is £10". Flex correctly displays this in a textarea as "This amount is £10" I change another field in the same record in flex, and re-save the transaction. The string now gets sent to the server as "This amount is £10" The record is now saved into the DB as "The amount is £10". Each time the record is re-saved, this effect snowballs.

View 3 Replies

Actionscript :: Saving An Arraycollection Field To Mysql/php?

Jun 2, 2011

How do you save an arraycollection field in an object to a mysql database. I usually would have used a for each item in array collection field then pass a unique key to it so it track it back later, but thats getting cumbersome now. Is there a way to save an arraycollection that also allows easy update of the arraycollection item.

View 1 Replies

ActionScript 3.0 :: Saving An Array Of Objects To MYSQL Database, And Retrieving It

Nov 26, 2009

How do i save an array of objects, like this: [{n:1,bb:4},{n:2,bb:4,r:1},{n:6,bb:7},...] to a database? I was thinking i would have to convert it to string, but if i do that, when i retrieve it from the database, how am i going to use it?

EDIT: forgot to mention that the objects can contain an array of objects as well, but there won't be any more arrays beyond that point.

[{n:1,bb:4},{n:2,bb:4,r:1},{n:6,bb:7},{arr:[{a:11,b:2},{a:11,b:2},...],r:1},...]

View 2 Replies

Flex - Saving Images From Flash To Server Using PHP

Sep 29, 2010

I am trying to save some images from Flash to Php by sending a jpgstream, capturing it in php and pushing it to a file. Not sure what I am doing wrong here.

I am putting all the images I need into an array like so: (history is just where I am keeping all the image data)

[Code]...

But this doesn't seem to do the trick. I have been going through a bunch of different tutes and code snippets, so maybe I just ogt something confused along the way. I have done this before though and don't remember it being this difficult.

View 2 Replies

Actionscript 3 :: Saving Image From Flash On Server Under Different Name

Mar 25, 2011

I followed this question:flash Actionscript 3 and php image upload.I copied the code:[code]It works great, I just need to know how to save the image under a specific name, how do I pass an argument to the php script? or is that not necessary, can I change it before calling the script?How would I then call URLrequest to show user the file he uploaded ?

View 1 Replies

ActionScript 3.0 :: Flash - Use A URLRequest To Get Login Information From The MySql Server

Jul 26, 2009

I'm having a little trouble with the 3. I'm trying to use a URLRequest to get login information from the mySql server. It works great when I try to log in, but if anyone else from outside my network tries to log in, it just hangs. I'm on port 8080 using localhost. I've even tried changing everything to my IP address instead of localhost and allowing my tester to try, but it still hangs.

View 6 Replies

Flash :: Server Side - Passing Vars To Php And Edit A Mysql Row From The Db

Oct 5, 2005

i'm passing vars from flash to php and trying to edit a mysql row from the db. anyone know php and can spot something going awry with my code here?

[Code]...

View 11 Replies

ActionScript 3.0 :: Saving Map Image To User's PC?

Jul 17, 2010

I am working on a web-tool that allows users to add pre-loaded tiles of data as overlays to Google Maps. I then want users to be able to save their work. I'm approaching this as them saving a series of images that they can then import to work and add text etc to a layout they choose. If you want to see it in action, it's available here: [URL]

My issue is saving the map image.

I started by trying to use BitmapData.draw() and the JPGEncoder class in the as3corelib and this works for the 2 legend images. It also works for the map when testing on my PC (and changing the Global Security Settings). As soon as you put it on the server it hangs at the BitmapData.draw() line, and I've since found out that this isn't resolvable:

code.google.com/apis/maps/faq.html#bitmapdata

I went back to trying to use map.getPrintableBitmap (code.google.com/apis/maps/documentation/flash/reference.html#Map.getPrintableBitmap; which I'd previously discarded due to poor resolution). I can still pass this through JPGEncoder and am now happy with the result. However, the code only runs when no overlays have been added to the map.

My "save code" goes as follows:

Code:
import JPGEncoder;
Security.loadPolicyFile("195.62.199.219/pctsla/gis/supporttool/crossdomain.xml"); //see note below

[Code].....

Note: PHP cannot be installed on the server I am working with for various reasons so I need to pursue other routes.

View 0 Replies

ActionScript 3.0 :: Send The User Balance To Mysql And Save It There?

Aug 8, 2009

What actionscript i need, to send the user balance to my Mysql and save it there. and when the user come back to the game get the same balance from the last time(override the user balance).here is part of the Flash code that in the game:

game_pr.display = function ()
{
_root.display.balance = "<P ALIGN='LEFT'><FONT FACE='04b_25' SIZE='12'

[code]......

View 0 Replies

Data Integration :: Saving User Input To Xml

May 22, 2007

I'm sorry this is a question from a server ignoramus, I've previously captured user input using a combination of cfml and text files. That was way back in 2002 and using AS 1.0. I'm now working in an environment where the server guy won't put any scripts on, and I mean none, no PHP, no ASP, no CFML, nothing. Would anyone know if there is a way of capturing user input without using a script, please? This prolly shows a really basic lack of understanding of how servers work but I'm a bit desperate. I know the Flash Learning Interactions can work with SCORM and pop results into LMSs that use SCORM and our LMS does use SCORM, but it seems to only be within the learning interactions and I don't know where to start to tailor this for the input I need to capture.

View 2 Replies

ActionScript 3.0 :: Login And Register Functions - Saving User Data

Oct 21, 2009

I have a problem with these functions when I register the first user it works just fine but when I register the second the first user is deleted. I'm saving my data inside the swf because I couldn't write the functions in SQL>

This is my register function
ActionScript Code:
function registerplayer(e:MouseEvent){
savedata.rpname = rpn.text;
var registername = [savedata.rpname+"N"];
savedata.registername = "name";
trace(registername);
[Code] .....

View 0 Replies

Actionscript 3 :: Saving A Flash Movie With Just The Stage?

Feb 3, 2011

how to I save/export a flash movie so that it just saves the contents inside of the stage?here are certain things that overlap the stage and fade into it from the ouside in which I don't want to be able to be seen when increasing the screen size of the movie.basically, I want to be able to make the screen as big as I want (using percentage in browser, and yes everythings a vector) with nothing but the stage showing.

View 1 Replies

ActionScript 3.0 :: Time Delay - Saving Pictures To User Computer On Button Click?

Jul 9, 2011

This is code i used for saving pictures to user computer on button click:


Code:
// Create a new instance of the FileReference class to work with.
var myfileReference:FileReference = new FileReference();[code].....

View 0 Replies

Flash :: Play A Video Via Flash Player When The Video Is Located On Different Server's Mysql

Apr 2, 2011

i want to know if it is possible to play a video via flash player, when the video is located on different server's mysql. for example: i want to play video on [URL] which(video) is located in [URL] mysql

View 1 Replies

ActionScript 2.0 :: Make A Flash Movie That Would Allow The User To Control The Framerate Of The Movie?

Apr 11, 2006

I have to make a flash movie that would allow the user to control the framerate of the movie. Unfortunately I'm not that good with flash and I don't know how that could be done ..I thought about something like

"on(press){
movieclip.increaseframerate(*2);
}"

View 3 Replies

ActionScript 2.0 :: Get Data From Mysql Database And Post It To A Flash Movie Dynamically Without Refreshing Browser?

Dec 18, 2003

is it possible to get data from mysql database and post it to a flash movie dynamically without refreshing browser?

View 6 Replies

Media Server :: Connect With SQL Or MySQL?

Dec 30, 2009

how I connect with SQL or MySQL FMS3

View 1 Replies

Java Socket Server And MySQL

Oct 22, 2011

I'm writing socket server in java for my flash browser based game and i need to connect to mysql database. Is it possible to connect to mysql through socket server and send received data to connected flash clients?

View 1 Replies

Flash :: Let A User Open Xml-file (stored On Server)

Aug 14, 2009

i have some xml-files stored at a specific folder on my server.now i want the user to be able to choose one of those xml-files (best solution would be that he has to press a button and a "file browse"-dialog opens, which shows him the xml-files, which are stored on the server). what would be a good solution to implement this functionality?

View 1 Replies

ActionScript 3.0 :: Saving XML To The Server?

Dec 21, 2009

Im trying to save an xml file in the server, Im using the code of AS3 book. and here is the code as3 and php ,that suppositly save an xml file on the serve. but it dont work. i set te permition of the folder to 777  to allow writting. well i look at evrything and dont find the probleme at the error message it give :An error occurred when attempting to load the XML.Error #2032 (but it come from the book, it should work)?

[Code]....

View 6 Replies

Php :: Flex In Saving PDF At Server?

Jul 8, 2009

I am a new bee to flex. what i am trying to do is to generate and save the layout design which nothing but canvas to a pdf format at the server. Currently i am able to display the pdf in browser (see the function below:) but cannot save the file at the server.

private function continueToPdf():void{
myPDF = new PDF( Orientation.LANDSCAPE, Unit.MM, Size.A4 );
myPDF.setDisplayMode ( Display.FULL_WIDTH );
myPDF.addPage();

[Code]...

View 2 Replies

ActionScript 3.0 :: Saving Xml To Server

Nov 30, 2009

I have created an xml driven application with which the client is very happy. They currently use notepad/dw to create the xml files. They now want a "form" of some description to create the xml file to avoid writing tags and so on. I have had a good look around. There is some info about creating the xml itself in as3 (looks pretty easy), but very little about how to save that file to the clients server. I gather that the flash doesn't do this for security reasons?

My question is really this: would i be better using php to create the form for my user rather than flash as3. Or is it better to create in as3 and then append a little php to upload the doc? Or am I going abouit this the wrong way!

View 2 Replies

Media Server :: User ID In Flash Media Server Log Files?

May 13, 2010

We may be using Flash Media Server in an intranet only scenario. All users will be watching the videos from Windows boxes. Our users who are creating the videos want to track usage by user ID. Does the server log the client's user ID? Is that what c-client-id is? If c-client-id is used to store Windows user name do I need to turn on AD/windows authentication to get that info? I see that IP address is stored, but it would be simpler if the user Id were in the log file.

View 1 Replies

Media Server :: Add Php And Mysql To Fmis With Apache?

Aug 7, 2009

add php and mysql to fmis with apache?

View 1 Replies

Flash :: Media Server With Php - Allows The User To Record A Video Using Webcam

Jul 27, 2010

We want to build an application that allows the user to record a video using their webcam on our site using flash and save the URL in a database using PHP. So that we can allow the user to send the video's to other users etc. Also we want to offer the user the possibility to upload their movies (per mail and with PHP) and convert them to flash movies, can this also be done using Flash media server? (maybe in combination with AMFPHP)

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved