HTML/CSS Service

Showcase

1 comment0 views
1 Star2 Stars

Getting URL Parameters in Flex

Category: Flex Plugins    |    1,415 views    |    1 Comment

 The class uses javascript to get all of the url information, including host name, port, and url parameters among other things. The most helpful method you will find is getParameterValue(key:String):String which will give you back the parameter value for the given key.

Have multiple environments and need to get the full url with the host name and port in actionscript?

There are several methods to help with this:

getHostName()
getPort()
getProtocol() -such as http or https
getContext() -The path after the hostname but before the url parame
ters

Attached is the source. You can see that the methods are all static and use javascript to get the information back to flex. It is designed to get this information regardless of where the flex swf file lives since most people have them embeded in an html file.

Share/Save/Bookmark

  • No Related Post

 

Flex Rich Media Integration

Category: Flex Plugins, Learn Flex, flex tutorials    |    347 views    |    1 Comment

Overview

Video and audio are fast becoming an important part of business and consumer applications. If you take a look around the Web today, you will notice the influx of Web sites that contain video and audio. You probably find the wrong version of the media player is installed or there are limited options to interact with the video. All of this disrupts the user experience, and this is where Flex and Flash are far more superior.

The Adobe Flash Player contains video and audio playback and streaming capabilities. As of this writing, Flash Player 8 is installed on 90 percent of users’ computers. This is the reason companies such as Brightcove, Google, and YouTube have adopted the Flash Player to play back video.

With Flex, video is more than just a streaming experience. It can be a more tightly integrated part of the application. During playback of video, events can be triggered and behaviors of other components are driven by the events, all of which creates a much richer experience. The capabilities enable an extensive range of new, innovative, and highly interactive applications. Read more…

Share/Save/Bookmark

  • No Related Post

 

Deployment Directory Structure

Category: Flex Error, Flex Examples, Flex Plugins, flex tutorials    |    1,419 views    |    1 Comment

With the exception of the FDS2 deployment that was discussed earlier, the deployment of a Flex 2 application is very similar to Flash deployment. Flex Builder, by default, sets up a deployment directory that is used when debugging, although you can customize your deployment as you see fit. The only thing to keep in mind when customizing a deployment is that you must keep your pathing correct - meaning that, if you nest your XML files in an /xml folder for run-time parsing, you must ensure that your Flex application is pointing to that /xml folder. This applies to any external, nonembedded assets.

The following table shows a basic customized deployment directory structure.

Open table as spreadsheet

Directory/File Description
deploy/ The location of the root directory. Many developers choose a /source, /deploy directory structure, although you can use whatever you’d like.
/images The location of any nonembedded images such as PNG, JPG, and GIF.
/xml The location of any nonembedded, run-time-specific data that is wrapped in XML.
/swfs The location of any nonembedded SWFs used by your application.
/js The location of any JavaScript files.
myApp.swf Your application.
myApp.html Your application’s HTML wrapper.

Deployment with Flex Builder 2

If you are using Flex Builder 2 or the Flex Builder plugin for Eclipse, as mentioned before, both create a deployment directory for you. Located in your application project’s root directory is a /bin directory. This is where all of the wrappers are kept. The following table describes this structure.

Open table as spreadsheet

Directory/File Description
{appName}/bin/ Your application deployment root directory
AppName.swf The default SWF file for your application
AppName.html The default HTML wrapper for your application
AppName-debug.swf The default debugger SWF for your application that is used by the debugging version of Flash Player 9
AppName-debug.html The default HTML wrapper for your application’s debug file
history.htm The default wrapper for the history-management SWF
history.swf The history-management SWF
history.js The history-management JavaScript file
playerProductInstall.swf The Flash player detection/installation SWF for Express install

As you can see, by default, Flex Builder’s deployment isn’t very organized, but it works well for testing. However, if you’re going to use your own wrappers and directory structure with Flex Builder, keep in mind that you have to tell Flex Builder to not build out the wrappers by default, and redirect Flex Builder’s RUN and DEBUG commands to your custom wrappers.

Figure 18-9 illustrates how to disable HTML wrapper generation within the properties of your application. To do so, uncheck “Generate HTML wrapper file.”

Share/Save/Bookmark

  • No Related Post