PDA

View Full Version : could this work?


chaudiovisual
07-03-2009, 01:42 AM
Hi everyone,

I am undergoing a huge flash project at the moment and as wondering whether or not an approach would work for something. Basically everything in the project involves loading data and movie clips dynamically in certain arrangements etc. I have built everything already bar a couple of things to create demos including dynamically loading mcs from the library etc all with as3, but now I am moving on to loading data dynamically and before I immerse myself completely I was wondering whether or not something is possible. Basically as I mouse over an mc i want a couple of things to come up which would be held in a database, such as a question and an answer, but this data will change quite frequently when the demo is up and running, is it possible for the data to be updated in the dynamic text boxes without mousing out and mousing over again? That is one of my concerns ( I have a couple :) ).

I had thought of maybe using a timer to query the database every 2 to 3 minutes and use php and mysql with as3 to then load the data into the text boxes, hopefully without having to mouseover the mc again and simply leaving the cursor over the mc the whole time. My main concern is whether or not I can query the database on a regular basis... using a timer method as described above, or is this simply stagnant data? i.e. can i use php and mysql in as3 to continuously query a database?

Thank you in advance for any help you can offer me,
Conor

chaudiovisual
07-03-2009, 01:45 AM
In case it helps the data I am hoping to load from a database is:

the colour of the mc (in hex)
the name of the mc (another dynamic text box holds this data)
a number id for the mc
a question
and an answer

/Conor

Wispa
07-03-2009, 04:31 PM
In theory it would work as you'd expect.

My first thought is, what happens if the user has just entered the correct answer for that question and submits the answer at the same time as the information in the database is updated and refreshed within Flash. Wouldn't this result in submitting the incorrect answer? Could be quite annoying for the user.

Depending on the amount of data being passed back and forth to the server, could have an impact on performance but that would be pretty much dependant on the environment