Page 1 of 1

Using the SWF Messenger

PostPosted: Thu May 03, 2012 11:51 am
by keisan
We just started using SmartBuilder about 2 weeks ago and I need some direction. I have created a swf in Flash and imported it into SmartBuilder. I am using the SWF Messenger to load the imported swf file and I can't get SmartBuilder to react.

What I am trying to do is get SmartBuilder to go to the next page if the right arrow on the keyboard is pressed and back a page if the left arrow on the keyboard is pressed. I have been using Flash for a number of years so the coding is not a problem for me. I am using Flash CS5 AS2. I have looked at the Done example and can get it to work. I am starting to think I may need to create a widget but will need to get an SDK license ID.

Can someone point me to a better example of using the SWF Messenger or just provide some clue of how to proceed?


Re: Using the SWF Messenger

PostPosted: Thu May 03, 2012 12:28 pm
by jmalatino
Here is a link to our Help site that explains how to use the SWF Messenger to communicate between your SWF and SmartBuilder. Or vise versa.

Write back when you have had a chance to implement the information contained on that page to your concept.

Re: Using the SWF Messenger

PostPosted: Tue May 08, 2012 12:02 pm
by keisan
OK, I can get this to work. I have also created a button in SmartBuilder that will go to a particular frame in an imported swf file. However, I still can't get SmartBuilder to react to code or a trigger in an imported swf.

I am thinking that I may need an SDK license. Thoughts?


Re: Using the SWF Messenger

PostPosted: Tue May 08, 2012 12:19 pm
by jmalatino
To get SmartBuilder to react to events that happen in your SWF you have to send an "event" from the SWF inside your SWF Messenger object to your SmartBuilder lesson. Here is an excerpt from our Help Documentation about how to accomplish this.

1. In Flash, simply place the following ActionScript code in your SWF on the frame that you want to fire the event:


Where "done" is the name of the event.

Note: There can be more than one event in a single SWF.

2. In SmartBuilder, create a SWF Messenger object and load your SWF with the above code in it. Be sure to rename the widget so it's easy to find.

3. Then set up an action with the following:

Trigger: SWF Messenger > onEvent
Condition: SWF Messenger > getEvent == done
True Response: Done text > show
False Response: [leave blank]

Note: If there is only one event, it is not entirely necessary to set up a condition, as it will be the only event that is fired from the SWF.

Contact us via the Live Support Chat and we can delve more fully into the specifics of your particular example. Also I am not sure what you mean by "SDK License"?

Not able to open ./cache/data_global.php