The Enchanted Cave 2
Delve into a strange cave with a seemingly endless supply of treasure, strategically choos
4.39 / 5.00 38,635 ViewsGhostbusters B.I.P.
COMPLETE edition of the interactive "choose next panel" comic
4.09 / 5.00 15,161 ViewsHere is the script in my document class:
package {
import flash.display.*;
import fl.controls:Button
import flash.events.*;
public class Main extends MovieClip {
public function Main() {
var startButton:Button=new Button()
startButton.label="Play"
startButton.x=width/2
startButton.y=height/2
}
}
}
The debugger wanted me to change this:
import fl.controls.Button
To this:
import fl.controls:Button
What is going on?
Also, when I changed the line, is still gave an error for it saying I need a semicolon before the colon.????????
The line should be this:
import fl.controls.Button;
The problem is however, that when creating components via AS you need an instance of that component in your library.
I have a button in my library, will that work?
At 7/7/10 09:23 PM, kylelyk wrote: I have a button in my library, will that work?
It needs to be the button component (Window > Components, Ctrl+F7) and not just a button symbol.
If you want to create a button symbol use SimpleButton() instead of Button().
AHHHHHHH!!!! What's the difference between simplebutton and button component? How do each work?
At 7/7/10 10:02 PM, kylelyk wrote: AHHHHHHH!!!! What's the difference between simplebutton and button component? How do each work?
A simple button is what you draw on the stage and convert into a symbol. A component button is pre-made and can be found in the components panel.