Actionscript for exit?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JuneNasch
    New Member
    • Jul 2007
    • 1

    Actionscript for exit?

    Hi. I'm a beginner in using Actionscript. Do you know what is the actionscript for a button to exit or quit my project? I'm using Flash 8 pro. I don't know which version of actionscript is used, but I really want an answer compatible to my software. (If i'm not mistaken it's actionscript 2.0)
    Also, does any of you know how the actionscript for a button so that when it's pressed, a text will appear? If another button is pressed, different text will appear but in the same place.
    Thanks in advance
  • axis
    New Member
    • Apr 2007
    • 12

    #2
    Originally posted by JuneNasch
    Hi. I'm a beginner in using Actionscript. Do you know what is the actionscript for a button to exit or quit my project? I'm using Flash 8 pro. I don't know which version of actionscript is used, but I really want an answer compatible to my software. (If i'm not mistaken it's actionscript 2.0)
    Also, does any of you know how the actionscript for a button so that when it's pressed, a text will appear? If another button is pressed, different text will appear but in the same place.
    Thanks in advance
    Quitting the project (only with a projector: in publish settings, check Windows projector or Mac projector if on a mac)

    Code:
    fscommand("quit");
    Making text appear:
    make a dynamic text field, and give it a linked variable (put a name in the Var box, I've used "txt" in the following code). Make 2 buttons
    On the one button
    Code:
    on(press)
    {
    txt = "some text";
    }
    and in the other button do the same thing, but change the text in the quotation marks.

    Comment

    • crabpot8
      New Member
      • Aug 2007
      • 40

      #3
      axis is correct in his way. there is another way, same basic stufff. make a dynamic text field, put in an instance name(i will use 'music_status') , and in your AS you can do
      on (release) {
      music_status.te xt = 'On';
      }

      or music_status.te xt = 'Off'

      i am not sure what, if any, are the benefits of one way over the other

      Comment

      • axis
        New Member
        • Apr 2007
        • 12

        #4
        Originally posted by crabpot8
        i am not sure what, if any, are the benefits of one way over the other
        It's actually more benficial using your way, as you can then also look at and modify properties of the textfield. So you can format the text, change it's _x, _y, look at how many lines of text it has, etc.

        Comment

        Working...