90 likes | 163 Views
Iphone Games with HTML5 and Java Script by Dr. Edwin F. Armstrong CGDC, July 15, 2010 http://tinyRealm.com/~efa/papers/ Or http://mars.umhb.edu/~efa/papers/. Use MobiOne to develop for Iphone in HTML5. Where to get it: http://www.genuitec.com/mobile/. Using MobiOne Test Center.
E N D
Iphone Games with HTML5 and Java Scriptby Dr. Edwin F. Armstrong CGDC, July 15, 2010 http://tinyRealm.com/~efa/papers/ Or http://mars.umhb.edu/~efa/papers/
Use MobiOne to develop for Iphone in HTML5 • Where to get it: • http://www.genuitec.com/mobile/
Using MobiOne Test Center • http://tinyrealm.com/~efa/iphone/
Running a MobiOne App. • http://tinyrealm.com/~efa/iphone/
What does HTML5 look like? • var color, border;// added (efa) 7/03/10 • function touch(e){ • dojo.forEach(e.changedTouches, function(e){ • //var color, border;// removed (efa) 7/03/10 • var target = e.target; • if(target == nodes.green || target == nodes.blue || target == nodes.red){ • // Change the color based on whatever's been changed in the touch start • color = target.id;ports == 0)
}else if(target == nodes.solid || target == nodes.dashed || target == nodes.dotted){ • // Change the border based on whatever's been changed in the touch start • border = target.id; • }else if(target == nodes.item && !dragging){ • // Save the offset of the touch within the current note • dragging = [e.pageX - dojo.style(nodes.item, "left"), e.pageY - dojo.style(nodes.item, "top")]; • }
}else if(target == nodes.solid || target == nodes.dashed || target == nodes.dotted){ • // Change the border based on whatever's been changed in the touch start • border = target.id; • }else if(target == nodes.item && !dragging){ • // Save the offset of the touch within the current note • dragging = [e.pageX - dojo.style(nodes.item, "left"), e.pageY - dojo.style(nodes.item, "top")]; • }
if(color){ • dojo.style(nodes.item, "backgroundColor", color); • }else if(border){ • dojo.style(nodes.item, "border", "3px " + border + " black"); • dojo.style(nodes.item, "border"); // Random Safari bug where I have to read style for it to "take" • } • }); //end of function
Thank you • I had fun putting together this talk. Can I answer any questions? • Reminders: Where to get MobiOne: http://www.genuitec.com/mobile/ Where to get this presentation: http://tinyrealm.com/~efa/papers/ Or http://mars.umhb.edu/~efa/papers/