Datatypes, Variables, Constants Flash Class. What Does ActionScript Do? Automates Examples: – Tells animation what to do button is clicked – Turn off.

Slides:



Advertisements
Similar presentations
AP Computer Science Anthony Keen. Computer 101 What happens when you turn a computer on? –BIOS tries to start a system loader –A system loader tries to.
Advertisements

08/2012Tanya Mishra1 EASYC for VEX Cortex Llano Estacado RoboRaiders FRC Team 1817.
Variables and Operators
Chapter 3 DATA: TYPES, CLASSES, AND OBJECTS. Chapter 3 Data Abstraction Abstract data types allow you to work with data without concern for how the data.
 Variables  What are they?  Declaring and initializing variables  Common uses for variables  Variables you get “for free” in Processing ▪ Aka: Built-in.
Introduction to Computing Concepts Note Set 7. Overview Variables Data Types Basic Arithmetic Expressions ▫ Arithmetic.
Week 2: Primitive Data Types 1.  Programming in Java  Everything goes inside a class  The main() method is the starting point for executing instructions.
Data types and variables
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Adrian Ilie COMP 14 Introduction to Programming Adrian Ilie June 27, 2005.
Javascript II Expressions and Data Types. 2 JavaScript Review programs executed by the web browser programs embedded in a web page using the script element.
Chapter 2 Data Types, Declarations, and Displays
JavaScript, Third Edition
Computer Science: A Structured Programming Approach Using C1 Objectives ❏ To understand the structure of a C-language program. ❏ To write your first C.
1.2 – Open Sentences and Graphs
110-D1 Variables, Constants and Calculations(1) Chapter 3: we are familiar with VB IDE (building a form…) to make our applications more powerful, we need.
The Data Element. 2 Data type: A description of the set of values and the basic set of operations that can be applied to values of the type. Strong typing:
Storing data Getting data out Data types Ruby as a foundation Program Variables Click icon to hear comments (the download may take a minute)
Objectives You should be able to describe: Data Types
The Data Element. 2 Data type: A description of the set of values and the basic set of operations that can be applied to values of the type. Strong typing:
1 PHP Variables. 2 What is a variable? A variable is something that can be changed – a thing that can take on any value from a possible set of values.
Week 2 - Monday.  What did we talk about last time?  Software development  Lab 1.
2440: 211 Interactive Web Programming Expressions & Operators.
Chapter 3: Data Types and Operators JavaScript - Introductory.
Representing numbers and Basic MATLAB 1. Representing numbers  numbers used by computers do not behave the same as numbers used in mathematics  e.g.,
CH2 – Using Data. Constant Something which cannot be changed Data Type Format and size of a data item Intrinsic Data Types Pg. 47 – Table 2-1 Basic ones.
Logical or Boolean Data stored in Boolean form can only be one of two available values. Think of a light switch – it’s on or off. Examples include: YES.
3 - Variables Lingma Acheson Department of Computer and Information Science, IUPUI CSCI N331 VB.NET Programming.
CPS120: Introduction to Computer Science
DHTML AND JAVASCRIPT Genetic Computer School LESSON 5 INTRODUCTION JAVASCRIPT G H E F.
Comparing and ordering rational numbers
5 BASIC CONCEPTS OF ANY PROGRAMMING LANGUAGE Let’s get started …
Data & Data Types & Simple Math Operation 1 Data and Data Type Standard I/O Simple Math operation.
Object-Oriented Program Development Using Java: A Class-Centered Approach, Enhanced Edition.
Code Grammar. Syntax A set of rules that defines the combination of symbols and expressions.
Applications Development
XP Tutorial 8 Adding Interactivity with ActionScript.
Lesson Two: Everything You Need to Know
Variables Art &Technology, 3rd Semester Aalborg University Programming David Meredith
© A+ Computer Science - A reference variable stores the memory address of an object. Monster fred = new Monster(); Monster sally.
1 Writing Software Kashef Mughal. 2 Algorithms  The term algorithm (pronounced AL-go-rith-um) is a procedure or formula for solving a problem.  An Algorithm.
1.2 Primitive Data Types and Variables
A: A: double “4” A: “34” 4.
Values, Types, and Variables. Values Data Information Numbers Text Pretty much anything.
 Variables can store data of different types, and different data types can do different things.  PHP supports the following data types:  String  Integer.
