Programming - Workshop 3

50 %
50 %
Information about Programming - Workshop 3
How-to & DIY

Published on October 8, 2009

Author: Castemelijn

Source: slideshare.net

Description

Third presentation on programming in Actionscript 3.0. We handle Strings and functions.

Programming Cas Lemmens - Workshop 3

So far we’ve seen... Variables Mathematical functions Boolean Logic Loops Conditionals Arrays Strings Functions

Arrays fruits.push(); fruits.unshift(); fruits.pop(); fruits.shift(); fruits.splice(); fruits.concat(); fruits.length; fruits.toString();

Procedural programming Strings

var welcome:String = “Hyper Island”;

var welcome:String = “Hyper Island”; H y p e r I s l a n d

var welcome:String = “Hyper Island”; H y p e r I s l a n d 0 1 2 3 4 5 6 7 8 9 10 11

Value of an index var welcome:String = “Hyper Island”; H y p e r I s l a n d 0 1 2 3 4 5 6 7 8 9 10 11

Value of an index var welcome:String = “Hyper Island”; H y p e r I s l a n d 0 1 2 3 4 5 6 7 8 9 10 11 var answer:String = welcome.charAt(8);

Value of an index var welcome:String = “Hyper Island”; H y p e r I s l a n d 0 1 2 3 4 5 6 7 8 9 10 11 var answer:String = welcome.charAt(8);

Value of an index var welcome:String = “Hyper Island”; H y p e r I s l a n d 0 1 2 3 4 5 6 7 8 9 10 11 var answer:String = welcome.charAt(8);

Value of an index var welcome:String = “Hyper Island”; H y p e r I s l a n d 0 1 2 3 4 5 6 7 8 9 10 11 var answer:String = welcome.charAt(8); variable answer has value ”l”

Index of a value var welcome:String = “Hyper Island”; H y p e r I s l a n d 0 1 2 3 4 5 6 7 8 9 10 11

Index of a value var welcome:String = “Hyper Island”; H y p e r I s l a n d 0 1 2 3 4 5 6 7 8 9 10 11 var answer:uint = welcome.indexOf(‘e’);

Index of a value var welcome:String = “Hyper Island”; H y p e r I s l a n d 0 1 2 3 4 5 6 7 8 9 10 11 var answer:uint = welcome.indexOf(‘e’);

Index of a value var welcome:String = “Hyper Island”; H y p e r I s l a n d 0 1 2 3 4 5 6 7 8 9 10 11 var answer:uint = welcome.indexOf(‘e’);

Index of a value var welcome:String = “Hyper Island”; H y p e r I s l a n d 0 1 2 3 4 5 6 7 8 9 10 11 var answer:uint = welcome.indexOf(‘e’); variable answer has value 3

First index of a value var welcome:String = “Hyper Island”; H y p e r I s l a n d 0 1 2 3 4 5 6 7 8 9 10 11

First index of a value var welcome:String = “Hyper Island”; H y p e r I s l a n d 0 1 2 3 4 5 6 7 8 9 10 11 var answer:int = welcome.indexOf(‘e’);

First index of a value var welcome:String = “Hyper Island”; H y p e r I s l a n d 0 1 2 3 4 5 6 7 8 9 10 11 var answer:int = welcome.indexOf(‘e’);

First index of a value var welcome:String = “Hyper Island”; H y p e r I s l a n d 0 1 2 3 4 5 6 7 8 9 10 11 var answer:int = welcome.indexOf(‘e’);

First index of a value var welcome:String = “Hyper Island”; H y p e r I s l a n d 0 1 2 3 4 5 6 7 8 9 10 11 var answer:int = welcome.indexOf(‘e’); variable answer has value 3

First index of a value var welcome:String = “Hyper Island”; H y p e r I s l a n d 0 1 2 3 4 5 6 7 8 9 10 11 var answer:int = welcome.indexOf(‘e’); variable answer has value 3

