Dec 03 2007
Changing Domains
Due to the popularity of the Papervision3d tutorials, I’m moving this site and all future tutorials to
pv3d.org
Please update your bookmarks/rss feeds to get the latest content.
Flex 3, Flash CS3, Adobe Air, and Actionscript 3.0 Tutorials for the Masses
Dec 03 2007
Due to the popularity of the Papervision3d tutorials, I’m moving this site and all future tutorials to
Please update your bookmarks/rss feeds to get the latest content.
Sep 13 2007
How to position a plane:
[flv:http://flexyouras.com/tutorials/Papervision3D/05_Positioning_Planes/05_Positioning_Planes.flv 632 532]
Sep 13 2007
How to spin a camera:
[flv:http://flexyouras.com/tutorials/Papervision3D/04_Spinning_The_Camera/04_Spinning_The_Camera.flv 632 532]
Sep 12 2007
How to rotate a plane in Papervision3D using the yaw() method
What to watch for:
[flv:http://flexyouras.com/tutorials/Papervision3D/03_Rotating_A_Plane/03_Rotating_A_Plane.flv 612 508]
Sep 12 2007
How to add a plane with a color material to a Papervision3D scene:
What to watch for:
[flv:http://flexyouras.com/tutorials/Papervision3D/02_Adding_A_Plane/02_Adding_A_Plane.flv 604 508]
Sep 12 2007
This video tut is the first in a series of Papervision3D tutorials.
In this tutorial we will create an empty Papervision3D scene:
What to watch for
(I’m using FlashDevelop so all classes will be automatically imported. As you can see towards the end, I accidentally import a class which I have to delete.)
[flv:http://flexyouras.com/tutorials/Papervision3D/01_Setting_Up_The_Scene/01_Setting_Up_The_Scene.flv 604 508]
Jun 24 2007
The ActionScript 3.0 Programming Short Cut gives the simplest examples of the most common tasks in Actionscript: Display programming, loading images, creating buttons, controlling depth, formatting text, etc. Because this is a “shortcuts” pdf, the pdf doesn’t overload you with explanations or examples. Instead it gives you enough to get started and then allowing you to experiment with different variations and ideas of your own. I think it’s a great jumping off point to familiarize yourself with the general workflow of Actionscript 3.0. The learning curve in Actionscript 3.0 may be a little steeper than 2.0, but once you learn how everything fits together with these examples, tackling new more difficult programming problems becomes second nature because Actionscript 3.0 is generally written as expected.
If you’re completely new to programming, you’d probably be better off finding a beginner’s Actionscript book as this doesn’t explain much of the “why” of programming, but it definitely shows the “how”. If you’re familiar with another programming language (especially one based on the ECMAScript standards), this pdf ought to teach you enough to get coding in Actionscript in no time. Also, if you’re familiar with Actionscript 2.0 and you’ve never worked with classes, this is for you. Lastly, if you’ve worked with Actionscript 2.0 and worked with classes and design patterns, there is some very important information (packages, internal, static, events, etc.) covered in the pdf, but nothing that you couldn’t quickly figure out by reading the Flex or Flash CS3 documentation or examples.
Jun 18 2007
<?xml version="1.0" encoding="utf-8"?> <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="init()"> <mx:Script> <![CDATA[ import flash.filesystem.File; import flash.data.SQLStatement; import flash.data.SQLConnection; import flash.data.SQLResult; import flash.events.SQLEvent; import flash.events.SQLErrorEvent; //Serves as your connection to the SQLite Database private var dbConn:SQLConnection; //Holds SQL Syntax, i.e, "CREATE TABLE…" private var dbStatement:SQLStatement; //Shows the path to where the SQLite database is stored private var dbFile:File; private function init():void{ //call the Open Database function openDB(); } private function openDB():void{ //The link to your new database named whatever you want dbFile = new File("app-resource:/mySQLiteDatabase.db"); dbConn = new SQLConnection(); //Opens the SQLlite dbFile to access db info //If dbFile doesn't exist, the "open" method will create it dbConn.open(dbFile); //Listen for the OPEN SQL event dbConn.addEventListener(SQLEvent.OPEN, onOpenDB); } private function onOpenDB(event:SQLEvent):void{ //If the OPEN event fired correctly, create the SQLlite db if(event.type == "open"){ createDB(); } } private function onErrorDB(event:SQLErrorEvent):void{ //Place error handling code here trace("sql error occurred") }; private function createDB():void{ dbStatement = new SQLStatement(); dbStatement.sqlConnection = dbConn; //Create your SQL statement using standard SQL syntax //You'll find millions of SQL syntax tutorials by googling SQL /*"IF NOT EXISTS" is required or else the swf will throw an error saying the table has already been created.*/ var dbQuery:String = "CREATE TABLE IF NOT EXISTS " + "myTable(myColumn1, myColumn2, myColumn3);"; //Assign you SQL query to the text property of the SQL statement class dbStatement.text = dbQuery; //Listen for the SQL result dbStatement.addEventListener(SQLEvent.RESULT, onResultDB); //Execute the statement dbStatement.execute(); } private function onResultDB(event:SQLEvent):void{ /*Handle the result by checking the getResult() method of the SQL statement class*/ if(dbStatement.getResult() != null){ trace("Succesfully opened myTable from mySQLiteDatabase.db!"); /*You will now find a file called "mySQLiteDatabase.db" in the bin folder of your project folder. This is where all the SQLite database information will be stored in future tutorials*/ } } ]]> </mx:Script> </mx:WindowedApplication>
Jun 17 2007
There is so much information packed into this book, it’s hard to sum it all up. Basically, if you have an actionscript question from TextFields to XML or loading video to gradient fills it will be answered in this book.
Probably the best part about this cookbook is how well organized it is. You’ll have no trouble finding the term you’re looking for in the table of contents or in the index if it’s something a little more specific. The answers fully answer the question without going on too many tangents. Sometimes it feels like they overexplain some of the examples because the example actionscript code can usually speak for itself.
I have a love/hate relationship with some of their answers because they choose to create a set of custom classes to solve some of the common problems. I appreciate how much time it saves to download their classes and then use their customs methods, but it almost feels like it’s cheating to teach that you’re supposed to use one of their custom classes to code correctly.
There seems to be some inconsistencies in the quality of the explanations as well. I imagine it’s because there are three different authors contributing to the book. Some of the examples are brilliant, while others seem barely adequate. For example, the sound chapter has excellent examples of adjusting volume, pan, and pulling sounds out of the sound spectrum (which is a very exciting addition to Actionscript 3!) which wraps up with a three page spread of code showing a full mp3 application with everything you might want to do with it. On the other hand, there’s the File Management chapter which seems choppy and mashed together and lacks a full package example showing a how all the code fits together.
Whatever way you look at it, there is a lot of value to this book. I know there’s code in the book that I will only use once or twice, but I’m glad to know that it’s there when the time comes to look it up. Although much of this information is available online, you will definitely save yourself hours of time by having this book handy on the shelf to pull out and quickly find the recipe you’re looking for. Although not perfect, I still feel like this book deserves 5 stars because it stands out above the rest of the Actionscript books out there.
Jun 13 2007
What to watch for
View the EmbeddingFonts.mxml
Download the MICKEY font (originally from dafont.com)