I am trying to create a behaviour that when the movie is playing the user clicks the sprite and the number of points will be added to the the global variable called
'points' which contains the player's current score. Also, an alert box should appear with a message telling the user how many points scored. But i keep getting the message "Script error: handler definition
expected" Behaviour------------------------?
Do i need to edit anything ?
---------------------------point scoring
behaviour--------------------------------------
global points
property pointsForThisSprite
on mouseup me
points = points + pointsForThisSprite
alert("You scored "&pointsForThisSprite&" points!")
end
on getPropertyDescriptionList me
pdlist = [:]
pdef = [#comment: "Number of points for this sprite", #format:#integer,
#default: 0]
addprop pdlist,#pointsForThisSprite,pdef
return pdlist
end
----------------------------------------------------------------------------------------
'points' which contains the player's current score. Also, an alert box should appear with a message telling the user how many points scored. But i keep getting the message "Script error: handler definition
expected" Behaviour------------------------?
Do i need to edit anything ?
---------------------------point scoring
behaviour--------------------------------------
global points
property pointsForThisSprite
on mouseup me
points = points + pointsForThisSprite
alert("You scored "&pointsForThisSprite&" points!")
end
on getPropertyDescriptionList me
pdlist = [:]
pdef = [#comment: "Number of points for this sprite", #format:#integer,
#default: 0]
addprop pdlist,#pointsForThisSprite,pdef
return pdlist
end
----------------------------------------------------------------------------------------