Skip navigation
Currently Being Moderated

Flash CS5 [Inspectable type="Number"] wont work

Apr 30, 2011 7:33 AM

Hi!
I am expecting problems while creating components.
I've defined property

 


[Inspectable(type="Number", defaultValue="12")]
public function get size():*{
     return isNaN(Number(this._format.size)) ? 0 : Number(this._format.size);
}
public function set size(value:*):void{
     trace('VALUE:', value);
     this._format.size = value;
}

 

Flash will convert any user defined value to 0.
But if I'll change type to String

 


[Inspectable(type="String", defaultValue="12")]
public function get size():*{
     return isNaN(Number(this._format.size)) ? 0 : Number(this._format.size);
}
public function set size(value:*):void{
     trace('VALUE:', value);
     this._format.size = value;
}

 

Expected value will be passed. How to fix Number type?

 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points