A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: [CS3] need some serious help LOL

  1. #1
    Junior Member
    Join Date
    Oct 2008

    [CS3] need some serious help LOL

    well im totally new to FLASH CS3 at all and i use AS3 becouse its getting more and more common now and its not worth it to learn AS2 first

    my question is how do i make a button the opens a stage hehe now thats newbie ...... sence im tottaly new to this i dont know if it would be a "BOOK" or just 2 line ....

    PS: all i know is how to make animations and how most of the tools work so i think it pritty much covers some of the basics .. lol game wthout animations? Weird LOL "if you got my drift"

  2. #2
    Senior Member
    Join Date
    Mar 2000
    "Stage" is a reference to the Flash Players background. You can't make "new" ones. It's the first thing on the display list and automatically comes into existence when the file opens.

    I think what you might be talking about is creating a new movieclip with a movieclip button.

    Here are the basics.

    // just set the document class to application
    // file > publish settings > settings > document class : "application"


    package {
    import flash.display.*;
    import flash.events.*;

    public class application extends MovieClip {
    public function application() {
    var myButton:MovieClip = new MovieClip;
    myButton.graphics.beginFill(0x0000FF, 1);
    myButton.graphics.drawRect(0, 0, 75, 50);
    addEventListener(MouseEvent.CLICK, myButtonListener);

    private function myButtonListener(e:MouseEvent):void {
    trace("The button was clicked. Create a new movieclip.");
    //create your new movieclip
    //I suggest making a function to "create" new movieclips

    That what you are looking for?


Posting Permissions

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

Click Here to Expand Forum to Full Width

HTML5 Development Center