Reputation: 3857
Does anyone know what the onLoad() or similar Event is in Flex? I'm trying initialize, but no joy.
protected function videoArea_initializeHandler(event:FlexEvent):void
{
var currentPosition:int = videoArea.verticalScrollPosition;
if (currentPosition < 0)
{
left_button.visible = false;
right_button.visible = true;
}
}
Upvotes: 4
Views: 1731
Reputation: 39408
What are you trying to initialize? If you're asking for the Flex Parallel to OnLoad(); perhaps you should tell us where onLoad() comes from?
I strongly suggest reading up on the Flex Component LifeCycle.
You can do initalization in the constructor of a component. If using MXML, you might want to use the preinitialize event. Some folks also use creationComplete.
Upvotes: 2
Reputation: 10074
The best alternative for onLoad()
in Flex would be creationComplete
.
See this link (Adobe) and this link (MikaFlex) for more information about the event hierarchy.
Upvotes: 4