dcsimg
A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: SWF Action Script

  1. #1
    Senior Member
    Join Date
    Jul 2008
    Posts
    128

    SWF Action Script

    Does anyone know how action script is put in a swf file?
    i.e. How would I do some type of if statement?

  2. #2
    Tim (Super Moderator) Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    It's not added as human readable source, but as bytecode that is interpreted by the Flash VM. Have a look at flasm for some of the dirty details.

  3. #3
    Senior Member
    Join Date
    Jul 2008
    Posts
    128
    Thank you.

  4. #4
    Senior Member
    Join Date
    Jul 2008
    Posts
    128
    Does anyone know the swf action to check is mouse click is down? Or where to find that information?

  5. #5
    Tim (Super Moderator) Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    Write the simplest code you can, then disassemble the SWF with flasm and you can see how anything works.

  6. #6
    Senior Member
    Join Date
    Jul 2008
    Posts
    128
    Can clip actions be used to stop frames?

    What Im trying to do is if I hold the mouse down then stop the frame.
    In the swf specs it says that clip actions can only be used for sprites.
    Im not sure what they mean by that could someone explain?

  7. #7
    Senior Member
    Join Date
    Jul 2008
    Posts
    128
    I am trying to jump to frame 1 by using the mouseDown event.

    I have this.

    onClipEvent(mouseDown)
    {
    gotoAndPlay(1);
    }

    So when I have the mouse clicked down shouldn't it go to frame one?

  8. #8
    Tim (Super Moderator) Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    I believe the mouseDown event will only be triggered if you actually click the mouse on the target clip, not if you just have the mouse held down when the clip appears on the timeline. In AS2 there were some ASNative functions that returned state information, there might be something similar in AS3. You're likely to get a better answer to this in one of the more Flash focused forums or someplace like the flashcoders mailing list.

  9. #9
    Senior Member
    Join Date
    Jul 2008
    Posts
    128
    Does anyone know how many items can be pushed on the stack. If I try to do 2 strings in a row my swf file gets corrupted. I don't know if its something that I am doing or if its because the stack can only hold so much data.

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