I would recommend not putting 60 lines of script in your template button...doing that means that every time you copy the button all 60 lines goes with it (10 buttons created means 600 lines of script, etc.) Instead I would do something like this:

on mouseUp
        DoMyCustomButtonMouseUpRoutine
end mouseUp

Then, the "DoMyCustomButtonMouseUpRoutine" handler or function can be anywhere in the message path. What's nice about this is that if you use this button in different stacks (or on different cards), each stack or card could have its own version of the DoMyCustomButtonMouseUpRoutine handler, making the button even more versatile.

If you need more control over which routine is called, you could pass the name of the button to the DoMyCustomButtonMouseUpRoutine handler and then make a decision about which routine to call based on the name. For example:

on mouseUp
        put the short name of me into theShortName
        DoMyCustomButtonMouseUpRoutine theShortName
end mouseUp


Regards,
-- Frank

Web Photos Pro: Software for Photo Bloggers and Other Photo Power Users
See us on the web at http://www.webphotospro.com/

On Jun 17, 2005, at 8:08 AM, [EMAIL PROTECTED] wrote:

From: Rob Cozens <[EMAIL PROTECTED]>
Subject: Re: stumped: set script of buttons at runtime - solution A
To: How to use Revolution <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="us-ascii"; format=flowed

Eric,

The thing I hadn't figured out that lead me down the present path was
that I couldn't figure out how to add the script to the template button.

If you are building the script at runtime, my approach won't work.  If
you're selecting from a finite number of pre-written scripts, store each
script in a separate invisible template button.

Rob Cozens

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to