Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    SmartGWT - Flashlet plugin usage

    HI,

    I'm looking to use Flashlet plugin widget (com.smartgwt.client.widgets.plugins.Flashlet) from SmartGWT 2.1.

    Trying find some documentation / sample code, on how to use the plugin in any Java application.

    Can some body assist me in find a documentation or post any sample snippet of using the widget.

    Thanks,
    Shinelin

    #2
    I am also having problems using the Flashlet wigget. The following is displayed when I add the wigget to a HLayout.

    Flashlet flashlet = new Flashlet();
    flashlet.setSrc("flash/TCAMMap.swf");
    horizonalStack.addMember(flashlet);

    Here is the error:
    Uncaught exception escaped : com.google.gwt.core.client.JavaScriptException
    (TypeError): '$wnd.isc[...]' is null or not an object
    number: -2146823281
    description: '$wnd.isc[...]' is null or not an object
    See the Development console log for details.
    Register a GWT .setUncaughtExceotionHandler(..) for custom uncaught exception handling

    Comment


      #3
      Have you inherited the com.smartgwt.SmartGwtPluginBridges module?

      Comment


        #4
        Thanks smartgwt.dev your suggestion helped me get it working after days of trying to get it to work.

        The following must be added to the ...gwt.xml file
        <script src="sc/modules/ISC_PluginBridges.js"/>

        This stopped the exception.

        The following is how I set my Flashlet:
        Flashlet flashlet = new Flashlet();
        flashlet.setSrc("flash/TCAMMap.swf");
        flashlet.setSize("100%", "100%");
        horizonalStack.addMember(flashlet);

        This works in IE and Firefox... Yeah

        Comment


          #5
          I can display the flex map, TCAMOverview.swf, on my page. Now I am trying to call a method on the swf via javascript from the java program. I use the following JSNI call.

          public static native void javascriptZoomOnState(String state) /*-{
          var appName="TCAMOverview";
          var mapSwift;
          if (navigator.appName.indexOf("Microsoft") != -1) {
          mapSwift = $wnd[appName];
          if (mapSwift != null)
          {
          $wnd.alert("object is NOT null");
          mapSwift.setSelectedState(state);
          }
          else { $wnd.alert("object is null"); }
          } else {
          mapSwift = $doc[appName];
          mapSwift.setSelectedState(state);
          }
          }-*/;

          I get the following Javascript error:
          (TypeError): Object doesn't support property or method
          number: -2146827850

          If I change the appName var I get "object is null" message. So I feel that I am getting a reference to the object. However I can not execute the methods. Any suggestions?

          Comment

          Working...
          X