You must return one object who's keys are the output ports. In other words,

function (__number outputnum) main ()
{
        var returnValueContainer = new Object()
        if(!_testMode) {
        if ( returnValueContainer.outputnum == null )
        returnValueContainer.outputnum = Math.random();

       }
        return returnValueContainer;
}


Hope that helps,

Troy

On Jul 31, 2008, at 3:08 PM, Steven Sokulski wrote:

I am looking to generate a random value at the start of a composition and have it remain static until the composition stops and starts again.

I'm assuming JavaScript would be an easy way to do this, and here's what I'm trying so far, to no avail. Any suggestions? I messed around with a sample and hold patch, but couldn't get it to grab fast enough that the value didn't change a bit at the start.

Thanks!

function (__number outputnum) main ()
{
        if(!_testMode) {
 if ( outputnum == null )
       outputnum = Math.random();
       }
}

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list ([email protected] )
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/tkoelling%40apple.com

This email sent to [EMAIL PROTECTED]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to