Hello,
I am trying to update a slider controls maximum value from a event
handler of an menu bar.
This is my Menu Bar
<mx:MenuBar id="adminMenuBar" labelField="@label" cornerRadius="6"
click="adminMenuBar_Click(event)" width="100%">
<mx:XMLList>
<menuitem label="Menu Option 1" menuitem="1" />
<menuitem label="Menu Option 2" menuitem="2" />
</mx:XMLList>
</mx:MenuBar>
Here is the slider control
<mx:HSlider id="slider" enabled="true" width="180" thumbCount="2"
snapInterval="1" minimum="0" maximum="{slider_maximum}"
dataTipPlacement="bottom" dataTipFormatFunction="getSliderLabel"
change="rangeChange()"/>
Here is my script
//------------------------------------------------------------
private function adminMenuBar_Click(event:MouseEvent):void
//------------------------------------------------------------
{
if ( [EMAIL PROTECTED] == "2" )
{
try
{
slider.maximum = 10;
}
}
}
My problem here is at slider.maximum = 10;
I get an error stating cannot reference a property or method of a
null object reference.
I cannot seem to figure this out.
Thanks for any help
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/