how to get the image from canvas and add event on that image

Get help using Construct 2

Post » Fri May 23, 2014 11:53 am

Any One can you told me how to get the image from canvas and add event on that image

means

[
"t2",
cr.plugins_.Sprite,
false,
[],
0,
0,
null,
[
[
"Default",
5,
false,
1,
0,
false,
6056448206965757,
[
["images/sprite2-sheet0.png", 155, 0, 0, 250, 250, 1, 0.5, 0.5,[],[],1]
]
]
],
[
],
false,
false,
1137731541052407,
[],
null
]
, [
"t3",
cr.plugins_.Touch,
false,
[],
0,
0,
null,
null,
[
],
false,
false,
8636152857696988,
[],
null
,[1]
]
, [
"t4",
cr.plugins_.Sprite,
false,
[],
1,
0,
null,
[
[
"Default",
5,
false,
1,
0,
false,
9050402499563591,
[
["images/sprite-sheet0.png", 155, 0, 0, 250, 250, 1, 0.5, 0.5,[],[],1]
]
]
],
[
[
"Sine",
cr.behaviors.Sin,
8447855769118502
]
],
false,
false,
1421800220649511,
[],
null
]

in this array I have two images...

and want to add touch alert event on "sprite2-sheet0.png" object so can you tell me how to add addEventListener js on that images
B
12
S
2
G
3
Posts: 57
Reputation: 3,439

Post » Fri May 23, 2014 12:08 pm

@rob

Why are you posting the same thing multiple times in the wrong section?
If your vision so exceeds your ability, then look to something closer.
Moderator
B
136
S
31
G
86
Posts: 5,486
Reputation: 59,758

Post » Fri May 23, 2014 12:21 pm

@zenox98
COZ its urgent and no one know the answer of this question
do you have any idea ?
B
12
S
2
G
3
Posts: 57
Reputation: 3,439

Post » Fri May 23, 2014 6:18 pm

Don't post the same thing in multiple threads, and don't post in unrelated topics. Posting an unrelated problem in another thread is more likely for your problem to be missed. Just start a thread in the how do I section instead next time (I've already split this topic there).

Also, even if it's urgent, you need to wait more than a few minutes before expecting a response, more like a few hours, at which point you can bump your thread rather than starting a new one.
Moderator
B
95
S
34
G
33
Posts: 3,007
Reputation: 27,876

Post » Fri May 23, 2014 6:26 pm

More importantly what does that jibberish have to do with adding an event on touch?
Surely op isn't trying to code in the C2 runtime.
Image ImageImage
B
170
S
50
G
179
Posts: 8,379
Reputation: 113,427

Post » Sat May 24, 2014 4:18 am

@Arima,

I Got your point but its urgent and no body know the ans so I m asking in here sorry for multiple threads but did u know the ans of this question..

yes its c2rutime.js code where touch event is working fine but I have a another js file where i want to add the c2rutime.js for touch event . I wanaa to add addEventListener in single image so can you tell me how can i do..............
B
12
S
2
G
3
Posts: 57
Reputation: 3,439


Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider], dop2000, nez05, Yahoo [Bot] and 35 guests