your:

var pageName:String = event.it...@data;

should be"

var pageName:String = event.it...@label;

for the switch case block, @ data is "documentation.swf", while @label is
"Documentation"


On Sun, Sep 5, 2010 at 8:07 PM, Chris H <[email protected]> wrote:

>
> The choice item is defined in MXML as
>
> <menuitem label="Help">
>                 <menuitem label="Documentation" data="documentation.swf" />
>  </menuitem>
>
>
> Code on what to do when it is selected is
>
> <mx:ApplicationControlBar id="appBar" x="0" y="0" dock="false"
> visible="false" width="100%">
>         <mx:MenuBar id="appNavigation" dataProvider="{appNavigation_dp}"
> labelField="@label" iconField="@icon" itemClick="menuBarButtons(event);" />
>     </mx:ApplicationControlBar>
>
> Function called menuBarButtons is
>
> private function menuBarButtons(event:MenuEvent):void{
>                 var pageName:String = event.it...@data;
>
>                 switch(pageName){
>
> case 'Documentation':
>                     var url:URLRequest = new URLRequest('
> http://www.mydocumentation.com');
>                         navigateToURL(url,'_blank');
>
>
>                     break;
>
> }
>
> I have done the required imports such as
>
> import flash.net.navigateToURL;
>             import flash.net.URLRequest;
>             import flash.net.URLVariables;
>
>
>
> When I click on the Documentation option from the Help menu choice, no new
> URL opens
> while I am expecting a page with a URL http://www.mydocumentation.com to
> be
> opened
>
> What am I missing?
>
> Any suggestions would be appreciated.
>
>
> -------------------------------------------------------------
> To unsubscribe from this list, simply email the list with unsubscribe in
> the subject line
>
> For more info, see http://www.affug.com
> Archive @ http://www.mail-archive.com/discussion%40affug.com/
> List hosted by FusionLink <http://www.fusionlink.com>
> -------------------------------------------------------------




-- 
Darin Kohles
Adobe Certified Developer

Reply via email to