Hi Friends,
I stuck with 1 problem.
I created 1 .as file.In this .as file i created 1 simple button but
when i import my .as file on mxml file.It load as file but doesn't
display button on stage.
Below is my code:-
//..............................Here is test.as file.
package
{
import flash.display.MovieClip;
import mx.core.UIComponent;
import mx.controls.Alert;
import mx.controls.Button;
public class test extends MovieClip (Already tried
UIComponent instead of Movieclip)
{
private var _uploadButton:Button =new Button();
public function test ( )
{
_uploadButton.x=250;
_uploadButton.y=189;
_uploadButton.label="Upload";
addChild(_uploadButton);
Alert.show("_container:: "+_uploadButton)
}
}
}
//..............................this is mxml file.
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955"
minHeight="600" creationComplete="inti();">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects)
here
-->
</fx:Declarations>
<fx:Script>
<![CDATA[
import mx.core.UIComponent;
import test;
public function inti():void{
var Test_:test = new test();
var uiContainer:UIComponent=new UIComponent();
uiContainer.addChild(Test_);
addChild(uiContainer);
}
]]>
</fx:Script>
</s:Application>
...............................
Thanks
--
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en.