Fantasy soccer script problem

[FONT=Times New Roman][SIZE=3]I run a soccer fantasy league in which managers choose their team from a flash pitch linked to a list of players in a mysql database. They drag players from the list onto 11 places on the pitch and submit their team to the database. The players are listed in database columns which include their id number, their club (eg MUN for Man United, CHE for Chelsea) and their name.[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]There are three actionscripts attached to the three frames on the swf, one for loading the players from the database, another for moving them about and a third, I think, for submitting. The action script is 2.0.[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]I want the flash script to only allow managers to drag and drop a limit of two players from each club onto the pitch and into their team. If they try to drag a third player from the same club onto the pitch I want and error window to pop up stopping them from doing it.[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]I know a bit about flash design but little about actionscript. Would this be easy to do in the flash script?[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]Hope someone out there can give me a steer.[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]cheers[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]Mickey[/SIZE][/FONT]

you could use a javascript for alert message.
find this function on google, attach it in the html were the SWF file is.

then to run the java function from flash use
(were alrtmsg is the function name)
[AS]
getURL(“javascript:alertmsg(Cant drag more then 2 players”);
[/AS]

that sounds nice and simple… but how would the actionscript recognise whether the user had tried to drag a player onto the pitch that was from the same club as two players already selected?

[quote=Macsy;2327182]you could use a javascript for alert message.
find this function on google, attach it in the html were the SWF file is.

then to run the java function from flash use
(were alrtmsg is the function name)

ActionScript Code:
[LEFT]</p>
<p>getURL[COLOR=#000000]([/COLOR][COLOR=#ff0000]“javascript:alertmsg(Cant drag more then 2 players”[/COLOR][COLOR=#000000])[/COLOR];</p>
<p>
[/LEFT]

[/quote]

well, unless there allready are a function for ‘recognize if 2 players are from the same club’-script.
you will have to make it your self , depending on how your code is made.

and how should anybody of us know how your script is built? :slight_smile:

Hi

thanks anyway. I guess I’ll have to do some reading up about actionscript

cheers

mickey

[quote=Macsy;2327239]well, unless there allready are a function for ‘recognize if 2 players are from the same club’-script.
you will have to make it your self , depending on how your code is made.

and how should anybody of us know how your script is built? :)[/quote]