Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Dec 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Simple Hello World Script

    Hey I am having trouble getting this hellWorld .as to print to console.

    package
    {
    import flash.display.MovieClip;

    public class Main extends MovieClip
    {

    public function Main()
    {

    //The next line outputs text
    trace("Hello World!");
    }
    }
    }


    I saved helloWorld.fla with "Main" as the class. But nothing comes up when I test it. Any suggestions?

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Northern NJ
    Posts
    404
    Thanks
    0
    Thanked 1 Time in 1 Post
    Make sure inside the property window that "Main" is your document value. This will connect your class (your .as file) to your flash file (your .fla file).
    I would rather be a lion for a day than a lamb that lives forever.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •