Hi, I'm using GWaTed to play a flash movie and the same code works
with the function zoomIn() and zoomOut(), but when i'm trying to use
the fucntion stopPlay() or play() they doesn't work and the browser
shows a message:

"Disculpe las molestias, no se pudo mostrar la imagen" with a strange
graph.

here is the code, thanks in advance:



import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.*;
import com.google.gwt.user.client.*;
import org.gwanted.gwt.widget.chart.client.ui.Flash;


public class Menu implements EntryPoint {

   private Flash flash;
   private DeckPanel flashPanel = new DeckPanel();

  public void onModuleLoad() {
    // Make a command that we will execute from all leaves.
    Command cmd = new Command() {
      public void execute() {
        Window.alert("You selected a menu item!");
      }
    };

    //final Flash movie = new Flash("banner.swf", "700px", "174px");

    final String movie;
    movie   = "http://www.blabla.blabla.mx/banner.swf";;
    flash   = new Flash(movie, "700px", "174px");

    // Make some sub-menus that we will cascade from the top menu.
    MenuBar fooMenu = new MenuBar(true);
    fooMenu.addItem("the", cmd);
    fooMenu.addItem("foo", cmd);
    fooMenu.addItem("menu", cmd);

    MenuBar barMenu = new MenuBar(true);
    barMenu.addItem("the", cmd);
    barMenu.addItem("bar", cmd);
    barMenu.addItem("menu", cmd);

    MenuBar bazMenu = new MenuBar(true);
    bazMenu.addItem("the", cmd);
    bazMenu.addItem("baz", cmd);
    bazMenu.addItem("menu", cmd);

    // Make a new menu bar, adding a few cascading menus to it.
    MenuBar menu = new MenuBar();
    menu.addItem("foo", fooMenu);
    menu.addItem("bar", barMenu);
    menu.addItem("baz", bazMenu);



    // Add it to the root panel.
    DockPanel work = new DockPanel();


    FocusPanel menuPanel = new FocusPanel();

    menuPanel.add(menu);


    flashPanel.add(flash);
    flashPanel.showWidget(flashPanel.getWidgetIndex(flash));


    menuPanel.addMouseListener(new MouseListenerAdapter()
        {

            public void onMouseDown(Widget sender, int x, int y)
            {
            }

           public void onMouseEnter(Widget sender){
               flash.zoomIn();
               //Window.alert("demo-mouse-over");

            }

            public void onMouseLeave(Widget sender)
            {
                //Window.alert("demo-mouse-leave");
            }

            public void onMouseMove(Widget sender, int x, int y)
            {
            }

            public void onMouseUp(Widget sender, int x, int y)
            {
            }
});


    work.add(menuPanel, DockPanel.NORTH);
    work.add(flashPanel, DockPanel.NORTH);



    work.setHeight("100%");
    work.setWidth("100%");
    work.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);


    work.setCellHeight(menuPanel, "5%");
    work.setCellWidth(menuPanel, "100%");

    work.setCellHorizontalAlignment(menuPanel,
HasHorizontalAlignment.ALIGN_LEFT);
    RootPanel.get().add(work);
  }
}

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to