PDA

View Full Version : animations and php


superramesh
12-06-2001, 04:28 AM
hi there,

So I have a simple problem (I think) and need you all to help!

I have a screen with several buttons on it, one in the center and 10 or so on the periphery.

When the center button is clicked, it triggers a quicktime movie, which I already have working.

However, what I want to have happen is when a peripheral button is clicked, it moves to the center, and a number of new buttons are instantiated based on a database call, etc.

I have all these buttons as diff instances of the same symbol, but the key is that I only want the movie to trigger when the center button is pressed and with a periphery button i want it to move into the center and become the focus button. I want this movement to be elegant and dynamic, and I also want when this move happens to make a php call to a MySQL database?

Can anyone help me out? How do I even start to approach this problem? Any sample code out there that can give me an essence?

thanks a lot!

pls let me know
ramesh

IFZen
12-06-2001, 02:53 PM
use some variables to stock your informations like :

_root._centeredClip that will refer to the clip placed on the center of your scene

then in your buttons, test the value of that variable to know if you can trigger your movie and you server call :


on(release) {
if (_root._centeredClip == this) {

// perform here your db call and you movie playing

} else {

// now signal that no one button is considered
// as the centered one (to prevent clicks during the
// buttons mouvements)

_root._centeredClip = null;

// launch here your buttons mouvements
// at the end of the mouvements assign the reference of
// this button to the _root._centeredClip variable

}
}


Hope it helps,
BZen