Flash MX 2004: scale and rotate dialog

New scale and rotate dialogSince Flash MX 2004 has been introduced by Macromedia, people has been hacking around with one of its most powerful development features: JSFL, the JavaScript-like macro feature that helps you create new commands, tools and effects to be executed within the Flash authoring tool.

Unfortunatelly, this feature/language is largely undocumented, so Flash coders all around are scratching their heads trying to get their JSFL stuff to work the way they want. They’ve even created a small HTML documentation based on the syntax help from the Flash files themselves, but it’s still a big black box.

At the same time, Flash users who switched to Flash MX 2004 have been scratching their heads trying to understand why the hell would Macromedia drop some old, stablished, useful features from Flash MX 2004 altogether. One of such features – and my biggest personal grudge against MX 2004 – is the fact that the “Scale and Rotate” dialog – used as ctrl+alt+s on a PC – was removed from it. This dialog has been present on Flash since the very first Flash version (I believe) and oftenly when trying to work with Flash MX 2004 I’d hit ctrl+alt+s for the 1000th time only to scream in anger for the absence of it (and no, the transform dialog isn’t just the same thing – it’s absolute and not relative, and you still have to use your mouse to use it properly).

I decided to give it a try and, despite the complete lack of any kind of JSFL and XML UI documentation and/or examples, I was finally able to create such a dialog that acts just like the old one used to (although the dialog visuals are very basic). With the help from the Flashcoders list archive and the almighty search feature, I bring you… the Ctrl+Alt+S dialog.

To install it, download the source files: scaleAndRotate.jsfl and scaleAndRotatePanel.xml. Save both to your Flash 2004 “Commands” directory (usually C:\Program Files\Macromedia\Flash MX 2004\en\First Run\Commands). Restart Flash MX 2004, and the new “scaleAndRotate” command will be listed on the Commands menu.

Now you just need to assign it a shortcut using the Edit > Keyboard Shortcuts dialog, and you’re done. Ctrl+alt+s once again! HOORJ!

I’ll add the ability to remember values and change the dialog appearance (to work like the original one) later.

Update (11/Nov): Macromedia has added the Scale and Rotate relative dialog back to Flash on its point release (Flash 7.0.1 update). I strongly advice Flash MX 2004 users to upgrade – it’s a free update – instead of using my semi-functional JSFL hacks. πŸ™‚

