Actionscript Code:
function TrueOrFalse()
{
if (ButtonName.indexOf("True") != -1)
{
trace("This is a true answer");
}
else
{
trace("This is a false answer");
}
}
True_Apple.onPress = function()
{
ButtonName = this._name;
this.startDrag();
trace(ButtonName);
TrueOrFalse();
};
True_Apple.onRelease = function()
{
ButtonName = "";
stopDrag();
};
False_Apple.onPress = function()
{
ButtonName = this._name;
this.startDrag();
trace(ButtonName);
TrueOrFalse();
};
False_Apple.onRelease = function()
{
ButtonName = "";
stopDrag();
};