np. I've spent hours on what I thought was a complicated issue, only to find
something simple.

Add a break point in and track variables with the step de-bugger; best way
to keep track. During initial development I used to use a lot of trace()
statements (I probably still use to many). but stepping through code as it
executes makes life a lot easier. Plus you don't have to go back and comment
out or delete.

On Mon, Sep 6, 2010 at 1:13 PM, Chris H <[email protected]> wrote:

> Thanks Darin,
>
> I changed the data = "documentation.swf" to data = "helpdoc"
>
> and changed case 'Documentation' to  case 'helpdoc' and it worked fine.
>
> I appreciate your time and advice.
>
> I feel silly for not knowing it myself.
>
> ------------------------------
> *From:* Darin Kohles <[email protected]>
> *To:* [email protected]
> *Sent:* Mon, September 6, 2010 3:34:09 AM
> *Subject:* Re: [AFFUG Discuss] newbie question: opening a page in a
> browser when a choice is selected from the Menu
>
> 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 <http://flash.net.na>.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
>
>
> -------------------------------------------------------------
> 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