Recommended
PDF
Learn BEM: CSS Naming Convention
PDF
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
PPTX
DOCX
KEY
PDF
PPTX
How to Build a Dynamic Social Media Plan
PPTX
Lecture about the Quantified Self for the University of Ghent
PDF
Storytelling For The Web: Integrate Storytelling in your Design Process
PDF
2024 Trend Updates: What Really Works In SEO & Content Marketing
PDF
Everything You Need To Know About ChatGPT
PDF
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
PDF
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
PPTX
How to Prepare For a Successful Job Search for 2024
PDF
Social Media Marketing Trends 2024 // The Global Indie Insights
PDF
2024 State of Marketing Report – by Hubspot
PDF
Product Design Trends in 2024 | Teenage Engineerings
PDF
Google's Just Not That Into You: Understanding Core Updates & Search Intent
PDF
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
PDF
Trends In Paid Search: Navigating The Digital Landscape In 2024
PDF
PEPSICO Presentation to CAGNY Conference Feb 2024
PDF
PDF
Content Methodology: A Best Practices Report (Webinar)
PDF
How Race, Age and Gender Shape Attitudes Towards Mental Health
PDF
Getting into the tech field. what next
PDF
ChatGPT and the Future of Work - Clark Boyd
PDF
5 Public speaking tips from TED - Visualized summary
PDF
How to have difficult conversations
More Related Content
PDF
Learn BEM: CSS Naming Convention
PDF
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
PPTX
DOCX
KEY
PDF
PPTX
How to Build a Dynamic Social Media Plan
PPTX
Lecture about the Quantified Self for the University of Ghent
Featured
PDF
Storytelling For The Web: Integrate Storytelling in your Design Process
PDF
2024 Trend Updates: What Really Works In SEO & Content Marketing
PDF
Everything You Need To Know About ChatGPT
PDF
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
PDF
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
PPTX
How to Prepare For a Successful Job Search for 2024
PDF
Social Media Marketing Trends 2024 // The Global Indie Insights
PDF
2024 State of Marketing Report – by Hubspot
PDF
Product Design Trends in 2024 | Teenage Engineerings
PDF
Google's Just Not That Into You: Understanding Core Updates & Search Intent
PDF
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
PDF
Trends In Paid Search: Navigating The Digital Landscape In 2024
PDF
PEPSICO Presentation to CAGNY Conference Feb 2024
PDF
PDF
Content Methodology: A Best Practices Report (Webinar)
PDF
How Race, Age and Gender Shape Attitudes Towards Mental Health
PDF
Getting into the tech field. what next
PDF
ChatGPT and the Future of Work - Clark Boyd
PDF
5 Public speaking tips from TED - Visualized summary
PDF
How to have difficult conversations
College 2 ActionScript 3 1. Vorig college
• Variabelen: var i:int = 7;
• Instanties
• Trace: trace(i); // Resultaat: 7
• Expressies: i < 10; // Resultaat: true;
• Conditional statements: if(i > 10) { code; }
2. 3. AS3 Reference Guide
• Flash CS 3, Flash Player 9, ActionScript 3
• Flash CS 4, Flash Player 10.1, ActionScript 3
• http://livedocs.adobe.com/flash/9.0/
ActionScriptLangRefV3/
4. Eventlisteners
• Imports en libraries
• import flash.events.Event;
• addEventListener(event, functie);
• startButton.addEventListener(MouseEvent.
CLICK, startRotation);
5. Eventlisteners
variabele constante referentie
startButton.addEventListener(MouseEvent.CLICK, startRotation);
waaraan? welk event? welke functie?
6. 7. Pythagoras
• c= + √(a 2 b2)
• function pythagoras(a:Number, b:Number):Number {
var c:Number = Math.pow(a, 2) + Math.pow(b, 2);
return Math.sqrt(c);
}
• var r:Number = pythagoras(3, 4); // Resultaat: 5
8. Pythagoras
• c= + √(a 2 b2)
• function pythagoras(a:Number, b:Number):Number {
var c:Number = Math.pow(a, 2) + Math.pow(b, 2);
return Math.sqrt(c);
}
• var r:Number = pythagoras(3, 4); // Resultaat: 5
9. Pythagoras
• c= + √(a 2 b2)
• function pythagoras(a:Number, b:Number):Number {
var c:Number = Math.pow(a, 2) + Math.pow(b, 2);
return Math.sqrt(c);
}
• var r:Number = pythagoras(3, 4); // Resultaat: 5
10. 11. 12. 13. Round
• function round(n:Number):int
{
var m:Number = n % 1;
if(m < .5)
return n - m;
else
return n - m + 1;
}
• var r:int = round(3.49991); // Resultaat: 4
• var r:int = round(6.789); // Resultaat: 7
14. 15. Eventlisteners
variabele constante referentie naar functie
startButton.addEventListener(MouseEvent.CLICK, startRotation);
waaraan? welk event? welke functie?
16. 17. Event en functie
• startButton.addEventListener(MouseEvent.CLICK,
startRotation);
• function startRotation(e:MouseEvent):void {
trace("Start met roteren");
isRotating = true;
}
18. Event en functie
• Event “klik” toevoegen aan startButton
• Als er geklikt wordt, voer startRotation uit
• Parameter: e van type MouseEvent
• Resultaat: void (niks!)
19. Voorbeeld: draaiende appel
• Importeren events
• Boolean isRotating, moet de appel draaien?
• Toevoegen 3 eventlisteners: elk frame,
start, stop
• Functie: elk frame, moet de appel draaien?
Ja? Draai de appel.
• Functie: start met roteren, zet isRotating is
true.
• Functie: stop met roteren, zet isRotating is
false
20. 21. Opdracht
• Maak een Flash-movie, met een lampje
(MovieClip) die aan en uit kan m.b.v. twee
buttons.
• Tip: elke MovieClip heeft de property
“visible” (Boolean).