35 responses

  1. Some one just heard my voice! Thnkx GOD!!!!
    I was sad to think that MM removed this feature because that no one likes it, or use it.. I don’t know… but it’s a great command.. Thnkx to ZEH!

  2. I thought I was going nuts when the Scale and Rotate dialog never came up.

    Maybe MM took it out on purpose. So developers could get the heads round the whole JSFL and make their own features. You’ve proven that by recreating the Scale and Rotate.

    Great job btw.

  3. There were hundreds of people flooding the various flash forums about this tool. Thanks for this JSFL!

  4. Despite having worked with Flash since version 3, I have to admit I’ve never even heard of this feature before. Thanks for letting me know so I can miss it aswell ;o)
    You NEVER stop learning Flash…

  5. What a fucking poser. Thats the very same dialog box that comes with the JSAPI documentation and samples. You didnt make that, you didnt even bother to change the freaking file name. And the reason you havent put in the ability to remember the last values is becaiue you dont know how.

  6. What? IS THERE a dialog that comes with it? What’s the JSAPI documentation and samples you mentioned? Where can I find it? You surely don’t mean Macromedia’s JSAPI documentation – which isn’t released yet?

    I truly didn’t know something like this was already done. And that’s NOT copied from anything. Same name? If that’s the case that’s a coincidence (also, the original one WAS called “Scale and Rotate”, that’s why I named it “scaleAndRotate”). And I didn’t put that ability yet because I didn’t have the time to play with it anymore, although I saw there were properties for persistent data – that’s why I knew that could be done and will add it later if that’s the case.

    You might be correct in telling there’s some similar thing available. But you’re wrong on saying it’s the same one, or saying I’m a “fucking poser” without even knowing me. I did look for examples on how to build XML UI dialogs and built it from scratch using help with the syntax I found on flashcoders (as cited on my post). If that’s a repetition of something that’s already around, I apologize for re-doing something that’s already done (duh). But I did not copy nor find ANYTHING like this dialog before — if I had, I’d just install it on my machine and forget about creating one myself.

  7. >>> What? IS THERE a dialog that comes with it?
    yes there is.

    >>> What’s the JSAPI documentation and samples you mentioned?

    its a set of documentation listing all the features of the JSFL docuimentation for Macromedia Flash.

    >>> Where can I find it?
    Most people cant get cause macromedia hasnt made it public. But obviously you got a hold of a copy from someone.

    >>>You surely don’t mean Macromedia’s JSAPI documentation – which isn’t released yet?

    I absolutely Do and don’t call me Shirley. And yes it has been released just not to the general public.

  8. So you’re saying I released a copy of something that wasn’t released to the general public (and I have never seen), and called me a “fucking poser” because of it. Um-hum.

    Let me tell you something, I didn’t “get a hold of a copy” from anyone. I’m not a beta tester. I don’t have close contacts with beta testers or anyone from macromedia. If you have it yourself, and one example looks like mine, that’s not my problem.

    At least I feel relieved now. For a moment I though I had redone something that was already available. I got really worried and though someone would do a mistake by thinking I had indeed copied from it. But now I see you’re just trying to imply that not only I copied it, but that I copied from something that isn’t available at all and that I somehow had it. Just easier for me to forget about the whole deal.

  9. Oh, I see now that you sent me it. Someone ZIP’d a file with documentation leaked from MM, some other stuff available online (the link from http://www.dynamicflash.co.uk/jsfl/ for example), and my example. Then you received it and thought it was 100% from macromedia and thought I got a hold of it and posted it as it was mine.. not that it was simply attached to the zip file with no documentation.

    It fooled me. For a moment I though it was my material on MM’s stuff. I was wrong, it was just some leaker’s additional work.

    Case closed. I’ll be away from the computer this weekend, so one less thing to worry about. πŸ™‚

  10. i don’t care if anyone stole it i just care that my fav shortcut is back

    THANK YOU whoever made it, and JESUS CHRIST MM HOW THE F… COULD YOU REMOVE SUCH A COMMAND!

  11. Anon: rest asured, no one stoled it.

    Or, better, someone downloaded it from here, included it on a zip file with some other leaked material, distributed it, then someone came here and said I had stolen it from the zip file. Go figure.

  12. Thanks dude!
    Not only do I get my favorite feature back but I can also make my own commands now . BTW you are No. 1 on google with the keywords “2004 ctrl alt s”. Congratulations!

  13. If this example was really stolen. Would Macromedia be doing this?

    No Scale & Rotate item – issue update: 9/12/03

    Issue
    Users cannot find Transform > Scale & Rotate (the keyboard shortcut for this command is Control-Alt-S).

    Reason
    The Scale & Rotate menu item has been removed from Flash MX 2004 as part of the general redesign of the user interface. The Transform panel or Free Rotation tool is now the recommended method for scaling and rotating. The Transform panel can be opened with the Control-T shortcut, and the Free Rotation tool can be activated with the Q key. Additional keyboard shortcuts can also be added through keyboard shortcut customization.

    End users wishing to use the previous Scale & Rotate functionality can download a 3rd party version of the tool, created using the Flash MX 2004 Extensibility API.

    http://www.macromedia.com/support/flash/ts/documents/mx_04_emerging_issues.htm

    Case closed.

    Great work zeh.

  14. HISTORY for Scale & Rotate.

    I sincerely miss that the old (MX) scale and rotate saved your last used scale settings.

    I see Steve, that you’ve (or your friend?) tried to implement it using SharedObject. However, this requires the Dialog to be a .swf (e.g. window). Would it be possible to do this as a command, e.g. like the above posted Scale and Rotate?

    Ideally, a scale and rotate that worked EXACTLY like the old one — that is, with history.

    Possible?

  15. Thanks cisnky!

    Anon: yep, I’ve been researching into that… I can make it record AND read the previous set data, however, it looks like there’s no way to SET the xml panel data befroehand (making it display previous values as default). It is possible with a SWF file attached to the xmlpanel, since attached SWF movies have methods to set and read the xmlpanel data, but I wanted to do it without the need for an additional swf file.

    Steve’s solution is nice, but it creates a new flash panel; the old one was a simple dialog that was opened and closed. Of course, you can create shortcuts to open and close it, but I will stick with the xmlpanel myself for now; I’m just waiting for MM’s MX JS reference to check if I can pass parameters to the xmlpanel object. If not possible, I’ll make it use a (small/hidden) attached swf movie to get and set values…

  16. I’ll look forward to that zeh. I’ve tried taking the swf posted here, and placing it inside the command. It could be “skinned” to look like standard windows UI, but I fail whenever i need to apply & close the command window.

  17. Wow~ Your very cool man πŸ˜€

    Thank you~!

    from Korea Fc(FlashConference Korea)

    [Fc]
    +http://www.flashconference.co.kr

Comments are closed.