Computations

Create unique Flash widgets you can import into SmartBuilder

Moderator: Nav

Computations

Postby Nav » Tue Apr 09, 2013 7:24 pm

A SmartBuilder user had the following question:
Hello,
I’m building Flash widgets to handle my computations because of the lack of decimal input.

I would like to create my own widgets “according to the documentation” but I can’t find the documentation.

I have searched the web, the online help, the user guide, and googled in case it was hidden somewhere.

I uploaded the widget in the Shared Library, but couldn’t figure out if there was supposed to be some kind of documentation somewhere and I just wasn’t clicking the right thing.

So, could you please send me the documentation for How To Create a Widget So It Runs in SmartBuilder to the same account as this email was sent from.

Thank you very much,
{A SmartBuilder User}
Nav
 
Posts: 866
Joined: Mon Nov 05, 2007 2:58 pm

Re: Computations

Postby Nav » Tue Apr 09, 2013 7:26 pm

Hi,
Before we get started on widgets, I just want to confirm that SmartBuilder can't currently do what you want. SmartBuilder does allow two decimal places in its variables and calculations. It's true that you can't type decimal values directly into the Variables panel or if you were trying to divide by 2.5, but there are easy workarounds to this issue (you can get the value from an InputTextObject placed off screen with the correct decimal value - http://screencast.com/t/jPk5uIPEVmbv ).

If that doesn't work for you and need to use a widget, you can find the documentation in the subfolder of the SmartBuilder Widgets Shared Library folder - http://screencast.com/t/47LF8jOu

However, Widgets require a pretty extensive knowledge of Flash programming. Usually we have people take training on the topic before supporting them (because inevitably there will be a ton of questions).

A much easier way of doing calculations is to use the SWF Messenger object. This allows you to create a simpler SWF in Flash, and then pass values back and forth between the SWF and SmartBuilder. You can find instructions on how to create one of these SWFs on this help page - http://help.smartbuilder.com/node/202

And I've attached a sample SWF that receives commands (messages) to go to frames, and returns events when it reaches certain frames. Click on the file names below to download them. Make sure that you build your SWF using AS2 or, even better, build off my example. Here's a video that show you how it works (I recorded it just the other day for another client) - http://screencast.com/t/sqq7Ybl5qk You can modify what is being done to all be on the first frame, and to do your calculations and return a final result.

So to recap, your options, in order or ascending difficulty, are:
1) get the decimal value from an input text object,
2) create a SWF and use the SWF Messenger, or
3) create a widget.

Please let me know if that helps, or if you have further questions.

- Nav
Attachments

swf messenger tester.swf [ 6 KiB | Viewed 6863 times ]

swf messenger tester.fla [ 52.5 KiB | Viewed 6863 times ]

Nav
 
Posts: 866
Joined: Mon Nov 05, 2007 2:58 pm


Return to Using the Object SDK

Who is online

Users browsing this forum: No registered users and 1 guest

cron
Not able to open ./cache/data_global.php