[flexcoders] FlexEvent.CREATION_COMPLETE doesn't work

2007-10-04 Thread Pavel Zabelin
Hi All.

I create simple AS project:

package {
import flash.display.Sprite;

import mx.events.FlexEvent;

public class S01_CreationCompleteHandle extends Sprite
{
public function S01_CreationCompleteHandle()
{
super()
addEventListener(FlexEvent.CREATION_COMPLETE,init);
}

public function init():void
{
trace(init());
}
}
}

but function init() doesnt call. Where I mistake?



-- 
pazaal


Re: [flexcoders] Re: Minimized Panel

2007-01-15 Thread Pavel Zabelin

Will the Panel dimensions change if I use its State and put it into
VDividedBox or like this?


Re: [flexcoders] Re: Minimized Panel

2007-01-15 Thread Pavel Zabelin

Some misunderstanding :(. I mean that I dont want that Panel change its size
when its STATE is minimized in any parent container.




yes, you can resize the panel, add and remove components and make
many other changes from state to state.




[flexcoders] Minimized Panel

2007-01-12 Thread Pavel Zabelin

Hi all! People have you any idea how to develop Panel that have minimize
functionality?


[flexcoders] trouble with addChild

2007-01-10 Thread Pavel Zabelin

Hi all. I tried to do that:

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx= http://www.adobe.com/2006/mxml; layout=absolute
currentState=partview width=100% height=100%
mx:Script
![CDATA[
private var cp:Panel
private function onCopyClick(event:MouseEvent):void
{
cp=pnl;
application.setCurrentState('fullview')
fullc.addChild(cp);
}
private function onCopyClick2(event:MouseEvent):void
{
trace(playout+|+cp)
playout.addChild(cp);
if (fullc.getChildren().length0)
{
fullc.removeAllChildren();
}
application.setCurrentState('partview')
}
]]
/mx:Script
mx:states
mx:State name=partview
mx:AddChild position=lastChild
mx:VBox id=playout x=32 y=88 height=351 width=287
mx:Panel id=pnl width=100% height=100% layout=absolute
/mx:Panel
/mx:VBox
/mx:AddChild
/mx:State
mx:State name=fullview
mx:AddChild position=lastChild
mx:VBox id=fullc x=0 y=58 width=100% height=100%
/mx:VBox
/mx:AddChild
/mx:State
/mx:states
mx:ApplicationControlBar x=0 y=0 width=100% height=50
mx:Button label=Button1 click=onCopyClick(event)/
mx:Button label=Button2 click=onCopyClick2(event)/
/mx:ApplicationControlBar
/mx:Application

but I got error with RangeError: Error #2006: The supplied index is out of
bounds. What the reason?


Re: [flexcoders] Re: trouble with addChild

2007-01-10 Thread Pavel Zabelin

Solved! Need just using playout.addChild(fullc.removeChild(.));


[flexcoders] How I can get access Application's script

2007-01-10 Thread Pavel Zabelin

HI.

How I can get access Application's script from instance of some class.
Application's script I mean that:

mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute
backgroundGradientColors=[#272936, #272936]
xmlns:components=components.* xmlns:panels=panels.* currentState=main
creationComplete=createLayout(); width=100% height=100%
mx:Script
![CDATA[
import components.AdvancedPanel;
import panels.CallListPanel;
public function test2():void
{
}
]]
/mx:Script

for example function test2 ?