Question

Flex 3: How do I reference a displayobject in a module from a component on the application?

Asked by: virgewest

I have an application that loads a module using modulemanager. A component on the module loads a new module, using module manager. I now want a component (button) on the main application to reference a property of a textarea on the current module. The code below is in the button on the app. The module is video.swf. myMod creates the reference to the video module OK. the new textArea references a textarea OK. The textArea "transcript" is on the module "video", but the third line always returns a null object. Can someone please help - why?

var myMod:video=parentApplication.info.factory.create() as video;
var ts:TextArea=new TextArea();
ts=myMod["transcript"];

                                  
1:
2:
3:

Select allOpen in new window

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-08-16 at 18:16:06ID24657011
Tags

flex 3

Topic

Adobe Flex

Participating Experts
1
Points
0
Comments
16

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Module
    Hi, I have written a module,the result returned must be of type number,but it is displaying as text.can you suggest how to make the return type to be of number type. Function value(Field1 As Single, Field2 As Variant) Dim product As Single If IsNull(Field2) Then Field...
  2. Software for medical transcription
    I have started a medical trascription company.I am not a technical guy.I am looking for someone who can design and develop a simple file upload/download site the way medical transcription company needs. my Idea is:1).The doctor's will logon using a unique userid and password...
  3. Flex Module memory leak
    well im not sure if this is a bug but.. suppose i have this app: main.mxml <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Script> <![CDATA[ public function test():void { ml.unloadModule(); } ]]> </mx:...
  4. Flex - Problem loading Modules
    I'm trying to load a module in Flex using the ModuleLoader tag. The url property of the tag is set at runtime, which triggers the module to load. When the module load is triggered I get this error: VerifyError: Error #1014: Class mx.modules::Module could not be found. at f...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: virgewestPosted on 2009-08-17 at 16:02:27ID: 25119120

Increase points - please help!

 

by: danyul_cPosted on 2009-08-17 at 20:31:45ID: 25119968

Hi,
I don't do much of this outside of a framework that handles this for me but I believe if you follow my suggestions it will work.

1. When you are instantiating the module you may be facing race conditions. The TextArea inside the module may not be created before you are trying to reference it externally. So in this case you will want to give myMod an event handler to run lines 2 and 3 once the module is properly initialised.

2. I'm not sure about referencing properties using square brackets with modules. I know this works with objects and should therefore work with everything however I use the period method e.g myMod.transcript.

I would also take a look at http://livedocs.adobe.com/flex/3/html/help.html?content=modular_7.html for the proper use of ModuleManager and this should help it get into memory properly before you call it.

If these suggestions aren't working then I would like to see the code where you define your parentApplication and use the ModuleManager to load in the swf.

 

by: virgewestPosted on 2009-08-17 at 20:57:52ID: 25120055

Hi danyul_c, Thanks for responding.
I have tried giving myMod a function which is actually on myMod. The function runs, until it hits a reference to a display object on myMod. Then it returns a null object again. Whether I use [] or . syntax as you suggest. I've looked through the article you suggest a thousand times, and passing functions works fine, but not referencing any displayobject o the module, always returning a null object ref.

The parent application is defined in mxml, standard. The modules all load fine. ModuleManager code to load is as per the article you mention above.

I'm stumped. eg once the module "video" is loaded, any reference to anydisplay object returns a null object reference. Even the statement "this" does not work within the module. btw, the code all woked fine outside as an as file....


 

by: danyul_cPosted on 2009-08-17 at 21:07:37ID: 25120077

Could I see the code for your module?

 

by: virgewestPosted on 2009-08-17 at 21:11:16ID: 25120084

Looks awful - hope you can read it!