Last index of a value var welcome:String = “Hyper Island”; H y p e r I s l a n d 0 1 2 3 4 5 6 7 8 9 10 11

Last index of a value var welcome:String = “Hyper Island”; H y p e r I s l a n d 0 1 2 3 4 5 6 7 8 9 10 11 var answer:int = welcome.lastIndexOf(‘e’);

Last index of a value var welcome:String = “Hyper Island”; H y p e r I s l a n d 0 1 2 3 4 5 6 7 8 9 10 11 var answer:int = welcome.lastIndexOf(‘e’);

Last index of a value var welcome:String = “Hyper Island”; H y p e r I s l a n d 0 1 2 3 4 5 6 7 8 9 10 11 var answer:int = welcome.lastIndexOf(‘e’);

Last index of a value var welcome:String = “Hyper Island”; H y p e r I s l a n d 0 1 2 3 4 5 6 7 8 9 10 11 var answer:int = welcome.lastIndexOf(‘e’); variable answer has value 3

Last index of a value var welcome:String = “Hyper Island”; H y p e r I s l a n d 0 1 2 3 4 5 6 7 8 9 10 11 var answer:int = welcome.lastIndexOf(‘e’); variable answer has value 3

Last index of a value var welcome:String = “Hyper Island”; H y p e r I s l a n d 0 1 2 3 4 5 6 7 8 9 10 11

Last index of a value var welcome:String = “Hyper Island”; H y p e r I s l a n d 0 1 2 3 4 5 6 7 8 9 10 11 var answer:int = welcome.lastIndexOf(‘z’);

Last index of a value var welcome:String = “Hyper Island”; H y p e r I s l a n d 0 1 2 3 4 5 6 7 8 9 10 11 var answer:int = welcome.lastIndexOf(‘z’); variable answer has value -1

Slicing an array var welcome:String = “Hyper Island”; H y p e r I s l a n d 0 1 2 3 4 5 6 7 8 9 10 11

Slicing an array var welcome:String = “Hyper Island”; H y p e r I s l a n d 0 1 2 3 4 5 6 7 8 9 10 11 var answer:String = welcome.slice(2,8);

Slicing an array var welcome:String = “Hyper Island”; H y p e r I s l a n d 0 1 2 3 4 5 6 7 8 9 10 11 var answer:String = welcome.slice(2,8);

Slicing an array var welcome:String = “Hyper Island”; p e r I s 2 3 4 5 6 7 var answer:String = welcome.slice(2,8);

Slicing an array var welcome:String = “Hyper Island”; p e r I s 2 3 4 5 6 7 var answer:String = welcome.slice(2,8); variable answer has value “per Is”

Splitting an array var welcome:String = “Hyper Island”; H y p e r I s l a n d 0 1 2 3 4 5 6 7 8 9 10 11

Splitting an array var welcome:String = “Hyper Island”; H y p e r I s l a n d 0 1 2 3 4 5 6 7 8 9 10 11 var answer:Array = welcome.split(7);

Splitting an array var welcome:String = “Hyper Island”; H y p e r I s l a n d 0 1 2 3 4 5 6 7 8 9 10 11 var answer:Array = welcome.split(7); variable answer has value

Splitting an array var welcome:String = “Hyper Island”; H y p e r I s l a n d 0 1 2 3 4 5 6 7 8 9 10 11 var answer:Array = welcome.split(7); variable answer has value “Hyper I” “sland”

Making a substring var welcome:String = “Hyper Island”; H y p e r I s l a n d 0 1 2 3 4 5 6 7 8 9 10 11

Making a substring var welcome:String = “Hyper Island”; H y p e r I s l a n d 0 1 2 3 4 5 6 7 8 9 10 11 var answer:String = welcome.substr(3,4);

Making a substring var welcome:String = “Hyper Island”; H y p e r I s l a n d 0 1 2 3 4 5 6 7 8 9 10 11 var answer:String = welcome.substr(3,4);

