RE: [Flashcoders] Label -- null

2006-09-26 Thread Lieven Cardoen
I can be wrong, but I think this is bullshit.

I'm compiling with MTASC and label is 'null'. Also compiled with Flash,
still Label is 'null' when casted...

Really annoying. The V2 components from Flash really suck. I've also
looked into the code from the V2 components and it's a jungle. I've had
nothing but problems with these components.

Lieven

import mx.controls.Label;
 
 
 
 
 
 public function createLabel(owner:MovieClip, instanceName:String,
 depth:Number, initObj:Object):Label{
 
   var label = owner.attachMovie(Label.symbolName, instanceName,
 depth, initObj);
 
   logger.debug(label :  + label);
 
   label.autoSize = left;
 
   applyStyle(label);
 
   return label;
 
 }
 
 
 
 -- logs a Label ...view0.view1.component12
 
 
 
 
 
 
 
 If I type the label :
 
 
 
 public function createLabel(owner:MovieClip, instanceName:String,
 depth:Number, initObj:Object):Label{
 
   var label:Label = Label(owner.attachMovie(Label.symbolName,
 instanceName, depth, initObj));
 
   logger.debug(label :  + label);
 
   label.autoSize = left;
 
   applyStyle(label);
 
   return label;
 
 }



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Pete
Miller
Sent: maandag 25 september 2006 16:52
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Label -- null

I think you probably want parenthesis around your typecast, as

var label:Label = (Label)(owner.attachMovie(Label.symbolName,
instanceName, depth, initObj));

P.


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:flashcoders-
 [EMAIL PROTECTED] On Behalf Of Lieven Cardoen
 Sent: Monday, September 25, 2006 8:53 AM
 To: Flashcoders mailing list
 Cc: Bert Vandamme; Christophe Herreman
 Subject: [Flashcoders] Label -- null
 
 import mx.controls.Label;
 
 
 
 
 
 public function createLabel(owner:MovieClip, instanceName:String,
 depth:Number, initObj:Object):Label{
 
   var label = owner.attachMovie(Label.symbolName, instanceName,
 depth, initObj);
 
   logger.debug(label :  + label);
 
   label.autoSize = left;
 
   applyStyle(label);
 
   return label;
 
 }
 
 
 
 -- logs a Label ...view0.view1.component12
 
 
 
 
 
 
 
 If I type the label :
 
 
 
 public function createLabel(owner:MovieClip, instanceName:String,
 depth:Number, initObj:Object):Label{
 
   var label:Label = Label(owner.attachMovie(Label.symbolName,
 instanceName, depth, initObj));
 
   logger.debug(label :  + label);
 
   label.autoSize = left;
 
   applyStyle(label);
 
   return label;
 
 }
 
 
 
 -- logs 'null'
 
 
 
 
 
 Why the f**k is this???
 
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Label -- null

2006-09-26 Thread Steven Sacks | BLITZ
Are you using -keep?

Have you tried FLASC?  http://osflash.org/flasc
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Label -- null

2006-09-25 Thread Pete Miller
I think you probably want parenthesis around your typecast, as

var label:Label = (Label)(owner.attachMovie(Label.symbolName,
instanceName, depth, initObj));

P.


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:flashcoders-
 [EMAIL PROTECTED] On Behalf Of Lieven Cardoen
 Sent: Monday, September 25, 2006 8:53 AM
 To: Flashcoders mailing list
 Cc: Bert Vandamme; Christophe Herreman
 Subject: [Flashcoders] Label -- null
 
 import mx.controls.Label;
 
 
 
 
 
 public function createLabel(owner:MovieClip, instanceName:String,
 depth:Number, initObj:Object):Label{
 
   var label = owner.attachMovie(Label.symbolName, instanceName,
 depth, initObj);
 
   logger.debug(label :  + label);
 
   label.autoSize = left;
 
   applyStyle(label);
 
   return label;
 
 }
 
 
 
 -- logs a Label ...view0.view1.component12
 
 
 
 
 
 
 
 If I type the label :
 
 
 
 public function createLabel(owner:MovieClip, instanceName:String,
 depth:Number, initObj:Object):Label{
 
   var label:Label = Label(owner.attachMovie(Label.symbolName,
 instanceName, depth, initObj));
 
   logger.debug(label :  + label);
 
   label.autoSize = left;
 
   applyStyle(label);
 
   return label;
 
 }
 
 
 
 -- logs 'null'
 
 
 
 
 
 Why the f**k is this???
 
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com