Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 23rd, 2024, 2:32 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Opus script and flash
PostPosted: July 21st, 2010, 10:45 am 
Offline

Joined: May 16th, 2008, 4:50 pm
Posts: 368
Location: Berghem The Netherlands
Opus: Opus Pro 9.75
OS: Windows 10
System: `HP
Hi,

I am working on a count up / down clock that must be saved as a flash application.
I use a very nice script. In Opus it works great, but it won't work after publishing.
Is there a way to use a script in flash?



function TwoDigit(n)
{
return ((n > 9) ? "" : "0") + n
}

function ConvertTime(sec)
{
var min = Math.floor(sec/60)
sec = sec % 60
var hr = Math.floor(min/60)
min = min % 60

return TwoDigit(hr) + ":" + TwoDigit(min) + ":" + TwoDigit(sec)
}

Ad

_________________
Opus Pro v9.75
Windows 10 on HP EliteBook i7
http://www.csnmedia.nl


For this message Ad Mulders has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject: Re: Opus script and flash
PostPosted: July 22nd, 2010, 8:03 am 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Ad,
I do not develop much with Flex. However since you do not have an answer yet, I suggest you can troubleshoot this for yourself.

Simply comment-out the code in your func. TwoDigit (or set it to a fixed value temporarily), then Publish. It could be that Flex does not like the abbreviated form or some syntax.

Then you could bring that code back in, and try the script without using modulo ( '%' ) operator. Again, is that available in Flex... I don't know.

If you need alternative script coding to achieve the time formatting... well, Search this forum for:
format time

There are many many prior examples of code.

_________________
_good things come to those who wait(0)_


For this message Lar_123 has been thanked by : mackavi


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 39 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group