Top of this page
Skip navigation, go straight to the content

Flash

Introduction

Macromedia Flash is the ideal choice if you want to create prototypes that include audio, video and some intelligence in a short period of time. The simple drag & drop interface and time-line make creating a graphical scene quite easy. At the same time, the ActionScrip 2.0 programming language that forms the backbone of flash, enables you to add intelligence to your programs.

In contrast to popular belief, ActionScript 2.0 is no longer the simple and limited scripting language for dummies. Nowadays, ActionScript supports object oriented programming, inheritance and many other powerful features that have been associated with languages like Java, C++ and C#. Although, Flash is not supported by assignments yet, different Flash trainings are offered in the domains.

 

Installation [top]

In order to use phidgets in Flash you have to install the following software (Note: only the versions listed below are supported by TU/e experts and coaches!)::

  • Macromedia Studio 8
    This is the actual program that is used for programming your phidget applications (You can install the complete package, or only install the flash component that is required!!)
    Note: you need to be logged in to the TU/e network to access the installation files of Macromedia Studio.
    Note: the link might not work students from other departments than Industrial Design. If you experience problems, first try installing direclty from \\campusmp\Software\macromed\Studio\8. If this also doesn't solve the problem contact idPhidgetSupport or pick up an install CD-ROM at HG2.59 (Loy Rovers). 
  • Phidget drivers and PhidgetWebService
    [Last Revision Date: May 26, 2006, Phidget.DLL version 2.0.8, Phidget20.DLL version 1.0.6]
    Installs libraries on your Windows 2000 or XP computer. This includes the COM Library, C API Library, .NET Library, and the PhidgetWebService. Adds a program to your system tray where you can configure you PhidgetWebService and check usefull diagnostic information.
  • Phidget flash library[Last Revision Date: April 6, 2006]
    Description: ActionScript library for controlling Phidgets from Flash. Copy these files to your project directory, or store the file temporary on your desktop. You will need this library later on, when creating your first project. See quick introduction below.
  • Optional: Phidget Flash Components GUI [Version 0.4.0]
    Jesper Schwachöfer created phidget components with GUI for flash 8 that can be used to make prototyping even more easy. These components and documentation are still under development.
    Installation: unzip, doubleclik to install, in flash: press CTRL+F7 to show component window, drag&drop...
    Note: These components include all files from the official phidget flash library. This means that when using this component, you don't need to install the official library and you don;t have to copy all *.as files to your project directory.
    Note: The component can be installed by downloading the file above, and double-clicking it. The Macromedia Extention Manager will pop up and install the component. However, a reboot might be required between installing flash / macromedia studio and this component (otherwise the file extention will not be registered yet and the extention manager won't pop-up).

In order to use the components of the phidget flash library, the Phidget WebService Manager must be running. Click on the Phidget WebService icon in the taskbar to show the control panel:

In the control panel you can start the service manually by pressing the start button or select to start the manager automatically when starting windows (recommended). Port and password fields can be left unchanged.

 

Documentation [top]

A set of lecture notes that comprise of a compilation of tutorials for self-tuition will be supplied during workshops.

Phidgets and flash:

  • PhidgetFlash API: Overview of all phidget objects and functions available for flash (RECOMMENDED!)
  • Quick tutorial: how to use phidgets in a flash movie. (Note: document is VERY OUTDATED with respect to handling the phidget webserice. See template below and presentation for more info and a better way to connect phidgets)

 

Flash 8:

  • Flash Tutorials : Step-by-step tutorials that teach a variety of flash techniques, intended for all users. Both both graphical and Action Script topics are discussed (RECOMMENDED!)
  • Getting Started with Flash : Basic introduction to flash. Mainly focusing on graphical features. Intended for beginners.
  • Flash Samples : Some examples

 

More Advanced Manuals:


Language References (dictionary-style reference documents, extremely detailed):

Getiing started with Flash

The official Macromedia Flash "Getting Started" manual is recommended to become familiar with Flash. Although the manual explains most aspects that are required for creating simple flash website, more advanced flash and actionsript functionality is not discussed. Fortunately some very good tutorials are available on internet:

  • http://livedocs.macromedia.com/flash/8/index.html
    Unlike other programs like office, the help and support of Flash is very, very good. The help in the program is very handy, but this site offers even more tutorials, reference materials and examples.
  • http://actionscript.org/tutorials.shtml
    Actionscript.org is a very good site, with tutorials contributed by a range of people, for very advanced actionscript programmers, to simple basic information for beginners. Watch out, some tutorials are for older flash versions, and may not work in Flash 8, but most of them are still up to date.(flash mx 2004 is about the same as 8, with only minor differences, and most actionscript still works.
  • http://www.flashkit.com
    A site with loads of flash movies and tutorials, if you think of something which you want to do, just search this site, download the .fla and see how other people have done the same thing.
  • http://www.gotoandlearn.com
    This site contains video tutorials of advanced actionscript subjects. Some people like this method, some people rather have a text which they can skim.

Most actionscript constructions such as functions, classes, for-loops, switch-statements, etc. are quite similar to those used in other programming languages. If you are already familiar with another programming language, (like JAVA), the examples below help you getting started.

 

Support [top]

Workshops can be offered in the domains at request. Contact your coach/coreteam for more information.

In addition a set of lecture notes that comprise of a compilation of tutorials above is available for coaches and can be used during workshops (see support for coaches at tue).

 

Demo projects [top]

  • Some step-by-step demo's are shown in the handout for the ID minor on ambient intelligence. 
  • Phidget RFID Reader: control led with 3 tags: led on, led off, led flash (includes powerpoint)
  • Phidget CircularTouch: show position and state (finger near, object touched) on screen (more advanced demo: determine direction of "rotation")
  • Phidget InterfaceKit888 and Servo: show state of all inputs, use analog input 0 to control position of servo. Also a demo without servo is included in this archive. (includes powerpoint)
  • Using a timer in flash: how to create a timer without using the timeline
    More demos will be added on request...
  • Connecting to a microcontroller/com-port/RS232-interface. Demo not available yet. For more information see FAQ.

Note: The phidget code in the .as files in this directory have been written for a specific version of the phidget drivers. If the demo is not working try to download the .as files belonging to the version of the phidget driver you are using from the TU/e ID PhidgetWebiste of www.phidgets.com

 

Question: How can I implement my own phidget flash application?

By using this template you are ready to go!
The template shows how flash is connected to the phidget interface-888 board, already implemented the functions to read the analog and digital inputs and shows how a digital input can be set. You can start exploring phidgets/flash by using this script: try to connect a phidget board and show the sensor value on screen, next try to show led outputs to signal certain sensor changes, etc.

 

To top