A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Raise Event?..

  1. #1
    Sleepy
    Join Date
    Apr 2001
    Location
    Tallahassee, FL
    Posts
    498
    Hello everyone--
    I am working on something that has had me on my butt for awhile trying to figure out. Maybe you can help!? Imagine this...

    I have a few buttons that when pressed to something (DUH ) I am wondering if there is a way to raise an event at run time that when raised will initiate the onrelease even of the button without the need to physically press the button. It seems to me that I should be able to raise an event in actionscript. I can with other languages I use daily

    TIA

  2. #2
    Senior Member
    Join Date
    Apr 2001
    Posts
    162
    So you want something to happen (event A) when the SWF is played. And when event A is launched, you want the action that would normally occur if you pressed and released the button to take place.

    This seems really strange and I don't understand why you want to have a button when you won't even be using it to, as you say, physically press it.

    - ptolemy

  3. #3
    Sleepy
    Join Date
    Apr 2001
    Location
    Tallahassee, FL
    Posts
    498

    well..

    the main reason I would want something like that is because I *may* press the button and have events x, y, and z occur, but If I am in the code somewhere and I need events x,y, and z to fire *again* I would need to programmatically "press" the button (or more technically - raise an event that the on(release) eventhandler for the button could catch)..

    TIA

  4. #4
    Sleepy
    Join Date
    Apr 2001
    Location
    Tallahassee, FL
    Posts
    498

    nevermind....

    I am pretty sure that flash does not allow us to raise events and whatnot (at least as of the MX version). I would like to see Actionscript become robust enough to allow that in the future...

    I just moved that functionality I need into a function. That will work for this particular case, but I can definitely see the need to raise and catch events in a programmatic way... maybe the next version

    Have a happy 4th!!

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