[flexcoders] Getting a reliable MAC address/ UID for a machine

2013-09-06 Thread doug31415
Hi Guys

Im trying to get a reliable UID for a machine. I can call 
NetworkInfo.networkInfo.findInterfaces() and I get a bunch of stuff that looks 
like this:


Name: {69138DF2-AB57-4755-A00C-BDCE909BBF30}
 DisplayName: Wireless Network Connection
 MTU: 1500
HardwareAddr: B8-76-3
  Active: true
  

Name: {C57BEFB1-0B32-4653-853D-2A5690760716}
 DisplayName: Local Area Connection
 MTU: 1500
HardwareAddr: 74-..

The problem is this: the 'name' property appears to vary from machine type to 
machine type - that is, Dells use a different string than Lenovos for example, 
and the 'displayName' property also varies from language to language. 

So the question is, how can I find some unique identifier for a machine? Do I 
need to generate it myself?

Thanks in advance for any help you can offer






[flexcoders] problem with getter/setter method on custom class

2012-09-14 Thread doug31415
I have a custom class, WizardLeftTab that inherits from WizardTabBase >> 
SkinnableContainer,. WizardTabBase has the following custom properties:

// -
private var _isSelected:Boolean;

[Bindable]
public function get isSelected():Boolean
{
return _isSelected;
}

public function set isSelected( val:Boolean ):void
{
_isSelected = val;
currentState = ( _isSelected ) ? 'selected' : 
'normal';
invalidateSkinState();
}   

...

override protected function getCurrentSkinState():String
{
if( !enabled )
{
currentState = 'disabled';
}
else if( isSelected )
{
currentState = 'selected';
}

return currentState;
}

In another class (NavigationModel) I have a function that calls set isSelected:

// -

public function setSelectedTab( tab:WizardLeftTab ):void
{
for each( var mtab:WizardLeftTab in tabsRegistry )
{
mtab.isSelected = false;
}

tab.isSelected = true;
}

(in this class, tabsRegistry is an ArrayCollection)

When I trace through the code, it does this:

>>in the for.. loop<<
it finds each mtab correctly, 
it calls the set isSelected
WITHOUT going into the body, it jumps immediately to the get isSelected and 
returns false, and so the skin state is never updated

>>in the tab.isSelected = true statement <<
then it behaves correctly, calling the setter and all the methods in the setter 
body

Even more strangely, if I remove the [Bindable] tag, it again finds each mtab 
correctly,  passes into the body of the setter and calls all its methods, and 
yet the getCurrentSkinState still returns 'selected' once it has been set

Im about at my wit's end. Any insight would be most appreciated.

Thanks





[flexcoders] Re: Dynamic CSS and textfield layout problems

2008-03-31 Thread doug31415
Thanks but I tried all that, and invalidateNow() as well, in several spots in 
the code. I tried 
digging through the code to see where the CSS gets set versus where the 
measurement 
takes place and even reset the textfield text property after the 
StyleEvent.CHANGED is 
fired. No dice on any of it.


--- In flexcoders@yahoogroups.com, "Aaron Miller" <[EMAIL PROTECTED]> wrote:
>
> Maybe you can try calling one or all of these methods on your text field
> after the style changes:
> 
> invalidateProperties();
> invalidateSize();
> invalidateDisplayList();
> 
> If I had to choose one, I think invalidateSize() should work on it's own.
> This isn't my expert opinion, I just know I have to call these methods in my
> custom item renderers after updating the data or text styles.
> 
> Hope this helps,
> ~Aaron
> 
> On Mon, Mar 31, 2008 at 7:48 AM, doug31415 <[EMAIL PROTECTED]> wrote:
> 
> >   I am writing an application that uses CSS files compiled to SWFs. The
> > different CSS files
> > reference different embedded fonts, for example A.css uses Arial while
> > B.css references
> > Courier. In the main application, when I want to change styles, I call a
> > method with this line:
> >
> > StyleManager.loadStyleDeclarations (newStyleURL, true, false,
> > ApplicationDomain.currentDomain);
> >
> > However, the result is that the textFields get unusual formatting. For
> > example, they "forget"
> > to line-wrap. They do pick up the new embedded font and other styles.
> >
> > Can anyone suggest what might cause this and what to do about it?
> >
> >  
> >
>





[flexcoders] Dynamic CSS and textfield layout problems

2008-03-31 Thread doug31415
I am writing an application that uses CSS files compiled to SWFs. The different 
CSS files 
reference different embedded fonts, for example A.css uses Arial while B.css 
references 
Courier. In the main application, when I want to change styles, I call a method 
with this line:

StyleManager.loadStyleDeclarations (newStyleURL, true, false, 
ApplicationDomain.currentDomain);

However, the result is that the textFields get unusual formatting. For example, 
they "forget" 
to line-wrap. They do pick up the new embedded font and other styles.

Can anyone suggest what might cause this and what to do about it?



[flexcoders] Flattened Circles in the Drawing API

2007-12-17 Thread doug31415
Hi;

Ive been using the drawing api to create circles, but sometimes they 
come out flattened, as if the bottom or right edges were sliced off. 
Has anyone seen that? By the way, oddly, if I animate the scale up 
and down, it draws correctly. Below is the code I used:

// this extends UIComponent
public function CircleThing () 
 {
super();

mouseChildren = false;
buttonMode = true;
base = new Sprite();
   // added djg 12/14
baseOver = new Sprite();

   label = new TextField();
   label.autoSize = TextFieldAutoSize.LEFT;
   label.multiline = true;
   label.wordWrap = true;
   label.width = 108;
   label.x = -52;

   addChild(base);
   addChild(baseOver);
   addChild(label);

   addEventListeners();

}

// This function creates the blue circle
public function drawCircle(_name:String=null):void 
 {
var myFilters:Array = [new DropShadowFilter
(5,135,0x00,0.15,5,5)];

base.graphics.clear();
base.graphics.beginFill(_color, .9);
base.graphics.drawCircle(0, 0, defaultDiameter/2);
base.graphics.endFill();
base.filters = myFilters;

// added djg draw overCircle
baseOver.graphics.clear();
baseOver.graphics.beginFill(_overColor, 1);
baseOver.graphics.drawCircle(0, 0, defaultDiameter/2);
baseOver.graphics.endFill();
baseOver.visible = false;
 }