The following post is part of firstborn's mentorship program. For more information and a full table of contents, check out the mentorship main post.
Stage Demo
download: 001_stageDemo.zip
Many of firstborn's websites take up 100% of the browser-window's height and width, and then center the website in the middle. This little script shows how to achieve that.
Font Demo (embedded in main swf)
download: 002_fontDemoInternal.zip
This example demonstrates how to embed a font into the library of a flash file and then create dynamic text fields, using that font. While this practice is easy and sufficient to help you understand the basic principles of creating dynamic textfields in flash, it is not optimal, because you would usually try to load fonts after the application has started, to avoid a too heavy initial load.
loading external Fonts
download: 006_externalFont.zip
The next step of Font handling: loading external fonts. While the method in this example still isn't the most advanced, it is a lot more professional than the one you learned before. Pay attention to the timeline in the font.fla, because it contains important code, that registers the fonts so you can use them in your main Flash application...
Button Class Example
download: 004_buttonExample.zip
A basic button class example, with rollover and rollout states. When you create a new instance of the button class, you can set the text of that button and the button size adapts automatically to it. This example also shows you the basic usage of the Tweening Engine "Tweener".
