Control Circle Project Revisited

Slides:



Advertisements
Similar presentations
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Tutorial 21 - “Cat and Mouse” Painter Application.
Advertisements

Event Handling Events and Listeners Timers and Animation.
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.
1 Flash Actionscript Adding Interactive Actions. 2 ActionScript 3.0 ActionScript is the language you use to add interactivity to Flash applications, whether.
Animations Flash ActionScript Introduction to Thomas Lövgren
XP Tutorial 5 Buttons, Behaviors, and Sounds. XP New Perspectives on Macromedia Flash MX Buttons Interactive means that the user has some level.
Introduction to Flash FYS100 Creative Discovery in Digital Art Forms Spring 2007 Burg.
Click your mouse for next slide Flash – Introduction and Startup Many times on websites you will see animations of various sorts Many of these are created.
Lehigh University Introduction to Flash MX Sharmeen Mecklai.
Tutorial 5 Making a Document Interactive. XP Objectives Explore the different button states Add a button from the Button library Create a button Learn.
1-1 OBJ Copyright 2003, Paradigm Publishing Inc. Dr. Joseph Otto Silvia Castaneda Christopher deCastro CSULA Macromedia Flash MX Introduction.
© 2010 Delmar, Cengage Learning Chapter 3: Working with Symbols and Interactivity.
Creating Buttons – Lesson 71 Creating Buttons Lesson 7.
Adobe Flash CS3 Revealed Chapter 3 - WORKING WITH SYMBOLS AND INTERACTIVITY.
Field Trip #32 Digital Alarm Clock By Keith Lynn.
Motion Tweening – Lesson 81 Motion Tweening Lesson 8.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 21.1 Test-Driving the Painter Application.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Tutorial 21 - “Cat and Mouse” Painter Application.
CS324e - Elements of Graphics and Visualization Timing Framework.
© 2011 Delmar, Cengage Learning Chapter 10 Using ActionScript to Enhance User Experience.
SCRIPT PROGRAMMING WITH FLASH Introductory Level 1.
Liang, Introduction to Java Programming, Tenth Edition, (c) 2015 Pearson Education, Inc. All rights reserved. 1 Chapter 15 Event-Driven Programming and.
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.
Liang, Introduction to Java Programming, Tenth Edition, (c) 2015 Pearson Education, Inc. All rights reserved. 1 Chapter 15 Event-Driven Programming and.
XP Tutorial 3 Creating Animations. XP New Perspectives on Macromedia Flash MX Elements of Animation Layers are used to organize the content of.
Creating buttons Mak Mang Tao. What is a button? It is an object to make interactive effect through the pointer of the mouse movement It is a four-frame.
Section §15.1 Introduction  Suppose you want to develop a GUI application to calculate loan payments:  The user should be able type the pertinent.
 Motion Tween allow us to move a shape on the stage from one place to another.  In order to use motion tween, the shape to be moved must be converted.
Events and Event Handling
Tutorial 3 Creating Animations.
Java FX: Scene Builder.
Creating a Flash Web Site
MOM! Phineas and Ferb are … Aims:
Chapter 15 Event-Driven Programming and Animations
Creating Special Animations
EE 200 Design Tools Laboratory 14
Using Video, and Flash Components, and Printing Flash Content
Macromedia Flash MX.
Topics Graphical User Interfaces Using the tkinter Module
Tutorial 3 Creating Animations.
Adding Buttons, Actions, and Sounds
Flash Interface, Commands and Functions
Java FX.
Creating Complex Animations
CT1514 Flash-2.
Lines, Arrows, & WordArt Experiment with the line, arrow, and WordArt buttons on the Drawing toolbar.
Introduction to Events
CMPE212 – Stuff… Marking finished for Quiz 3.
EE 422C Java FX.
Chapter 14 JavaFX Basics Dr. Clincy - Lecture.
Chapter 14 JavaFX Basics Dr. Clincy - Lecture.
Chapter 15 Event-Driven Programming and Animations
Recall: Timeline Class
Flash animation For beginners.
Chapter 15 Event-Driven Programming and Animations
Chapter III Animations, Transitions, Spell Check, Outline Tab, Slides Tab, Sorter View, and Printing Saturday, November 24, 2018Saturday, November 24,
Cannon Game App Android How to Program
MyFloridaMarketPlace
Unit 11 – PowerPoint Interaction
1/10/2019 JavaFX Events COSC 330.
Working with Symbols and Interactivity
Divide the number in C by 10.
Using Animation and Multimedia
Using Animation and Multimedia
Animations & Transitions
PowerPoint Practice Exercise
Chapter 15 Event-Driven Programming and Animations Part 1
Chapter 15 Event-Driven Programming and Animations Part 2
How to use contrast.
Presentation transcript:

Control Circle Project Revisited Refer to CircleControlWithMouseAndKey Eclipse Project that Adds more control to the CircleControl example Allowing end user to Increase/decrease the circle radius by clicking left/right buttons Increase/decrease the circle radius by pressing the U and D keys getButton() Detects which mouse button is pressed MouseButton.PRIMARY, MouseButton.SECONDARY, …

Listeners for Observable Objects A listener can be added To process a value change in an observable object An instance of Observable class Is known as an observable object that contains the addListener(InvalidationListener) for adding a listener The listener must implement the InvalidationListener interface To override the invalidated(Observable o) method To handle value change Once the value in Observable changes The listener is notified through the invalidated method

Animation Class JavaFX provides the Animation class With the core functionality for all animations

Animation Class (Continued) The CycleCount property Indicates the number of cycles for the animation The constant Timeline.INDEFINITE indicates an infinite number The rate property Defines the speed of the animation The status property Indicates the status of the animation: Animation.Status.PAUSED Animation.Status.RUNNING Animation.Status.STOPPED

PathTransition Class This class Animates the moves of a node along a path From one end to the other over a given time

PathTransition Class (Cont’d) The Duration class Defines a duration of time Constants INDEFINITE, ONE, ZERO are defined Offers add, subtract, multiply, and divide methods To perform arithmetic operations toHours(), toMinutes(), toSeconds(), and toMillis() To return number of hours, minutes, seconds, and ms in duration Defines PathTransition.OrientationType.ORTHOGONAL_TO_TANGENT

PathTransition Class (Cont’d) Refer to PathTransitionDemo Eclipse project It moves a rectangle along the outline of a circle An animation can be Started by invoking the play() method Paused by invoking the pause() method

PathTransition Class (Cont’d) Refer to FlagRisingApp Eclipse project It animates a flag rising ImageView moves along a line That may or may not be placed in the scene

FadeTransition Class This class Animates the changes of the opacity in a node over a given time

FadeTransition Class (Cont’d) Refer to FadeTransitionDemo Eclipse project It applies a fade transition to the filled color in an ellipse The ellipse’s centerX, centerY, radiusX, and radiusY properties Are bound to the pane’s size

Timeline Class Timeline class Each KeyFrame Can be used to program any animation using One or more KeyFrames Each KeyFrame Is executed sequentially at a specified time interval Can be constructed as follows: The onFinished handler Is called when the duration of the key frame is elapsed.

Timeline Class (Continued) Refer to TimeLineDemo Eclipse project Displays a flashing text. The text is on and off alternating to animate flashing A handler is used To change the text to empty if it is not empty or To “programming is fun” if the text is empty The animation is set to run indefinitely

Timeline Class (Continued) Refer to BouncingBallApp Eclipse project Animates a bouncing ball The mouse-pressed and mouse-released handlers Are implemented to pause and resume the animation When the UP arrow key is pressed The ball’s movement is increased