|
|
|
#1 |
|
Junior Member
Join Date: Feb 2007
Posts: 6
|
[F8] What scripting should I use?
I have designed a face model in flash so the user can place sunglasses on, the user can then undo this action and place another pair of sunglasses on.
The only problem is, when a pair of sunglasses are placed on, the user can still place other sunglasess on top of the current pair and they stack up, which looks bad. Here is the scripting I have used, I have done the scripting for the undo button on a seperate layer to the rest of the actionscript. Basically I am using the coordinates to move the sunglasses back and from the face model and then to its previous postion. How can I script this so the user can only place one pair of sunglasses on the model at a time? I have attached a screenshot of the application so you can get a more clear idea. Undo button scripting: arnette_mc.onRelease = function(){ arnette_mc._x =81.9; arnette_mc._y =248.5; } oakley_mc.onRelease = function(){ oakley_mc._x =82.3; oakley_mc._y =253.7; } mauirijim_mc.onRelease = function(){ mauirijim_mc._x =79.5; mauirijim_mc._y =254.2; } DG_mc.onRelease = function(){ DG_mc._x =78.5 DG_mc._y =256.1; } bb_mc.onRelease = function(){ bb_mc._x =78.8; bb_mc._y =252.8; } Action script for placing sunglasses on the model: arnette_mc.onRelease = function(){ arnette_mc._x =81.9; arnette_mc._y =248.5; } oakley_mc.onRelease = function(){ oakley_mc._x =82.3; oakley_mc._y =253.7; } mauirijim_mc.onRelease = function(){ mauirijim_mc._x =79.5; mauirijim_mc._y =254.2; } DG_mc.onRelease = function(){ DG_mc._x =78.5 DG_mc._y =256.1; } bb_mc.onRelease = function(){ bb_mc._x =78.8; bb_mc._y =252.8; } |
|
|
|
|
|
#2 |
|
For the love of ~GIMP~
Join Date: Sep 2006
Posts: 2,152
|
if statement that says something like if the sunglasses are at the _x _y (point_coordianties and those _x _y(point) coordiantes are within the model's face area then the other sunglasses cannot be dragged .
__________________
~calmchess~ |
|
|
|
![]() |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|