SlideShare a Scribd company logo
Flash Lite & Touch: build an “iPhone-Like” dynamic list Leonardo Risuleo mobile developer/designer http://mobile.actionscript.it/ http://www.scriptamanentgroup.net/byte/ Mobile Dev Day, March 6th 2009 - Rome
Touchscreen  Devices “ A touchscreen is a display which can detect the presence and location of a touch within the display area…”
Many devices, many touchscreen technologies… Resistive Surface acoustic wave Capacitive Projected Capacitance  Optical Others… Not all touchscreen technologies are suitable for all applications.
Gestural interfaces: new ways of interactions The best gestural interfaces need to be discoverable: how can I activate? what are the controls? Tap, drag, pinch, spread, slide…
Coherence and consistency with platform React to system’s events (incoming call, low battery, orientation change…) React to environment (day/night contrast, noise…)  Examine possible use cases Define UI design focusing on input type Usability & functionality
Flash Lite & Touch Flash Lite definitely supports touchscreen! In Flash Lite 1.x: we can use buttons to detect touch screen presses/releases… trackAsMenu  and  System.capabilities.hasStylus  not supported
In Flash Lite 2.x and 3.x: we can use buttons to detect touch screen presses/releases… trackAsMenu  and  System.capabilities.hasStylus  supported we can locate exact position  _xmouse, _ymouse Mouse  object is supported providing proper events:  onMouseDown, onMouseUp, onMouseMove
Build an “iPhone-Like” dynamic list
Layout considerations Display dimension and orientation Good contrast and clear focus Hit areas large enough for fingers support 2 hand control Intuitive use and navigation
List navigation and input detection Discard use of buttons for advanced control Use buttons just for simple task (es. softkey) Define separate listeners to handle mouse events Define the scrollable area Implement selection and slide scrolling Use  EventDispatcher  to dispatch events
// Attaching actions for touch softkey top_bottom.exit_b.trackAsMenu = true; top_bottom.exit_b.onRelease = function() { // Quit command fscommand2("Quit"); }; Use buttons just for simple task:
// Assign listener functions _downListener.onMouseDown = Delegate.create(this, handleMouseDown); _upListener.onMouseUp = Delegate.create(this, handleMouseUp); _moveListener.onMouseMove = Delegate.create(this, handleMouseMove); // Initialize just down listener Mouse.addListener(_downListener); Define separate listeners to handle mouse events:
private function handleMouseDown():Void { if (_xmouse < _theX || _xmouse > (_theX + _theHeight)  || _ymouse < _theY || _ymouse > (_theY + _theHeight))  { // Tap outside the scrollable area return; } // Add up / move listeners Mouse.addListener(_moveListener); Mouse.addListener(_upListener); Define scrollable area:
private function handleMouseMove():Void { var totalY:Number = _ymouse - firstPos_y; if (Math.abs(totalY) > scrollFactorY) isDragging = true; if (isDragging) { // move content } ... Implement slide scrolling:
private function handleMouseUp():Void { // Remove listeners Mouse.removeListener(_moveListener); Mouse.removeListener(_upListener); if (isDragging) { // Enterframe initialization for animation _content.onEnterFrame = Delegate.create(this, handleEnterFrame); ... Implement slide scrolling:
// Initialize EventDispatcher EventDispatcher.initialize(this); // EventDispatcher methods public function addEventListener (type : String, obj : Object) : Void { } public function removeEventListener (type : String, obj : Object) : Void  { } private function dispatchEvent (event : Object) : Void { } Use EventDispatcher to dispatch events…
dispatchEvent( { type:TAP_EVENT, target:this, position:getPosition() } ); myTouch.addEventListener( TouchScreen.tapEvent, onTap ); function onTap(evt:Object):Void { var absoluteY:Number = Math.round(evt.position ... ); var iter:Number = Math.floor(absoluteY / off_set); var itemIter:Number = iter + firstCount; ... _items[iter].activate(); … and select the right item to focus:
Performance considerations Consider and test both vectors and bitmaps Vector gradients, alphas, and curves to a minimum One or two simultaneous animations on the screen Avoid long actionscript loops Use one single onEnterFrame: just one main loop that takes care of the various operations to carry on
Conclusions: questions… Flash Lite CAN be used for touch-enabled casual games and applications Flash Lite 2.x more complete and powerful API Easy & fun to implement Fast prototyping
Thank you!

More Related Content

PPTX
Scratching the Surface with JavaFX
PPTX
Keyboard and mouse events in python
PDF
アプリを弄ってみる #2 #antama_ws
PPTX
What is Event
PDF
Vrhig v1
PDF
Ajp notes-chapter-03
PDF
Getting touchy - an introduction to touch and pointer events / Future of Web ...
PDF
Ms Ajax Dom Event Class
Scratching the Surface with JavaFX
Keyboard and mouse events in python
アプリを弄ってみる #2 #antama_ws
What is Event
Vrhig v1
Ajp notes-chapter-03
Getting touchy - an introduction to touch and pointer events / Future of Web ...
Ms Ajax Dom Event Class

Viewers also liked (20)

PDF
2015デブサミ PLENを色んなセンサーで扱ってみた
PDF
Small Screen Design (introduction)
PDF
chubb Supplementary Investor Information9489
PDF
Executive Summary Tcnl. May.2008
PPT
Untitled
PDF
oneok 2004 Proxy Statement
PDF
chubb 8085 Supplementary Investor Information
PDF
chubb3671 Supplementary Investor Information
DOC
Lesson plan
PDF
oneok 2001 Annual Report
PDF
sun 10k 08
PDF
Nicole Miller Logo Identity
PDF
Ido Green - YQL demo
PPT
Manual PbWiki Comed2009
PPT
PresentacióN2
PDF
房研【深度】第一期
PDF
Opac Guide [MALAY]
PDF
Textos Vol.10(2) Unal
PDF
AES 110206
PDF
Esp2009
2015デブサミ PLENを色んなセンサーで扱ってみた
Small Screen Design (introduction)
chubb Supplementary Investor Information9489
Executive Summary Tcnl. May.2008
Untitled
oneok 2004 Proxy Statement
chubb 8085 Supplementary Investor Information
chubb3671 Supplementary Investor Information
Lesson plan
oneok 2001 Annual Report
sun 10k 08
Nicole Miller Logo Identity
Ido Green - YQL demo
Manual PbWiki Comed2009
PresentacióN2
房研【深度】第一期
Opac Guide [MALAY]
Textos Vol.10(2) Unal
AES 110206
Esp2009
Ad

Similar to Flash Lite & Touch: build an iPhone-like dynamic list (20)

PDF
Getting touchy - an introduction to touch events / Web Standards Days / Mosco...
PPT
JAVA (CHAPTER 1 EXCEPTION HANDLING) NOTES -PPT
PPT
java - topic (event handling notes )1.ppt
PPT
Multi Touch And Gesture Event Interface And Types
PDF
Event Handling in Java as per university
PDF
Getting touchy - an introduction to touch and pointer events / TPAC 2016 / Li...
PDF
Getting touchy - an introduction to touch events / Sud Web / Avignon 17.05.2013
PDF
java-programming GUI- Event Handling.pdf
PPTX
Event handling
PPTX
Event Handling PRESENTATION AND PROGRAMMING
PPTX
Mobile Application Development class 005
PDF
Session 12 - Overview of taps, multitouch, and gestures
PPT
Event handling63
PPT
PPT
PDF
Automate Mobile Gestures in Appium_ A Detailed Guide for Developers.pdf
PDF
Touchevents
PDF
The touch events
PDF
Getting touchy - an introduction to touch events / Sainté Mobile Days / Saint...
PPT
Unit 5.133333333333333333333333333333333.ppt
Getting touchy - an introduction to touch events / Web Standards Days / Mosco...
JAVA (CHAPTER 1 EXCEPTION HANDLING) NOTES -PPT
java - topic (event handling notes )1.ppt
Multi Touch And Gesture Event Interface And Types
Event Handling in Java as per university
Getting touchy - an introduction to touch and pointer events / TPAC 2016 / Li...
Getting touchy - an introduction to touch events / Sud Web / Avignon 17.05.2013
java-programming GUI- Event Handling.pdf
Event handling
Event Handling PRESENTATION AND PROGRAMMING
Mobile Application Development class 005
Session 12 - Overview of taps, multitouch, and gestures
Event handling63
Automate Mobile Gestures in Appium_ A Detailed Guide for Developers.pdf
Touchevents
The touch events
Getting touchy - an introduction to touch events / Sainté Mobile Days / Saint...
Unit 5.133333333333333333333333333333333.ppt
Ad

Recently uploaded (20)

PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Big Data Technologies - Introduction.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
cuic standard and advanced reporting.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Electronic commerce courselecture one. Pdf
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Encapsulation theory and applications.pdf
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Machine learning based COVID-19 study performance prediction
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPT
Teaching material agriculture food technology
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Big Data Technologies - Introduction.pptx
Network Security Unit 5.pdf for BCA BBA.
Review of recent advances in non-invasive hemoglobin estimation
cuic standard and advanced reporting.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Electronic commerce courselecture one. Pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
sap open course for s4hana steps from ECC to s4
Encapsulation theory and applications.pdf
Assigned Numbers - 2025 - Bluetooth® Document
The Rise and Fall of 3GPP – Time for a Sabbatical?
NewMind AI Weekly Chronicles - August'25-Week II
Digital-Transformation-Roadmap-for-Companies.pptx
Machine learning based COVID-19 study performance prediction
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Teaching material agriculture food technology

Flash Lite & Touch: build an iPhone-like dynamic list

  • 1. Flash Lite & Touch: build an “iPhone-Like” dynamic list Leonardo Risuleo mobile developer/designer http://mobile.actionscript.it/ http://www.scriptamanentgroup.net/byte/ Mobile Dev Day, March 6th 2009 - Rome
  • 2. Touchscreen Devices “ A touchscreen is a display which can detect the presence and location of a touch within the display area…”
  • 3. Many devices, many touchscreen technologies… Resistive Surface acoustic wave Capacitive Projected Capacitance Optical Others… Not all touchscreen technologies are suitable for all applications.
  • 4. Gestural interfaces: new ways of interactions The best gestural interfaces need to be discoverable: how can I activate? what are the controls? Tap, drag, pinch, spread, slide…
  • 5. Coherence and consistency with platform React to system’s events (incoming call, low battery, orientation change…) React to environment (day/night contrast, noise…) Examine possible use cases Define UI design focusing on input type Usability & functionality
  • 6. Flash Lite & Touch Flash Lite definitely supports touchscreen! In Flash Lite 1.x: we can use buttons to detect touch screen presses/releases… trackAsMenu and System.capabilities.hasStylus not supported
  • 7. In Flash Lite 2.x and 3.x: we can use buttons to detect touch screen presses/releases… trackAsMenu and System.capabilities.hasStylus supported we can locate exact position _xmouse, _ymouse Mouse object is supported providing proper events: onMouseDown, onMouseUp, onMouseMove
  • 9. Layout considerations Display dimension and orientation Good contrast and clear focus Hit areas large enough for fingers support 2 hand control Intuitive use and navigation
  • 10. List navigation and input detection Discard use of buttons for advanced control Use buttons just for simple task (es. softkey) Define separate listeners to handle mouse events Define the scrollable area Implement selection and slide scrolling Use EventDispatcher to dispatch events
  • 11. // Attaching actions for touch softkey top_bottom.exit_b.trackAsMenu = true; top_bottom.exit_b.onRelease = function() { // Quit command fscommand2(&quot;Quit&quot;); }; Use buttons just for simple task:
  • 12. // Assign listener functions _downListener.onMouseDown = Delegate.create(this, handleMouseDown); _upListener.onMouseUp = Delegate.create(this, handleMouseUp); _moveListener.onMouseMove = Delegate.create(this, handleMouseMove); // Initialize just down listener Mouse.addListener(_downListener); Define separate listeners to handle mouse events:
  • 13. private function handleMouseDown():Void { if (_xmouse < _theX || _xmouse > (_theX + _theHeight) || _ymouse < _theY || _ymouse > (_theY + _theHeight)) { // Tap outside the scrollable area return; } // Add up / move listeners Mouse.addListener(_moveListener); Mouse.addListener(_upListener); Define scrollable area:
  • 14. private function handleMouseMove():Void { var totalY:Number = _ymouse - firstPos_y; if (Math.abs(totalY) > scrollFactorY) isDragging = true; if (isDragging) { // move content } ... Implement slide scrolling:
  • 15. private function handleMouseUp():Void { // Remove listeners Mouse.removeListener(_moveListener); Mouse.removeListener(_upListener); if (isDragging) { // Enterframe initialization for animation _content.onEnterFrame = Delegate.create(this, handleEnterFrame); ... Implement slide scrolling:
  • 16. // Initialize EventDispatcher EventDispatcher.initialize(this); // EventDispatcher methods public function addEventListener (type : String, obj : Object) : Void { } public function removeEventListener (type : String, obj : Object) : Void { } private function dispatchEvent (event : Object) : Void { } Use EventDispatcher to dispatch events…
  • 17. dispatchEvent( { type:TAP_EVENT, target:this, position:getPosition() } ); myTouch.addEventListener( TouchScreen.tapEvent, onTap ); function onTap(evt:Object):Void { var absoluteY:Number = Math.round(evt.position ... ); var iter:Number = Math.floor(absoluteY / off_set); var itemIter:Number = iter + firstCount; ... _items[iter].activate(); … and select the right item to focus:
  • 18. Performance considerations Consider and test both vectors and bitmaps Vector gradients, alphas, and curves to a minimum One or two simultaneous animations on the screen Avoid long actionscript loops Use one single onEnterFrame: just one main loop that takes care of the various operations to carry on
  • 19. Conclusions: questions… Flash Lite CAN be used for touch-enabled casual games and applications Flash Lite 2.x more complete and powerful API Easy & fun to implement Fast prototyping