Using the SWF Messenger

build learning interactivity

Moderator: Nav

Using the SWF Messenger

Postby keisan » Thu May 03, 2012 11:51 am

Hello,
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?

Thanks,
Kathy
keisan
 
Posts: 12
Joined: Thu Apr 26, 2012 7:02 am

Re: Using the SWF Messenger

Postby jmalatino » Thu May 03, 2012 12:28 pm

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.

http://help.smartbuilder.com/node/202

Write back when you have had a chance to implement the information contained on that page to your concept.
jmalatino
 
Posts: 71
Joined: Fri Aug 26, 2011 4:03 pm

Re: Using the SWF Messenger

Postby keisan » Tue May 08, 2012 12:02 pm

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?

Kathy
keisan
 
Posts: 12
Joined: Thu Apr 26, 2012 7:02 am

Re: Using the SWF Messenger

Postby jmalatino » Tue May 08, 2012 12:19 pm

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:

this.smartbuilderRef.fireEvent("done");

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"?
jmalatino
 
Posts: 71
Joined: Fri Aug 26, 2011 4:03 pm


Return to Action/Flow Chart/Variable

Who is online

Users browsing this forum: No registered users and 1 guest

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