toddlernewb
01-24-2011, 04:36 AM
As the newb of newbs, I'm currently teaching myself as3, got the basic code structure down, and am on my way to graphics. I'm starting with the simplest of the simplest, such as drawing a rectangle and a text box. Problem is, every time I hit debug I get back a blank page. It happened with Flex Builder 3, and now it is happening with Flash Builder 4. I'm assuming I'm missing something incredibly obvious.
Best example is (apparently I can't link the page so here's the code itself) something I took from a tutorial website. Here is the code I have:
package {
import flash.display.Sprite;
import flash.text.TextField;
public class GreetingApp extends Sprite {
private var tField:TextField;
public function GreetingApp() {
myTest();
}
private function myTest():void {
tField = new TextField();
tField.autoSize = "left";
tField.background = true;
tField.border = true;
tField.x = 20;
tField.y = 75;
tField.text = "blah"
addChild(tField);
}
}
}
I can't think of anything I did wrong with copying down the code, this issue first came up when I was going through the Essential Actionscript book. Am I missing something? As far as I know, all software is up to date, and Firefox opens up the html but is not set to block any flash whatsoever. Exporting and having someone else open the file gets the same results. I can't exactly progress on learning graphics if I can't see what the results are... help?
Best example is (apparently I can't link the page so here's the code itself) something I took from a tutorial website. Here is the code I have:
package {
import flash.display.Sprite;
import flash.text.TextField;
public class GreetingApp extends Sprite {
private var tField:TextField;
public function GreetingApp() {
myTest();
}
private function myTest():void {
tField = new TextField();
tField.autoSize = "left";
tField.background = true;
tField.border = true;
tField.x = 20;
tField.y = 75;
tField.text = "blah"
addChild(tField);
}
}
}
I can't think of anything I did wrong with copying down the code, this issue first came up when I was going through the Essential Actionscript book. Am I missing something? As far as I know, all software is up to date, and Firefox opens up the html but is not set to block any flash whatsoever. Exporting and having someone else open the file gets the same results. I can't exactly progress on learning graphics if I can't see what the results are... help?