Back to about 1996, the web was relatively young and people were looking for a tool to help make website animated and vibrant. FutureSplash was invented, mentioned as a simple way to add vector-based animation and release it on sites through Macromedia’s Shockwave player. Macromedia itself soon acquired FutureSplash Animator and re-dubbed it Macromedia Flash. As the years went on, Flash evolved, its capabilities increased and spread across computers all over the world. In 2000, Macromedia added Actionscript 1.0 a way to edit and manipulate objects with a programming language rather than only using the timeline animation. In 2005, Actionscript 2.0 started to shift the idea of programming to an object oriented programming model rather than a straight forward syntax. In 2007, Adobe acquires the rights to Macromedia, including Flash which is released as Adobe Flash CS3. Adobe adds a fully revised version of the last version of Actionscript and labels this one 3.0 [1].
By now, Flash is one of the most powerful tools in a web designer’s arsenal, but it no longer stops at the web. Because of new coding platforms, namely Adobe Flex and Adobe AIR, developers can use Actionscript 3.0 to create cross-platform desktop applications. And now, Flash can be used to create multi-touch applications via communication with a computer vision and multi-touch sensing application, such as Touchlib, CCV and reacTIVision.
2.5.1 Opening the Lines of Communication
Before we start developing applications in Flash, it’s important to understand the flow of information from the multi-touch sensing applications. When you open the applications it’s all prepared to start transmitting the blob information for any application that can read it using Tangible UI Object protocol (TUIO). However, Flash doesn’t understand the blob data right away. Why is this? “TUIO is a very simple UDP-based protocol. So if you wish to create responsive applications using Adobe Flash Professional or ActionScript 3.0, you need to have a bridge that reads this UDP socket and converts it to a TCP connection.” [2]
So what can make a UDP to TCP connection? Flash OSC can. [3] It makes the bridge we need between Touchlib and Flash so that you can create multi-touch Flash applications.
After your Flash file’s properties are adjusted, there is one more piece to add to it. Find the Document Class property and type in app.demo.MyTouchApp.MyFirstApp this is the Flash file’s connection to the MyFirstApp.as file.
There’s only one last thing to do, right now the Flash file is empty, and the way TUIO works, there needs to be something on the stage for it to recognize that a user is touching the screen. All we need to do now is put a Shape over the stage. So use the Rectangle Tool and cover the entire stage area. And set your color, in Flash CS3, you can even chance the alpha to be fully transparent. TUIO will still be able to recognize the shape and react to it.
Now it’s time to run a test movie. In the Control drop down.
This is to verify that the Flash file and the Actionscript file are in sync. So long as you don’t get any errors, you should see an empty Flash movie and the output panel will pop up and read “MyFirstApp Loaded”.
[1] Adobe Flash, Wikipedia entry. http://en.wikipedia.org/wiki/Adobe_Flash
[2] “Flash for surface computing” by Manvesh Vyas
[3] flosc: Flash Open Sound Control http://www.benchun.net/flosc/
[4] Migrating from ActionScript 2.0 to ActionScript 3.0: Key concepts and changes by Dan Carr
[5] AS3: Dictionary Object by Grant Skinner
댓글 없음:
댓글 쓰기