James Hancock
asked on
How should I register clicks/touches for multiple images in the same location?
Hi
I'd like my Javascript phone game to be able to click or touch rectangular objects. The objects will display various different images.
I think it might not be best to register each separate image for interaction, but maybe location coordinates?
Could I make a carrier object where I just change the image displayed in the carrier object? and just register that carrier object for clicks or touch.
I'd display n images / carriers even spaced across the phone/tablet/comp screen for interactions.
I think I saw I a way to enableInteractions on an Object
Id add( up to 100 images) for the gameplay's needs.
Suggestions welcome
Thanks
I'd like my Javascript phone game to be able to click or touch rectangular objects. The objects will display various different images.
I think it might not be best to register each separate image for interaction, but maybe location coordinates?
Could I make a carrier object where I just change the image displayed in the carrier object? and just register that carrier object for clicks or touch.
I'd display n images / carriers even spaced across the phone/tablet/comp screen for interactions.
I think I saw I a way to enableInteractions on an Object
Id add( up to 100 images) for the gameplay's needs.
Suggestions welcome
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks
Building up nicely...Do u use brackets for your javascript dev?
Building up nicely...Do u use brackets for your javascript dev?
I don't understand your last question
ASKER
I don’t like brackets for JavaScript as much as I do Eclipse for java or visual studio for C.
Which IDE do U prefer for JavaScript?
Thanks
Should I reassess the situation?
Which IDE do U prefer for JavaScript?
Thanks
Should I reassess the situation?
ASKER
Thanks
ASKER
When I extract the sprites from the JSON file that contains them, are those image sprites the objects as are needed, or are they incorrect?
A JSON file should store them and extract them as they were.
Then I can add events to them as you outlined?
Thanks