Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently January 10th, 2025, 2:14 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Using scripting and variables in Flex Pub
PostPosted: October 29th, 2006, 4:40 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi

I am trying to convert a Pro pub into a Flex version. A tool in the original Pro pub has multiple check boxes, each of which uses a separate variable. The end result involves a math formula which multiplies variables from one page times their matching variables on a second page. So there are many variables and a formula to total numbers at the end that looks like:


Code:
totalc1 = (lar1 * lar1c1) + (lar2 * lar2c1) + (lar3 * lar3c1) + (lar4 * lar4c1) + (lar5 * lar5c1) + (lar6 * lar6c1) + (lar7 * lar7c1) + (lar8 * lar8c1) + (lar9 * lar9c1) + (lar10 * lar10c1)

totalc2 = (lar1 * lar1c2) + (lar2 * lar2c2) + (lar3 * lar3c2) + (lar4 * lar4c2) + (lar5 * lar5c2) + (lar6 * lar6c2) + (lar7 * lar7c2) + (lar8 * lar8c2) + (lar9 * lar9c2) + (lar10 * lar10c2)

totalc3 = (lar1 * lar1c3) + (lar2 * lar2c3) + (lar3 * lar3c3) + (lar4 * lar4c3) + (lar5 * lar5c3) + (lar6 * lar6c3) + (lar7 * lar7c3) + (lar8 * lar8c3) + (lar9 * lar9c3) + (lar10 * lar10c3)



In Pro this all works fine. In Flex editor, it also appears to work OK. In Flex runtime, playing in a Flash player, the formula fails with the error shown as NaN in place of a numerical result for "totalc1" "totalc2" and "totalc3".

I suspect this has to do with Flex's inability to save/store data in variables. However, Flex will allow variable values to be entered in one place and displayed in another. The problem seems to be the math manipulation of multiplying one variable by another and adding the results to get a total, as above. I wonder if there is a work-a-round.

Any help would be appreciated.

Kind Regards,

_________________
Stephen


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 60 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