2533CIT: Multimedia IIB - PowerPoint PPT Presentation

1 / 29
About This Presentation
Title:

2533CIT: Multimedia IIB

Description:

Vector-based multimedia authoring tool, Utilises a Timeline metaphor, ... Colin Moock Flash Guru (http://www.moock.org/webdesign/flash ... – PowerPoint PPT presentation

Number of Views:35
Avg rating:3.0/5.0
Slides: 30
Provided by: nathanielf
Category:

less

Transcript and Presenter's Notes

Title: 2533CIT: Multimedia IIB


1
2533CIT Multimedia IIB
  • Week 1 Introduction to Flash, Actionscript and
    Supporting Tools

Coridyn Fitzgerald-Hood
2
Finding your feet
3
Introduction to Flash
  • Flash
  • Vector-based multimedia authoring tool,
  • Utilises a Timeline metaphor,
  • Programming/scripting interface similar to
    Director.

4
Supporting Tools
  • Editors
  • Sepy Actionscript Editor
  • www.sepy.it
  • FlashDevelop
  • http//osflash.org/flashdevelop

5
  • Why use an external editor?

6
  • For the same reason you dont use Notepad
  • (I hope)

7
Features!
  • Code hints,
  • Better project support,
  • Improved file management searching, search in
    files,
  • Refactoring it programs for you,
  • A decent text editor.

8
Flash Basics
  • Timeline

Current playhead position
Keyframe with script
9
Symbols
  • Symbols are the building blocks of Flash movies.
  • Symbols can be either
  • Movieclip
  • Button
  • Graphic

10
MovieClip
  • Has an independent timeline.

Current editing level
Movieclip frames
11
MovieClip
  • Can be instantiated (added/created) at runtime,
    using Actionscript
  • Can be assigned an Actionscript class and run
    custom code.

12
  • Can hold nested objects (Buttons, Graphics, Other
    MovieClips),
  • Allows you to organise your graphics and
    interaction.
  • Can listen/respond to user generated events
  • Key presses,
  • Mouse moves,
  • Mouse clicks (press and release).

13
Button
  • Has a timeline (of sorts).

14
Button
  • Cannot be instantiated at runtime (unless nested
    in a MovieClip),
  • Can respond to Actionscript events (Mouse
    Presses, etc.) and run custom code.

15
Graphic
  • MovieClip lite no timeline,
  • Cannot be added at runtime,
  • Cannot be targeted/access through Actionscript
  • i.e. cannot execute code.
  • (Not particularly useful)

16
Graphic Symbols
  • Can contain nested MovieClips (which can be
    accessed via actionscript)
  • Use where a static graphic object is required,
  • Where the overhead of a MovieClip is not needed.

17
Actionscript is
  • The programming language exposed by Flash to
    interact with objects and respond to events,
  • Object-oriented
  • Classes, Inheritance, Polymorphism
  • (Visually) Similar to Java or Javascript.
  • Lets look at some Actionscript code

18
  • If you can read this then I should be showing you
    Actionscript code

19
Writing Actionscript
  • Three possible locations for Actionscript code

20
Frame Scripts
  • Created directly on a keyframe,
  • Code is executed when playhead reaches a frame
    with a script.

Current playhead position
Keyframe with script
21
Instance Code
  • Code defined on a MovieClip instance

22
External Actionscript File
  • Associate MovieClip symbols with classes

23
Variation Movieclip Frame Script
  • Frame script applied to an instance of a MovieClip

24
Problems with Instance Code and Nested Frame
Scripts
  • Hard to locate,
  • Relevant only for that instance,
  • Multiple instances require individual code.
  • Really, really hard to locate and maintain (like
    insane).
  • All code must appear within an on handler
  • on(lteventgt)do something

25
How not to structure you files
  • Show AS21.fla

26
Movieclip Frame Scripts
  • Code applied to library symbol,
  • Code is shared amongst all instances.
  • Code is still hard to find,
  • Benefits of frame script with portability of
    instance script,

27
External Actionscript File
  • Recommended form of Actionscript programming.
  • Text file with .as extension,
  • Some functions only available in external .as
    files
  • import statement,
  • class keyword must use prototypes otherwise.
  • Treat just like a Java class file.

28
Resources
  • Flash Libraries
  • OSFlash Open Source Flash (http//www.osflash.or
    g)
  • Colin Moock Flash Guru (http//www.moock.org/web
    design/flash/)
  • ASwing Actionscript implementation of Swing GUI
    Framework (http//osflash.org/aswing)
  • Layer51 Prototype (http//proto.layer51.com/)
  • Senocular Object Prototypes (http//www.senocula
    r.com)
  • Sephiroth Flash PHP Code (http//www.sephirot
    h.it/, http//www.sepy.it)

29
Supporting Tools
  • Other
  • JSFL Javascript Flash interface
  • Javascript control of the Flash IDE,
  • Automate tedious batch operations (i.e. Updating
    the linkage for every MovieClip in the library),
  • Refer to the JSFL entry in the Flash help index
    or visit http//dynamicflash.com/jsfl/
  • Actionscript.org (http//www.actionscript.org)
  • Forums and Flash tutorials.
Write a Comment
User Comments (0)
About PowerShow.com