<?xml version="1.0" encoding="utf-8"?>
<mx:Module xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="565" height="410" xmlns:custom="components.*" creationComplete="{do_video(parentApplication.sIssue)}" backgroundAlpha="0.0" currentState="Video">
	<mx:Script>
		<![CDATA[
			// ActionScript file
			import flash.filters.BevelFilter;
			import mx.printing.FlexPrintJob;
			import components.navButton;
			import components.PrintView;
			[Bindable]
			public var vidTranscript:String=new String();
			
			public var today:String=new String();
			public var yesterday:String=new String();
			public var tomorrow:String=new String();
			
			
			public function do_video(btnName:String):void{
				parentApplication.printToolTip="Print transcript of the video";
				parentApplication.helpToolTip="Watch the video, and then choose a module to work on";
				
//				parentDocument.currentState="Video";
				parentApplication.printType="Transcript";
				parentApplication.sIssue=btnName;
				
				parentApplication.sModule="video";
				parentApplication.Module="Video";
				
				
			 	switch (btnName){
					case "anim":
						parentApplication.sFullIssue="Animal Rights";
						vidTranscript="Hello. I'm Parthena. I <font color='#0000FF'><a href='event:t01'>went</a></font> to the <font color='#0000FF'><a href='event:izoo'>zoo</a></font> with my <font color='#0000FF'><a href='event:ichildren'>children</a> <a href='event:t02'>yesterday</a></font>. It was a<font color='#0000FF'> <a href='event:ilovely'>lovely sunny day</a></font> and we had a <font color='#0000FF'><a href='event:igoodtime'>good time</a></font>. But I was <font color='#0000FF'><a href='event:iunhappy'>unhappy</a></font> about some of the <font color='#0000FF'><a href='event:icages'>cages</a></font>. They are very <font color='#0000FF'><a href='event:ismall'>small</a></font>. Some of the <font color='#0000FF'><a href='event:ielephants'>elephants</a> </font><font color='#0000FF'><a href='event:t03'>live</a></font> in <font color='#0000FF'><a href='event:itiny'>tiny</a> <a href='event:iconcrete'>concrete</a> <a href='event:iyards'>yards</a></font>. They don't have a very good <font color='#0000FF'><a href='event:t04'>life</a></font>."
						break;
				}
				
    			var hotImagearea:Image=new Image();
    			hotImagearea=this["myHotImage"];
    			var hotTextarea:Text=new Text();
    			hotTextarea=this["myHotText"];
    			hotImagearea.visible=false;
    			hotTextarea.visible=false;
    			
    			var issueTranscript:TextArea=new TextArea();
    			issueTranscript=this["transcript"];
    			issueTranscript.selectable=true;
				issueTranscript.htmlText=vidTranscript;
				issueTranscript.visible=false;
				issueTranscript.addEventListener(TextEvent.LINK, linkHandler);
				
				
			}
			
			private function linkHandler(e:TextEvent):void {
            	var hotlink:String=new String();
            	hotlink=String(e.text);
            	var mouseposx:int=e.target.mouseX;
            	var mouseposy:int=e.target.mouseY;
            	trace(mouseposx);
            	var hottype:String=hotlink.charAt(0);            	
    			var hotImagearea:Image=new Image();
    			hotImagearea=this["myHotImage"];
    			var hotTextarea:Text=new Text();
    			var bevel:BevelFilter=new BevelFilter();
    			bevel.distance=3;
    			hotTextarea=this["myHotText"];
    			hotTextarea.filters=[bevel];
    			hotImagearea.visible=false;
    			hotTextarea.visible=false;
            	switch (hottype) {
            		case "t":
            			trace ("text hotword");
            			var hotText:String=new String();
            			switch (hotlink){
            				case "t01":
            					hotText="<b>went</b><br/><b><i>to go</i></b><br/>I <i>go</i> to the shops everyday.<br/>I <i>went</i> to the shop yesterday."
            					break;
        					case "t02":
        						getToday();
        						hotText="Today is "+today+"<br/><b>Yesterday</b> was "+yesterday+"<br/>Tomorrow will be "+tomorrow;
        						break;
            				case "t03":
            					hotText="<b>live</b><br/><font COLOR='#008000'><i>to live</i></font><br/>I <font COLOR='#008000'>live</font> in a flat.<br/>My mother <font COLOR='#008000'>lives</font> in a house.<br/>"
            					break;
            				case "t04":
            					hotText="<font COLOR='#008000'>life</font><br/>He has a good <font COLOR='#008000'>life</font>.<br/>It has a bad <font COLOR='#008000'>life</font>."
            					break;
            					
            					
 
            			}
            			hotTextarea.htmlText=hotText;
            			hotTextarea.x=this["transcript"].x+mouseposx+10;
            			hotTextarea.y=this["transcript"].y+mouseposy+10;
            			hotTextarea.visible=true;
            			//trace (hotTextarea.textWidth+"  "+hotTextarea.width);
            			//hotTextarea.width=hotTextarea.textWidth;
            			//hotTextarea.height=hotTextarea.textHeight;
            			
            			break;
            		case "i":
            			trace ("hot image");
            			var hotImage:String=new String();
            			var hotname:String=hotlink.slice(1);
            			hotImage="images/"+hotname+".jpg";
    					hotImagearea.source=hotImage;
    					hotImagearea.x=this["transcript"].x+mouseposx+10;
    					hotImagearea.y=this["transcript"].y+mouseposy+10;
    					hotImagearea.visible=true;
            			
            	}
            
   			}
   			
   			public function show_transcript(myMod:video):void{   				
				
//    			var ts:TextArea=new TextArea();
//    			ts=transcript;		
				if (transcript.visible){
					transcript.visible=false;
				}else{
					transcript.visible=true;
				}
   			}
   			public function hideHotText():void{
    			var hotTextarea:Text=new Text()
    			hotTextarea=this["myHotText"];
   				hotTextarea.visible=false;
   			}
			
			
   			public function hideHotImage():void{
    			var hotImage:Image=new Image()
    			hotImage=this["myHotImage"];
   				hotImage.visible=false;
   			}
   			
   			private function getToday():void{
   				var weekDayLabels:Array = new Array("Sunday","Monday","Tuesday", "Wednesday", "Thursday","Friday","Saturday");
			    var myday:Date=new Date();
			    var thisday:int=myday.day;  
			    today=weekDayLabels[thisday];
				if (myday.day==0){
					yesterday="Saturday";
				}else{
					yesterday=weekDayLabels[thisday-1];					
				}
				if (myday.day==6){
					tomorrow="Sunday";
				}else{
					tomorrow=weekDayLabels[thisday+1];					
				}
				
   			}
   			
   			public function videoprint():void{
				parentApplication.mytranscript=this["transcript"];
				var myPrint:FlexPrintJob=new FlexPrintJob();
				if (myPrint.start()!=true){
					return;
				}
				var myPrintform:PrintView=new PrintView();
				myPrintform.setStyle("backgroundColor","#FFFFFF");
				
				myPrint.printAsBitmap=true;
				parentApplication.addChild(myPrintform);
				myPrintform.textfield.text=parentApplication.mytranscript.text;
				myPrintform.videolabel.visible=true;
				myPrint.addObject(myPrintform);
				myPrint.send();
				parentApplication.removeChild(myPrintform);
   			}
		]]>
	</mx:Script>
		<mx:states>
			<mx:State name="Video">
				
			<mx:AddChild position="lastChild">
				<mx:Image x="152.45" y="3" source="images/elements/screen.png" width="260" height="200"/>
			</mx:AddChild>
			<mx:AddChild position="lastChild">
				<mx:VideoDisplay id="gotovideo" x="166.5" y="16.05" width="236" height="175"  autoPlay="false"  source="{'video/'+parentApplication.sIssue+'.flv'}"/>
			</mx:AddChild>
			<mx:AddChild position="lastChild">
				<mx:Image x="7" y="254.6" source="images/elements/text.jpg" width="551" height="198.4"/>
			</mx:AddChild>
			<mx:AddChild position="lastChild">
				<mx:Image x="311.45" y="214.6" source="images/elements/play_down.png" id="playDown"/>
			</mx:AddChild>
			<mx:AddChild position="lastChild">
				<mx:Image x="270" y="212.6" source="images/elements/pause_down.png" id="pauseDown"/>
			</mx:AddChild>
			<mx:AddChild position="lastChild">
				<mx:Image x="316" y="219" id="playOver" source="images/elements/play_up.png" visible="false"/>
			</mx:AddChild>
			<mx:AddChild relativeTo="{playOver}" position="before">
				<mx:Image x="274" y="219" source="images/elements/pause_up.png" id="pauseOver" visible="false"/>
			</mx:AddChild>
			<mx:AddChild position="lastChild">
				<mx:Image x="229" y="214" source="images/elements/rewind_down.png" id="rewindDown"/>
			</mx:AddChild>
			<mx:AddChild position="lastChild">
				<mx:Image x="233" y="219" source="images/elements/rewind_up.png" id="rewindOver" visible="false"/>
			</mx:AddChild>
			<mx:AddChild position="lastChild">
				<custom:navButton x="229" y="211" width="37" height="33" id="rewind"/>
			</mx:AddChild>
			<mx:AddChild position="lastChild">
				<custom:navButton x="274" y="211" width="20" height="35" id="pause"/>
			</mx:AddChild>
			<mx:AddChild position="lastChild">
				<custom:navButton x="309" y="213" width="33.45" height="32.6" id="play"/>
			</mx:AddChild>
			<mx:AddChild position="lastChild">
				<mx:TextArea x="16" y="260.6" width="537" height="184.4" id="transcript" fontSize="18"  visible="true" editable="false"/>
			</mx:AddChild>
			<mx:AddChild position="lastChild">
				<mx:Image x="10" y="130" id="myHotImage" click="hideHotImage()" mouseOut="hideHotImage()"  visible="false"   buttonMode="true" useHandCursor="true"/>
			</mx:AddChild>
			<mx:AddChild position="lastChild">
				<mx:Text x="10" y="130" id="myHotText" click="hideHotText()" mouseOut="hideHotText()"  visible="false"  textAlign="center" fontSize="12" opaqueBackground="0xFFFF00" selectable="false" buttonMode="true" useHandCursor="true" width="31" height="30"/>
			</mx:AddChild>
			<mx:SetProperty name="height" value="455"/>
			
			
			
			</mx:State>
		</mx:states>
