Implementing the Standard Flash Widget

The standard implementation for the Flash widget creates the EMBED tag, as shown in Listing 15.129 by simply stringing together a number of Strings. In a real implementation, we would use the parameters passed in to set dimensions, etc., but, in our example, we just hard code all the parameters. Note that, in the URL, we set the title value to be the word "Other", which is what we expect to be displayed on screen.

Listing 15.129 Defining the Flash widget's implementation class for the majority of browsers supported by GWT.

1.3817 public class FlashMovielmpl {

1.3818

1.3819 public String createMovie(FlashMovieParameters params) { 1.3 82 0 String theMovie = "";

1.3 821 theMovie += "<embed src=\"flash_movie.swf?slogan=&slogan_white=&title=Other&title_white=Other&url=\" ";

1.3822 theMovie += "width=\"318\" height=\"252\" play=\"true\" loop=\"false\"";

1.3823 theMovie += " quality=\"high\" ";

1.3824 theMovie +=

"pluginspage=\"http://www.macromedia.com/go/getflashplayer\">";

1.3825 theMovie += "</embed>"; 1.3 82 6 return theMovie;

Now that we have defined the standard implementation, we need to provide the Internet Explorer specific implementation.

0 0

Post a comment

  • Receive news updates via email from this site