**UPDATE**
It would seem the location of the ActionScript Documentation I was Using was that of the old Language Reference.
The Actual Location of the ActionScript 3 Language reference is in fact now .
**UPDATE**
As I got a few moments to play with ActionScript 3, I thought now would update the Syntax involved in some earlier posts....... And also it would seem some of the examples in the . So here are some replacements you may need to use to get the examples to work from the ActionScript 3 Language Reference.
- A number of the Text classes are imported from incorect package structures. For example the example.
package {
import flash.util.trace;
import flash.display.Sprite;
import flash.display.TextField;
import flash.display.TextFieldAutoSize;
import flash.text.StyleSheet;-- snip --
TextFieldAutoSize is in the flash.text package now. Not the flash.display package. - Previously I had posted a snippet guiding how to Embed fonts in a movie. This syntax seems to be incorrect now.
package
{
import flash.util.describeType;
import flash.display.MovieClip;
import flash.display.TextField;
import flash.text.TextFormat;
import flash.text.AntiAliasType;public class Test extends MovieClip
{
// be sure this is pointing to a ttf font in your hardrive
[Embed(source="C:\WINDOWS\Fonts\somefont.ttf", fontFamily="foo")]
public var bar:String;
public function Test()-- snip --
It should be use like this.
package
{
import flash.util.describeType;
import flash.display.MovieClip;
import flash.display.TextField;
import flash.text.TextFormat;
import flash.text.AntiAliasType;
// be sure this is pointing to a ttf font in your hardrive
[Embed(source="C:\WINDOWS\Fonts\somefont.ttf", fontFamily="somefont")]
public class Test extends MovieClip
{
public var bar:String;
public function Test()-- snip --
i.e the Embed meta data has now to be moved outside the class, the same way as stage meta data exists outside the class (example posted by );
So thats as far as I got last night, I really lost interests. Maybe I chose the wrong package to start on (), but there were so many problems in that example alone that I gave up trying to work out how to get the example to compile. The idea of working on my own stuff after that just completely lost its appeal.
If any one can get the example in flash.text.TextRenderer working i would love to see it :p.
1 response so far ↓
1 Stephen Gilson // Jul 7, 2006 at 1:21 pm
Hi,
You are looking at the Beta documentation for Flex 2 and Flash Player 9. You shold look at the final released documentation here:
That version lets you add comments to individual pages if you find errors. The doc team also pushes comments to pages when it finds errors in the doc.
Stephen Gilson
Flex Doc Team
Leave a Comment