Chapter 3 AS3 Programming. Introduction Algorithms + data structure =programs Why this formula relevant to application programs created in flash? The.
 Variables are nothing but reserved memory locations to store values. This means that when you create a variable you reserve some space in memory. 
Expressions and Data Types Professor Robin Burke.
CS0007: Introduction to Computer Programming Primitive Data Types and Arithmetic Operations.
CSE 110: Programming Language I Matin Saad Abdullah UB 1222.
What will each of the following lines print? System.out.println("number" ); number645 System.out.println("number" + (6 + 4)+ 5); number105 System.out.println(6.
Chapter 2 Variables and Constants. Objectives Explain the different integer variable types used in C++. Declare, name, and initialize variables. Use character.
Copyright © Texas Education Agency, Computer Programming Variables and Data Types.
Topic 02: Introduction to ActionScript 3.0
Week 2 - Wednesday CS 121.
Variables Variables are used to store data or information.
Introduction to Computer Science / Procedural – 67130
Review Operation Bingo
Introduction to Primitive Data types
JavaScript What is JavaScript? What can JavaScript do?
JavaScript What is JavaScript? What can JavaScript do?
The Data Element.
The Data Element.
design OO words Debug Variables Data types
Data Types Every variable has a given data type. The most common data types are: String - Text made up of numbers, letters and characters. Integer - Whole.
Data Types and Maths Programming Guides.
C Programming Lecture-3 Keywords, Datatypes, Constants & Variables
Variables and Constants
Introduction to Primitive Data types
Section 6 Primitive Data Types
Presentation transcript:

Datatypes, Variables, Constants Flash Class

What Does ActionScript Do? Automates Examples: – Tells animation what to do button is clicked – Turn off sound Designer “scripts” different parts of the animation Examples: tell the animation to load a Web page upon clicking a link

Building Blocks Flash Flash animations made up of: – Drawings – Text – Frames (hold drawings, text) – Timelines (hold frames) ActionScript 3 ActionScript made up of: – Numbers – Strings Building blocks for more complicated data containers

ActionScript Building Blocks Numbers Strings Arrays

Numbers Numbers are an important data-building block So important there are three types: – number – int (integer) – uint (unsigned integer)

Review Terms Integer: in computer science, an integer is used to refer to a data type which represents some finite subset of the mathematical integers. These are also known as integral data types. In programming languages a data type is an attribute of a datum which tells the computer (and the programmer) something about the kind of datum it is. This involves setting constraints on the datum, such as what values it can take and what operations may be performed upon it. Common data types may include: integers, floating-point numbers (decimals), and alphanumeric strings.

Numbers: Number In ActionScript, a number can be any type of number, including fractions Example: 2.5

int The int datatype can represent any number from -2,147,483,648 to 2,147,483,648 It cannot represent fractions. Use Number.

uint Unsigned integer Can represent numbers from 0 to 4,294,967,295 Use if you need a negative number Useful when identifying colors, especially since colors are always positive whole numbers

Using Operators Examples of Operators + - * / > < >= Examples of Operators <= == != = See Operators at Adobe.Operators For more.more.

Strings Strings are sequential lists of letters, numbers, and symbols. Identify strings by placing them inside single or double quotes. Example: myCar + “Stutz Bearcat”

Strings and Operators Can’t do math with strings Concatenation (looks like string addition) Example: carModel = “Stutz” + “ “ + “Bearcat”;

Differences in Equality Operator (==) and Assignment Operator (=) Equality Operators Used to make a statement: The data on the right side of the equality operator is equal to the data on the left Statement may be true or false Assignment Operator Changes the value of the variable on the left

Boolean Definition: Boolean has one of two values, true or false Used when programs test conditions, then report back