</mx:Module>
                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:

Select allOpen in new window

 

by: danyul_cPosted on 2009-08-17 at 21:33:37ID: 25120128

I have seen MUCH MUCH worse! Your code isn't bad.

It looks like it will behave correctly. The only place left then is your parent app. before you call the parentApplication.info.factory.create() you must make sure your module has issued the READY event.

Also, you could try something like this:

IN THE VAR DEFINITION FOR YOUR CLASS
 
var ts:TextArea = new TextArea();
var myMod:Video;
 
THEN IN THE MAIN FUNCTION FOR YOUR CLASS
 
public function Class()
{
  myMod.addEventListener(FlexEvent.CREATION_COMPLETE, creationHandler);  //The order of these may have to be reversed
  myMod = parentApplication.info.factory.create() as Video;
}
 
THEN:
 
private function creationHandler(e:FlexEvent)
{
  ts = myMod.transcript;
}

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:

Select allOpen in new window

 

by: virgewestPosted on 2009-08-17 at 21:53:01ID: 25120194

Thanks, but no, in the main function, whichever way I put the two lines, the EventListener returns a null object ref. Does this give any clues?

 

by: virgewestPosted on 2009-08-17 at 21:59:33ID: 25120209

I put in a trace statement after instantiating myMod, and it must slow it down enough for the eventhandler to work, but the ts statement still returns a null object reference.

 

