1 Reply Latest reply on Mar 16, 2011 11:06 AM by rtalton

    Declaring a variable of a class




      I'm creating a stack to save math operations that have occurred so that I can use an undo button to remove those operations.  I followed this implementation:


      http://deviltechie.wordpress.com/2010/10/03/create-a-stack-queue-data-structure-in-flex-ac tionscript/#comment-71


      I created two actionscript class files Node.as and Stack.as like what was done in the link but I do not know how to create a variable of that class in the Script area of my .mxml file.  My code looks like this:


                  import dataStore.Node;
                  import Stack;


                  var storage:dataStore.Stack;




      I was trying to create a variable called storage of type Stack but I get an error saying "1046: Type was not found or was not a compile-time constant: Stack."


      Any information on how to correctly create a variable of a stack class in the Script of my main MXML file would be very helpful.