Click here to Skip to main content
15,890,186 members
Home / Discussions / JavaScript
   

JavaScript

 
GeneralRe: mouseout isn't firing Pin
ThetaClear30-Jun-14 1:26
ThetaClear30-Jun-14 1:26 
GeneralRe: mouseout isn't firing Pin
ThetaClear30-Jun-14 3:38
ThetaClear30-Jun-14 3:38 
AnswerRe: mouseout isn't firing Pin
Kornfeld Eliyahu Peter30-Jun-14 3:43
professionalKornfeld Eliyahu Peter30-Jun-14 3:43 
GeneralRe: mouseout isn't firing Pin
ThetaClear30-Jun-14 4:22
ThetaClear30-Jun-14 4:22 
GeneralRe: mouseout isn't firing Pin
Kornfeld Eliyahu Peter30-Jun-14 7:11
professionalKornfeld Eliyahu Peter30-Jun-14 7:11 
AnswerRe: mouseout isn't firing Pin
User 483504730-Jun-14 8:41
User 483504730-Jun-14 8:41 
AnswerRe: mouseout isn't firing Pin
Kornfeld Eliyahu Peter30-Jun-14 9:21
professionalKornfeld Eliyahu Peter30-Jun-14 9:21 
GeneralRe: mouseout isn't firing Pin
User 483504730-Jun-14 9:49
User 483504730-Jun-14 9:49 
Right, well, this seems to work as requested:
var stage = null;
var sh = new createjs.Shape();

$(document).ready(function(){
var canvas = document.getElementsByTagName("canvas")[0];
var context = canvas.getContext("2d");
stage = new createjs.Stage(canvas);
// main stage surface
stage.enableMouseOver();
drawInitialShape();
});

function drawInitialShape(){
var cont = new createjs.Container();
stage.addChild(cont);

sh.graphics.beginFill('#FF0000').drawRoundRect(0, 0, 20, 20, 1.5);
sh.x = 150;
sh.y = 150;
cont.addChild(sh);
stage.addChild(cont);

sh.addEventListener('mouseover', function(e){
onSeatMouseOver(e);
});

sh.addEventListener('mouseout', function (e) {
onSeatMouseOut(e);
});

stage.update();
}


var onSeatMouseOver = function (e) {
$('body').css('cursor', 'pointer');

sh.graphics.beginFill('#dddddd').drawRoundRect(0, 0, 20, 20, 1.5);
stage.update();
}

var onSeatMouseOut = function (e) {
$('body').css('cursor', 'auto');

sh.graphics.beginFill('#FF0000').drawRoundRect(0, 0, 20, 20, 1.5);

stage.update();
}

modified 20-Oct-19 21:02pm.

AnswerRe: mouseout isn't firing Pin
Kornfeld Eliyahu Peter30-Jun-14 9:58
professionalKornfeld Eliyahu Peter30-Jun-14 9:58 
GeneralRe: mouseout isn't firing Pin
ThetaClear1-Jul-14 1:10
ThetaClear1-Jul-14 1:10 
AnswerRe: mouseout isn't firing Pin
DecompileCodex18-Jul-14 21:19
DecompileCodex18-Jul-14 21:19 
QuestionS code to have an image with different clickable points that play sound Pin
Jennifer Estrada26-Jun-14 13:27
Jennifer Estrada26-Jun-14 13:27 
AnswerRe: S code to have an image with different clickable points that play sound Pin
Kornfeld Eliyahu Peter29-Jun-14 1:50
professionalKornfeld Eliyahu Peter29-Jun-14 1:50 
Questiondevextreme mobile apps call webmethod return only html source code Pin
Member 938843524-Jun-14 16:29
Member 938843524-Jun-14 16:29 
QuestionI am having problem invoking form fields from my js. Any ideas? Pin
samflex24-Jun-14 4:32
samflex24-Jun-14 4:32 
AnswerRe: I am having problem invoking form fields from my js. Any ideas? Pin
Pablo Estrada24-Jun-14 4:57
Pablo Estrada24-Jun-14 4:57 
GeneralRe: I am having problem invoking form fields from my js. Any ideas? Pin
samflex24-Jun-14 5:11
samflex24-Jun-14 5:11 
GeneralRe: I am having problem invoking form fields from my js. Any ideas? Pin
Pablo Estrada30-Jun-14 7:01
Pablo Estrada30-Jun-14 7:01 
Questionproblem to enter to fullscreen mode when playing video using addEventListener Pin
Asaf Shay21-Jun-14 22:25
Asaf Shay21-Jun-14 22:25 
QuestionJavascript code to automatically check the checkbox of duplicate record in gridView Pin
Member 1048440017-Jun-14 20:41
Member 1048440017-Jun-14 20:41 
AnswerRe: Javascript code to automatically check the checkbox of duplicate record in gridView Pin
Raviranjan_Kumar_Sinha18-Jun-14 1:30
Raviranjan_Kumar_Sinha18-Jun-14 1:30 
QuestionJavascript Regex validation Pin
Arunkumar.Koloth9-Jun-14 19:36
Arunkumar.Koloth9-Jun-14 19:36 
AnswerRe: Javascript Regex validation Pin
Kornfeld Eliyahu Peter9-Jun-14 23:14
professionalKornfeld Eliyahu Peter9-Jun-14 23:14 
GeneralRe: Javascript Regex validation Pin
Arunkumar.Koloth9-Jun-14 23:25
Arunkumar.Koloth9-Jun-14 23:25 
AnswerRe: Javascript Regex validation Pin
Kornfeld Eliyahu Peter9-Jun-14 23:42
professionalKornfeld Eliyahu Peter9-Jun-14 23:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.