Making a substring var welcome:String = “Hyper Island”; e r I 3 4 5 6 var answer:String = welcome.substr(3,4);

Making a substring var welcome:String = “Hyper Island”; e r I 3 4 5 6 var answer:String = welcome.substr(3,4); variable answer has value “er l”

Making a substring var welcome:String = “Hyper Island”; e r I 3 4 5 6 1 2 3 4 var answer:String = welcome.substr(3,4); variable answer has value “er l”

Making a substring var welcome:String = “Hyper Island”; e r I 3 4 var answer:String = welcome.substr(3,4); variable answer has value “er l”

Making a substring var welcome:String = “Hyper Island”; e r I 3 4 var answer:String = welcome.substr(3,4); variable answer has value “er l”

Strings answer.charAt(8); answer.indexOf(‘e’); answer.lastIndexOf(‘e’); answer.slice(8); answer.split(8); answer.substr(5);

Procedural programming Functions

function name(parameter:Paramtype, ...):ReturnType { // *** MAGIC *** }

function makeHyperIslandEmailAddress (name:String, surname:String):String { var emailAddress:String = name + “.” + surname + ‘@hyperisland.se’; return emailAddress; }

RTFM! Check the docs!

Exercise 10 Awesomeness!

No homework, but please... Overlook it... Experiment with it... Ask questions! Remember: this is only the start! So please, get this!

Q&A

Thanks!

Add a comment

Related presentations

Belief comes through hearing. In order to have belief, we must listen, but we also...

Presentation held at the Etsy Team Captain Summit in Berlin, March 14-16, 2014

Download hack tool @ http://dragoncity.cooldownloadz.com

An how-to build an inexpensive Arduino Board for 5 USD.

step by step guide on how small businesses can start payroll software in -mid-year.

CLC Trendspotting - The Technologies of Makerspaces, presented by Edward Iglesias ...

Related pages

Workshop 3 Programmierung: Processing | www.hfg-karlsruhe.de

Processing ist eine Open-Source-Umgebung mit der Bilder, Animationen und Sound programmiert werden können. Die Umgebung/Programmiersprache ist entwickelt ...
Read more

Intro. to Programming Workshop - 3 - SUITS

Intro. to Programming Workshop - 3 26 March 2015 on Tutorials. Welcome back to the Intro. to Programming Workshops! This week's workshop will focus on arrays!
Read more

Kreatives Brandenburg - Drum Programming Workshop

Drum Programming Workshop Seminar/Workshop/Kurs. 1. März 2014 18:00 - 21:00 Veranstaltungsort noisy Academy Drum Programming Workshop
Read more

Workshop 3: VBA-Programmierung mit MS Excel

Workshop 3: VBA-Programmierung mit MS Excel © 2011, Dr. Volker Thormählen Seite 9 von 12 Endwert Legt den Endwert von Zähler fest. Schrittweite Optional.
Read more

Workshop: Programming Dubstep - Seite 3 von 4 - amazona.de

In unserem Workshop "Programming Dubstep" zeigen wir Euch die wichtigsten Grundlagen für das eigene Programmieren von Dubstep Beats und Bass.
Read more

PROGRAMMING WORKSHOP 3 - THESIS PROJECT PROGRAMMING

project : the fash & gallery run way. case study workshop 05. programming workshop 3
Read more

Workshops - Video-Workshop: Beat-Programmierung - recording.de

Wer beim Thema Beat-Programmierung so seine Schwierigkeiten hat, ist beim kostenlosen ''Workshop: Beat-Programmierung'' genau richtig. Mehr als 3 Stunden ...
Read more

Programming Workshop - Google Groups

3. Workshop will start from basics of programming then going into different numerical techniques and if time permits then some great images from the same ...
Read more

Overview of the programming workshop - Crouzet USA

Online Help version 5.4 29/03/2006 CLSM3 Online Help Overview of the programming workshop At a Glance Subject of this Section This section provides an ...
Read more