CISC 110 Day 7 “The Outliers, Part1” hitTest(), Text Input, Frame and Timer Loops, Publishing Flash Content.

Slides:



Advertisements
Similar presentations
1What is the Stage. 2How do you open a panel in Flash
Advertisements

 2004 Prentice Hall, Inc. All rights reserved. Chapter 18 – Macromedia Flash MX 2004: Building an Interactive Game Outline 18.1 Introduction 18.2 Object-Oriented.
Chapter 3 Tables and Page Layout
Using KompoZer -- a web editor A collection of video tutorials
Macromedia Flash MX 2004 – Design Professional and Interactivity WORKING WITH SYMBOLS.
1 Flash Actionscript Event Handling. 2 Event Handling Right now we know all about variables lets go back to our text input/output example: Suppose we.
Work with symbols and instances Work with Libraries Create buttons Assign actions to buttons Unit Lessons.
1 Flash Actionscript Adding Interactive Actions Variables.
B.Sc. Multimedia ComputingMultimedia Authoring Flash Event Model and the Display List Hierarchy.
Macromedia Dreamweaver 4 Advanced Level Course. Add Rollovers Rollovers or mouseovers are possibly the most popular effects used in designing Web pages.
1 Flash Programming Introduction Script Assist. 2 Course Description This course concentrates on the teaching of Actionscript, the programming language.
SM1205 Interactivity Topic 06: Iteration and Multiple Objects Spring 2010SCM-CityU1.
Events (Listeners/Handlers: Mouse, keyboard, timer) Flash ActionScript 3.0 Introduction to Thomas Lövgren, Flash developer
© 2010 Delmar, Cengage Learning Chapter 6: Preparing and Publishing Movies.
6-1 OBJ Copyright 2003, Paradigm Publishing Inc. Animating Using Symbols and Masks and Publishing Flash Movies Macromedia Flash Design & Application.
Chapter 9 Introduction to ActionScript 3.0. Chapter 9 Lessons 1.Understand ActionScript Work with instances of movie clip symbols 3.Use code snippets.
JS: DOM Form Form Object Form Object –The Form object represents an HTML form. –For each instance of a tag in an HTML document, a Form object is created.
XP Tutorial 5 Buttons, Behaviors, and Sounds. XP New Perspectives on Macromedia Flash MX Buttons Interactive means that the user has some level.
© Cheltenham Computer Training 2001 Macromedia Dreamweaver 4 - Slide No 1 Macromedia Dreamweaver 4 Advanced Level Course.
BUILDING RICH MEDIA ELEMENTS. Design Decisions Based on Design Specification  Following the design specification will ensure that the application is.
Flash MX II. Flash MX – Tweened Animation There are two methods for creating an animation sequence in Flash –Frame-by-frame animation –Tweened animation.
London April 2005 London April 2005 Creating Eyeblaster Ads The Rich Media Platform The Rich Media Platform Eyeblaster.
Chapter 11 Adding Sound and Video. Chapter 11 Lessons 1.Work with sound 2.Specify synchronization options 3.Modify sounds 4.Use ActionScript with sound.
Dreamweaver – Dreamweaver Extras Web Design Section 8-4 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development.
© 2011 Delmar, Cengage Learning Chapter 9 Introduction to ActionScript 3.0.
Macromedia Flash By Alice Tian. Overview  What is Flash  Why Flash  Basic User Interfaces  Animation Basics  Advanced Basics  Publishing.
Publishing a Macromedia Flash Movie – Lesson 131 Publishing a Macromedia Flash Movie Lesson 13.
Chapter 2 Adding Animation to a Presentation. Applying Animation Animation is a great way to add life to InDesign documents by making objects: – move.
Interface & navigation (How to build a simple presentation interface) Flash ActionScript Introduction to Thomas Lövgren
© 2012 Adobe Systems Incorporated. All Rights Reserved. Copyright 2012 Adobe Systems Incorporated. All rights reserved. ® INTRODUCTION TO FLASH ANIMATION.
® Copyright 2010 Adobe Systems Incorporated. All rights reserved. ® ® 1 INTRODUCTION TO ADOBE FLASH PROFESSIONAL CS5.
UNDERSTANDING ADOBE FLASH. The Flash Interface  The flash interface provides you with:  A menu bar  Panels  A work area: stage.
Chapter 10 Fireworks: Part II The Web Warrior Guide to Web Design Technologies.
© 2010 Delmar, Cengage Learning Chapter 3: Working with Symbols and Interactivity.
Tutorial 8 Programming with ActionScript 3.0. XP Objectives Review the basics of ActionScript programming Compare ActionScript 2.0 and ActionScript 3.0.
Getting a handle on ActionScript A basic primer for non-programmers.
7-1 OBJ Copyright 2003, Paradigm Publishing Inc. Using ActionScript and Creating Templates Macromedia Flash Design & Application.
Tutorial 7 Planning and Creating a Flash Web Site.
Click your mouse for next slide Flash – Morphing and Shape Tweening You have designed some motion animation with the last lesson There is another type.
Adobe Flash CS3 Revealed Chapter 3 - WORKING WITH SYMBOLS AND INTERACTIVITY.
CSC 361/661 Digital Media Spring 2010 Professor Burg.
Chapter 16 Video. Importing Video Into Flash  Once you import video into Flash, you can control it using behaviors and very basic ActionScript, target.
Motion Tweening – Lesson 81 Motion Tweening Lesson 8.
ActionScript: Loading External Content with MovieClipLoader Class, Listener Objects, Preloaders, HitTest, Loading Sound MMP 220 Multimedia Programming.
Mouse Events & Keyboard Inputs Flash ActionScript Introduction to Thomas Lövgren
Copyright © 2003 Pearson Education, Inc. Chapter 6 – Slide 1 by Michael Kay The Web Wizard’s Guide to Flash.
CISC 110 Day 5 OOP Part 2. 2 Outline The Display List Display List Classes Adding and Removing Objects Adding Symbol Instances Managing Object Depths.
XP Tutorial 8 Adding Interactivity with ActionScript.
Quick Introduction to creating Eyeblaster ads.  Steps for creating an Eyeblaster ad  Building Eyeblaster compatible flash assets  Adding Eyeblaster.
Building the Events Components– Lesson 111 Building the Events Components Lesson 11.
Macromedia Flash 8 Revealed WORKING WITH SYMBOLS AND INTERACTIVITY.
Macromedia Flash Design Professional And Interactivity WORKING WITH SYMBOLS.
© 2011 Delmar, Cengage Learning Chapter 10 Using ActionScript to Enhance User Experience.
SCRIPT PROGRAMMING WITH FLASH Introductory Level 1.
Tutorial 7 Creating Animations. XP Objectives Learn about animation Create a timeline Add AP divs and graphics to a timeline Move and resize animation.
Video in Macromedia Flash (Optional) – Lesson 121 Video in Macromedia Flash (Optional) Lesson 12.
CIS 205—Web Design & Development Flash Chapter 3 Appendix on Using Buttons.
© 2011 Delmar, Cengage Learning Chapter 11 Adding Sound and Video.
Basic ActionScript and PHP Cis 126. Getting Started set up a basic folder structure so we can keep our files organized. Mirror this structure on your.
Debugging tools in Flash CIS 126. Debugging Flash provides several tools for testing ActionScript in your SWF files. –The Debugger, lets you find errors.
CISC 110 Day 6 Introduction to Events. Outline Event-Driven Programming Event Classes Hierarchy –Event Class –Mouse Events –Keyboard Events Registering.
XP Tutorial 8 Adding Interactivity with ActionScript.
Copyright © 2003 Pearson Education, Inc. Chapter 4 – Slide 1 by Michael Kay The Web Wizard’s Guide to Flash.
DM 11- Flash –Unit C and Interactivity WORKING WITH SYMBOLS.
JavaScript Events Java 4 Understanding Events Events add interactivity between the web page and the user You can think of an event as a trigger that.
JavaScript Events. Understanding Events Events add interactivity between the web page and the user Events add interactivity between the web page and the.
CIS 205—Web Design & Development Flash Chapter 3 Working with Symbols and Interactivity.
CDM105 Session 12 Macromedia FLASH MX 2004 Part 5 : Sounds, publishing your movies, and the ‘Get URL’ action.
Creating simple website in Serif Web Plus And uploading to free hosting A2 ICT.
Enhancing Artwork and Creating Web Graphics
Presentation transcript:

