I am getting my head around Flash, and to put it simply, I can’t figure out where to put the code.
I am used to Visual IDE’s where I can drag objects from a toolbox onto a workspace/canvas, and then view a list of this objects event handlers and put code under a particular event handler.
Flash doesn’t seem to work like this. There is no Button object in the toolbox, which instead means you need to use the rectangle tool to draw a rectangle, and then use Convert to Symbol convert this to a button. Now I have a button, and I want to change the text of a label to “Hello World”.
I drag what I am assuming is a label (the big T) onto my canvas and enumerate through the properties to try and find a name/ID for the label, I can’t find this.
So two questions:
- In Flash CS6, how do I access the click event of a button?
- In Flash CS6, how do I identify a label (or any other object) in order to access the objects properties?
Thanks
Like any of your code, this can be done in the
Actionspane or in a text editor. Something like:The object needs to be saved as symbol and then you can give an instance of that symbol a name. Then just modify it by referencing its name. The reason why you can’t find the “properties” for a textbox is because it isn’t a symbol. Select the textfield then hit F8 (or go to Modify -> Convert to Symbol) and then you will be able to treat it like a symbol.
I think it would help you a lot to Google around for a tutorial or two until you get the hang of the basics since it is a bit different than say, Visual Studio. Here is one specifically about textfields.