by: virgewestPosted on 2009-08-17 at 22:05:03ID: 25120229

Here's the moduleManager loading, if that's any help.

private function gotoVideo(btnName:String):void{
				trace(btnName);
				
				 var moduleURL:String = "modules/video.swf";  
				 parentApplication.sModule="video";
				 parentApplication.Module="Video";
                parentApplication.info = ModuleManager.getModule(moduleURL);
                if (parentApplication.info != null) {
                    parentApplication.info.addEventListener(ModuleEvent.READY, modEventHandler);
                    parentApplication.info.addEventListener(ModuleEvent.ERROR, modErrorHandler);
                        //module loading success handler
                    parentApplication.info.load();
                }
			}
			
			 private function modEventHandler(e:ModuleEvent):void {
               
				
                //instantiate an add the module to the UI
                parentApplication.info.removeEventListener(ModuleEvent.READY, modEventHandler);
                parentApplication.info.removeEventListener(ModuleEvent.ERROR, modErrorHandler);
//                this.removeAllChildren();
                parentApplication.moduleContainer.removeAllChildren();
                if (module == null) {
                    module = parentApplication.info.factory.create() as UIComponent;
                    if (module != null) {
                        module.x =0;
                        module.y = 0;
                        parentApplication.moduleContainer.addChild(module); 
//                        this.addChild(module);                        
                    }
                }
                trace(parentApplication.sModule);
            }    

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:

Select allOpen in new window

 

by: danyul_cPosted on 2009-08-17 at 22:05:27ID: 25120231

hmm well ok, my last thought before I'm done for the night would be, in the modules main tag set the creation policy to all. Then do this for the AddChild element.

I think it's just not getting created. It gets created when the module would be added to the UI. But the changed below may help.

<mx:Module xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="565" height="410" xmlns:custom="components.*" creationComplete="{do_video(parentApplication.sIssue)}" backgroundAlpha="0.0" currentState="Video" creationPolicy="all">
 
<mx:AddChild position="lastChild" creationPolicy="all">
  <mx:TextArea x="16" y="260.6" width="537" height="184.4" id="transcript" fontSize="18"  visible="true" editable="false"/>
</mx:AddChild>
                                              
1:
2:
3:
4:
5:

Select allOpen in new window

 

by: virgewestPosted on 2009-08-17 at 22:11:47ID: 25120249

Nup, that didn't help either. But thanks for your help. I think it'll be something really simple, but maybe there's a reason why adobe doesn't give any examples that reference any displayobjects!

 

by: danyul_cPosted on 2009-08-18 at 09:47:22ID: 25125150

So is your module being added to the stage or is it itself returning null when you call create()?

 

by: virgewestPosted on 2009-08-18 at 16:37:39ID: 25128527

Hi again, no it is being added to the stage. If I trace myMod, it returns the video object. However, some of the display objects (empty textArea, empty image, text, videodisplay) are not being added, while others (image, button) are!

 

by: virgewestPosted on 2009-08-18 at 16:52:09ID: 25128595

I should add, that the creationComplete handler never seems to be called.

 

by: virgewestPosted on 2009-08-18 at 16:52:43ID: 25128596

Sorry, I mean the creationHandler.

 

by: virgewestPosted on 2009-08-18 at 18:13:44ID: 25128975

OK, I got it going by calling all the modules back from the application. There is obviously a problem calling modules from within modules. I am also using the simple moduleLoader class as well.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...