Skip navigation
Currently Being Moderated

No output ... ?

Jul 30, 2012 7:51 AM



package {

// importing classes

import flash.display.Sprite;

// end of importing classes

public class Main extends Sprite {

          public function Main() {

          trace("Welcome to Concentration");





I tested my file at the start. I would continue, but there is not any output (after pressing F2) ... where can be the problem?

  • Currently Being Moderated
    Jul 30, 2012 8:17 AM   in reply to milanfiala

    What have you done to tie this class file into the fla?

    Mark as:
  • Currently Being Moderated
    Jul 30, 2012 8:37 AM   in reply to milanfiala

    You're using a package so clearly you're using an external .as file for the code. Make sure the code is either in the same folder as the FLA or that you told Flash where to find it via Publish Settings for AS3.0 in the Source Path tab.


    Your class is named Main so your external actionscript file should also be named


    When you click anywhere on the black canvas the properties panel shows properties for the document like FPS, width, height, etc. There is a field called "Class" with a text input next to it. Simply enter this in there: Main


    Do not put the .as file extension on it, just "Main"


    Now hit the pencil icon next to the input you just typed Main in. It might ask you what application you want to edit the code in, if so just say Flash Professional. Otherwise it should open up your code and you should see your package and your trace statement. If you do, you have it set up correctly. Try that.


    Also make sure in Publish Settings for SWF that you have not checked off to "omit trace statements" or you won't see the trace.

    Mark as:
  • Currently Being Moderated
    Jul 30, 2012 8:53 AM   in reply to milanfiala

    Glad you got it working, please mark it answered so it's filtered. Good luck!

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points