CISC 110 Day 7 “The Outliers, Part1” hitTest(), Text Input, Frame and Timer Loops, Publishing Flash Content

At this point in the course, you have already seen everything that you need to complete the course project Now we will begin to look at topical features and tools that provide advanced functionality

…Let’s reflect on that for a moment…

Outline keyCode to Character Conversion hitTest() Text Input Frame and Timer Loops Publishing Flash Content –Export to SWF –Export to EXE –Embed in HTML –FTP –Web Hosting 4

keyCode to Character Conversion var e:KeyboardEvent; … trace(e.keyCode); trace(String.fromCharCode(e.charCode)); Output for ‘g’: 71 g

hitTest movieClip1.hitTestObject(movieClip2) Returns “true” if movieClips are overlapping and “false” if they are not.

hitTest …many different hitTests are supported… e.g. myMovieClip.hitTest(x, y, shapeFlag) …check out the API (manual) online!

Input Text Fields How to create using ActionScript: var theTextField:TextField = new TextField(); theTextField.type = TextFieldType.INPUT; theTextField.border = true; theTextField.x = 10; theTextField.y = 10; theTextField.multiline = true; theTextField.wordWrap = true; addChild(theTextField); 8

Input Text Fields Without ActionScript: 1.Create an Input Text box (“Tools” Panel) 2.Assign an Instance Name 3.…now you can access it in ActionScript! 9

