UFCFY5-30-1Multimedia Studio Scripting for Interactive Media Using Interface Fields to Receive and Display Data to the User.

Slides:



Advertisements
Similar presentations
Computer and Programming
Advertisements

Mark Dixon Page 1 04 – Database Design: Forms. Mark Dixon Page 2 Session Aims & Objectives Aims –To allow easier data entry using forms Objectives, by.
Macromedia Flash MX 2004 – Design Professional and Interactivity WORKING WITH SYMBOLS.
Text Box controls are used when users are required to type some input (during program execution), or output is displayed on the form (known as the user-
Work with symbols and instances Work with Libraries Create buttons Assign actions to buttons Unit Lessons.
1 Flash Actionscript Adding Interactive Actions Variables.
Chapter 7 Improving the User Interface
To type the VB code behind the command button (named cmdPush), Double-Click on the Push Me (caption) command button As a result the Visual Basic Code Window.
MCT260-Operating Systems I Operating Systems I Interfaces to Operating Systems.
1 Introduction to Human Computer Interaction  Livecode Overview  Based on Livecode User Guide from RunRev Ltd. (2010) 
Graphical User Interfaces A Quick Outlook. Interface Many methods to create and “interface” with the user 2 most common interface methods: – Console –
Access Tutorial 10 Automating Tasks with Macros
2. Introduction to the Visual Studio.NET IDE 2. Introduction to the Visual Studio.NET IDE Ch2 – Deitel’s Book.
Chapter 9 Introduction to ActionScript 3.0. Chapter 9 Lessons 1.Understand ActionScript Work with instances of movie clip symbols 3.Use code snippets.
Microsoft Visual Basic 2012 CHAPTER TWO Program and Graphical User Interface Design.
Visual Basic Fundamental Concepts. Integrated Development Enviroment Generates startup form for new project on which to place controls. Features toolbox.
Visual Basic Chapter 1 Mr. Wangler.
Programming with Microsoft Visual Basic 2012 Chapter 12: Web Applications.
Lehigh University Introduction to Flash MX Sharmeen Mecklai.
Department of Mechanical Engineering, LSUSession VII MATLAB Tutorials Session VIII Graphical User Interface using MATLAB Rajeev Madazhy
Introduction to Visual Basic. Quick Links Windows Application Programming Event-Driven Application Becoming familiar with VB Control Objects Saving and.
Tutorial 2 Drawing Text, Adding Shapes, and Creating Symbols.
© 2011 Delmar, Cengage Learning Chapter 9 Introduction to ActionScript 3.0.
Introduction to Matlab & Data Analysis
Intro to GUIs (Graphical User Interfaces) Section 2.5Intro. to GUIs: a GUI Greeter Section 3.7Graphical/Internet Java: Einstein's Equation.
Chapter 3: Using GUI Objects and the Visual Studio IDE.
Chapter 4 JavaScript and Dynamic Web pages. Objectives Static Web pages Dynamic Web pages JavaScript Variables Assignments. JavaScript Functions –(prompt(“”,””)
Visual Basic 2005 CHAPTER 2 Program and Graphical User Interface Design.
 Application – another name for a program.  Interface – is what appears on the screen when the application is running.  Program Code – is instructions.
Microsoft Visual Basic 2005 CHAPTER 4 Variables and Arithmetic Operations.
Adobe Flash CS3 Revealed Chapter 3 - WORKING WITH SYMBOLS AND INTERACTIVITY.
Tutorial 2 Drawing Shapes, Adding Text, and Creating Symbols.
CSCE 121: Introduction to Program Design and Concepts, Honors Dr. J. Michael Moore Spring 2015 Set 15: GUIs 1.
CS0004: Introduction to Programming Project 1 – Lessons Learned.
Visual Basic 2005 CHAPTER 2 Program and Graphical User Interface Design.
1 Creating Windows GUIs with Visual Studio. 2 Creating the Project New Project Visual C++ Projects Windows Forms Application Give the Project a Name and.
Distributed Multimedia Programming Week – 4A Buttons Movie Clips.
Graphical User Interface You will be used to using programs that have a graphical user interface (GUI). So far you have been writing programs that have.
XP Tutorial 8 Adding Interactivity with ActionScript.
Copyright © 2011 Pearson Addison-Wesley What is a Program Made Of? Keywords (Reserved Words) – Words with special meaning that make up a high-level programming.
UFCEKS-20-2Multimedia Authoring Times Table Quiz.
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.
JSP BASICS AND ARCHITECTURE. Goals of JSP Simplify Creation of dynamic pages. Separate Dynamic and Static content.
Microsoft Visual Basic 2010 CHAPTER TWO Program and Graphical User Interface Design.
Video in Macromedia Flash (Optional) – Lesson 121 Video in Macromedia Flash (Optional) Lesson 12.
Open a new Flash File Action Script 2.0. Create a button like you did last lesson and name it Click to Play.
Slide 1 Controls v Control naming convention –Label: lblName –Command Button: cmdName –Text Box: txtName.
Chapter 27 Getting “Web-ified” (Web Applications) Clearly Visual Basic: Programming with Visual Basic nd Edition.
UFCFY5-30-1Multimedia Studio Scripting for Interactive Media Times Table Quiz This will contribute towards your online portfolio for this module.
Chapter 3 Graphs and Charts. Agenda Chart Object linking and embedding.
Microsoft Visual Basic 2012 CHAPTER FOUR Variables and Arithmetic Operations.
More Visual Basic!. Creating a Standalone Program A standalone program will allow you to make a program file that can be run like other Windows programs,
Integrating Components and Dynamic Text Boxes with the Animated Map– Lesson 101 Integrating Components and Dynamic Text Boxes with the Animated Map Lesson.
Microsoft Visual C# 2010 Fourth Edition Chapter 3 Using GUI Objects and the Visual Studio IDE.
Microsoft Visual Basic 2012: Reloaded Fifth Edition Chapter One An Introduction to Visual Basic 2012.
Creating cast members  Using tool palette window that can be selected from window menu.  The following objects can be created: Push buttons, Radio buttons,
Visual Basic/ Visual Studio Brandon Large. Connecting to prior knowledge In your notes write down what the two main parts of the computer are. The “software”
UFCFY5-30-1Multimedia Studio Coding for Interactive Media Fundamental Concepts.
Excel Tutorial 8 Developing an Excel Application
Visual Basic.NET Windows Programming
var variableName:datatype;
Unit Lessons Work with actions
Variables and Arithmetic Operations
Variables and Arithmetic Operations
WEB PROGRAMMING JavaScript.
Programming with Microsoft Visual Basic 2008 Fourth Edition
Presentation transcript:

UFCFY5-30-1Multimedia Studio Scripting for Interactive Media Using Interface Fields to Receive and Display Data to the User

UFCFY5-30-1Multimedia Studio Agenda Types of AS3 Interface Fields Creating and Positioning Fields Assigning Values to Fields Converting Artwork to Symbols Using Functions with Interface Buttons Scripting Exercises to Implement Interface Output Using Fields.

UFCFY5-30-1Multimedia Studio Types of Fields in AS3 Fields are all ‘Text Fields’ Static Text Fields Input Text Fields Dynamic Text Fields.

UFCFY5-30-1Multimedia Studio Static Text Field The ‘Fun’ Application for Kids Press this Button Title or Message Interface Label Static text fields cannot change their information, receive input from user, store or output data.

UFCFY5-30-1Multimedia Studio Input Text Field User enters data into input text field Input text fields can receive data and send the data to be used in the script for processing. Data processed by script and used as required Please enter your name Bugs Bunny

UFCFY5-30-1Multimedia Studio Dynamic Text Field Data displayed to user Dynamic text fields output data from the program which can be changed during the process runtime as required. Data values inside script total = Total Money Spent 23.00

UFCFY5-30-1Multimedia Studio All Text Fields Use String Type Text fields only use String types Numerical data must be converted accordingly Numerical input data required for a program is input via a text field and must be converted from a String type to a numerical type Numerical values to be displayed as output in a dynamic text field must be converted to a string.

UFCFY5-30-1Multimedia Studio Input Text Field: String Values User enters string type data Input text fields can receive string data and send the data to be used in the script for processing without conversion. Data processed by script without conversion required Please enter your name Mickey Mouse

UFCFY5-30-1Multimedia Studio Input Text Field: Numerical Values User enters data that must be treated as numerical data by the script Input text fields can receive receive numerical data as a String type. The data is then converted to a numerical type before being used in the script for processing Data processed by script needs to be converted to a numerical type Please enter the price ( String) convert to ( Number) priceOfItem = 23.00;

UFCFY5-30-1Multimedia Studio Dynamic Text Field: String Dynamic text fields can receive data as a String type without conversion. Data processed by script can be used directly as a String type A Message from the Computer Hello World aMesssage = “Hello World”;

UFCFY5-30-1Multimedia Studio Dynamic Text Field: Numeric Dynamic text fields can receive data as a numeric types after type conversion to a String. Numerical data must be converted to a String type to be displayed by the text field The Total Price aTotalPrice = 23.00;

UFCFY5-30-1Multimedia Studio Creating Text Fields in Flash From the Toolbar choose the text tool Drag out a Text Box on the interface From the Text Box Properties Window choose Classic Text Select the text field required (Static, Dynamic, Input) from the drop-list If Dynamic or Static, enter an appropriate instance name in the instance name properties field.

UFCFY5-30-1Multimedia Studio The process of storing a value into a variable is called assignment firstNumber = 10 variable assignment operator value Creating Text Field: One Choose Classic Text Select the type of Text Filed required

UFCFY5-30-1Multimedia Studio Creating Text Field: Two Choose instance name

UFCFY5-30-1Multimedia Studio Creating Text Field: Three Choose instance name Embed Font Glyphs

UFCFY5-30-1Multimedia Studio Creating Text Field: Properties

UFCFY5-30-1Multimedia Studio Assigning Variables to Text Fields aTextField.text = aVariableName Text field instance name.text Variable name to assign

UFCFY5-30-1Multimedia Studio Assigning Values to Text Fields var aName:String = “Mickey Mouse”; aTextField.text = aName; // String variable aTextField.text = “Bugs Bunny”; // String literal Assigning String variables and ‘literals’:

UFCFY5-30-1Multimedia Studio Assigning Numeric Values var aTotalPrice:Number = 23.00; //need to convert the data from numeric to a String type aTextField.text = aTotalPrice.toString(); Assigning numerical values :

UFCFY5-30-1Multimedia Studio Data Type Conversion aTextField.text = aTotalPrice.toString(); toString converts the numeric type data to String type data which is required by the Text Field

UFCFY5-30-1Multimedia Studio Input Field Conversion numberValue = parseInt(userInputText); parsInt converts the string type data to integer type data which then be used in the calculations required by the progam

UFCFY5-30-1Multimedia Studio Converting Artwork to Symbols 1. Import each graphic to the library 2. Drag from library to stage 3. RMB the graphic and choose Symbol from the menu 4. Choose Button as the symbol type 5. Set / check registration point 5. Give the symbol a name 6. In the Properties Window give the symbol an instance name

UFCFY5-30-1Multimedia Studio Convert to Symbol

UFCFY5-30-1Multimedia Studio Choose Symbol Type Registration Point

UFCFY5-30-1Multimedia Studio Give Symbol An Instance Name

UFCFY5-30-1Multimedia Studio Functions and Interface Controls addButton.addEventListener(Mouse.Event.CLICK, addNumbers);

UFCFY5-30-1Multimedia Studio Scripting Examples & Tasks Follow the instructions in the worksheet provided to extend the tutorial two example by populating the user interface with output data. Carry out the associated extended exercise.