Groups
Groups
Sign in
Groups
Groups
enchant.js User Group
Conversations
About
Send feedback
Help
.addEventListener(Event.ENTER_FRAME vs .onenterframe ?
38 views
Skip to first unread message
vmars316
unread,
Apr 28, 2013, 7:21:49 PM
4/28/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to enchantjs-...@googlegroups.com
Hello & Thanks ,
In my code I use :
sprite1.addEventListener(Event.ENTER_FRAME, function()
{
my code here.......
}
with no
"
sprite1.onenterframe = function() { "
So , It appears that "
.onenterframe
" is unnecessary .
Are there any
complication
s doing it this way ?
Thanks..vm
sidestepism
unread,
Apr 30, 2013, 4:05:13 AM
4/30/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to enchantjs-...@googlegroups.com
A.
sprite
.
onenterframe
= function
(
) {...}
This has the same meaning in semantics as:
B.
sprite1.addEventListener
(
Event.ENTER_FRAME,
You can multiple event listener with B, but A is a quick way to set a single listener.
enchant.js refer to DOM Event, and it support both ways.
Reply all
Reply to author
Forward
0 new messages