TextEvent // Add event listener for any key pressed stage.addEventListener (TextEvent.TEXT_INPUT, readMsg); function readMsg(evt: KeyboardEvent):void { // next line outputs most recent key pressed (as a character) trace(evt.text); } 10

FocusEvent FOCUS_IN occurs when user selects an object letterBox.addEventListener(FocusEvent.FOCUS_IN, blankOutText); function blankOutText(evt:FocusEvent):void { msgBox.text = " "; } 11

FocusEvent FOCUS_OUT occurs when an objects is deselected: i.e. click anywhere outside of the object with mouse letterBox.addEventListener(FocusEvent.FOCUS_OUT, readMsg); function readMsg(evt:FocusEvent):void { trace(msgBox.text); } 12

Frame and Timer Loops Sometimes we want to repeat something while continuing the rest of the animation, e.g., checking if we’ve hit a monster. For this, we can use frame and timer loops. 13

Frame Loop We can create a frame loop by listening for an enter frame event, which is “fired” as each frame is played (i.e. at the same frame rate as the timeline) stage.addEventListener(Event.ENTER_FRAME, fadeMC); function fadeMC(evt: Event):void {if(square.alpha > 0) { square.alpha = square.alpha – 1; } } 14

Timer Loop We can create a timer loop by creating a Timer object, which fires every specified number of ms. var timer: Timer = new Timer(1000); // 1 second timer.addEventListener(TimerEvent.TIMER, fadeMC); timer.start(); function fadeMC(evt: TimerEvent):void {if(square.alpha > 0) { square.alpha = square.alpha – 1; } } 15

Publishing Flash Content Export to SWF Export to EXE (“Create Projector…”) Embed in HTML –File, Publish Preview, HTML –File, Publish Settings –File, Publish

FTP File Transfer Protocol (FTP) –Designed for uploading files to servers

Web Hosting Comes in “all shapes and sizes” –Inexpensive options: Hostrocket.com 1and1.com

USAT