[flexcoders] I want you to be happy.

2013-07-25 Thread Brandon Krakowsky
hello!Breaking new - 
http://omeletteandwaffleshop.com/nemuxni/Brandon_Krakowsky/jatzwo.html 




[flexcoders] ArrayCollection.setItemAt() triggering a new instance of itemRenderer class

2009-10-22 Thread Brandon Krakowsky
Tracy,

Thanks for the info.  Yeah, that makes sense.  Initially I was thinking that I 
could reuse images, textfields, etc., which I sometimes can, but I can't count 
on the fact that they'll be there.

Sorry about hijacking the thread.  My mistake.

Thanks,
Brandon



  

[flexcoders] ArrayCollection.setItemAt() triggering a new instance of itemRenderer class

2009-10-21 Thread Brandon Krakowsky
Hello all,

I'm using an array collection as a data provider for a list component with a 
custom itemRenderer.  If I use arrayCollection.addItemAt(), a new instance of 
the itemRenderer class is created.  If I use arrayCollection.setItemAt, the 
current instance for that particular item is updated, meaning the data property 
is set.  This all seems normal.

It seems that the first time I run setItemAt(), another instance of the 
itemRender class is created in it's place, despite the index of the item not 
changing.  (It's just an icon or text, etc.)  Every subsequent time I call 
setItemAt(), the data property is updated without creating a new instance, but 
the first time, it's as if I'm adding an item to the list in the same location.

It breaks down as there are instance vars in the itemRenderer I'm depending on.

Thanks,
Brandon



  

RE: [flexcoders] RemoveChild not removing instance from memory

2009-10-21 Thread Brandon Krakowsky
The only way I was able to have GC remove these objects was to remove their 
children first - radio buttons, checkboxes, etc., then remove them.  Seems odd 
but it works.

Thanks for your help.

Thanks,
Brandon

--- On Tue, 10/20/09, Alex Harui  wrote:

From: Alex Harui 
Subject: RE: [flexcoders] RemoveChild not removing instance from memory
To: "flexcoders@yahoogroups.com" 
Date: Tuesday, October 20, 2009, 8:57 PM






 





  







The profiler will show you what is still hanging on to those
objects. 

   



Alex Harui 

Flex SDK Developer 

Adobe
Systems Inc. 

Blog: http://blogs. adobe.com/ aharui 



   





From: flexcod...@yahoogro ups.com
[mailto:flexcoders@ yahoogroups. com] On Behalf Of Brandon Krakowsky

Sent: Tuesday, October 20, 2009 1:02 PM

To: flexcod...@yahoogro ups.com

Subject: [flexcoders] RemoveChild not removing instance from memory 





   

   








 
  
  Hello there.  I've got a VBox into which I'm
  dynamically adding multiple instances of a custom UIComponent.  When I
  try to remove them, and add new instances, the old instances seem to hang
  around in memory, as well as the assets contained within - UITextFields,
  Radio Buttons, etc.

  

  I remove all listeners and have no other references to the custom
  UIComponents.  I've tried removeAllChildren( ) as well as iterating
  through each child and using removeChildAt( 0).

  

  The instances just build up in memory as I load new instances.  Garbage
  Collection does not clean them up.

  

  Thanks,

  Brandon 
  
 


   





 









 

  




 

















  

[flexcoders] RemoveChild not removing instance from memory

2009-10-20 Thread Brandon Krakowsky
Hello there.  I've got a VBox into which I'm dynamically adding multiple 
instances of a custom UIComponent.  When I try to remove them, and add new 
instances, the old instances seem to hang around in memory, as well as the 
assets contained within - UITextFields, Radio Buttons, etc.

I remove all listeners and have no other references to the custom 
UIComponents.  I've tried removeAllChildren() as well as iterating through each 
child and using removeChildAt(0).

The instances just build up in memory as I load new instances.  Garbage 
Collection does not clean them up.

Thanks,
Brandon



  

RE: [flexcoders] Flash OCX Error

2009-10-15 Thread Brandon Krakowsky
Alex,

I've been doing some testing with this app in trying to recreate this ocx 
error.  I've monitored both memory consumption and cpu.  The browser memory 
never gets above 90mb, event after a few hours of running.  The cpu spikes a 
bit when resizing and interacting with the various lists, but I can't recreate 
the error.

You mentioned that this error is usually caused by a stack overflow or memory 
consumption.  Can I assume that the browser memory is an accurate reading of 
the memory used by the Flash Player, or is there internal Flash memory which 
could be maxed out, unrelated to browser memory?

Thanks,
Brandon

--- On Fri, 10/9/09, Alex Harui  wrote:

From: Alex Harui 
Subject: RE: [flexcoders] Flash OCX Error
To: "flexcoders@yahoogroups.com" 
Date: Friday, October 9, 2009, 5:07 AM






 





  







Less is more.  The fewer HBox and Canvas tags and more
UIComponent tags will take up less memory and run faster. 

   

Occasionally there can be a Flash Player bug that will cause it
to crash, but the two leading causes are running out of memory, and stack
overflows.  Checking the process memory can eliminate or rule-in the
first.  If your browser is using up more than 500Mb of memory, you could
be running out of memory.  The way I diagnose these problems is to start
commenting out parts of the app to see if there is some portion of the app that
makes a difference. 

   

You may see extra instances of an class if that class generates
supporting objects within the player.  The profiler only knows what is on
top of the actionscript callstack and can’t see what is on the player’s
internal callstack. 

   



Alex Harui 

Flex SDK Developer 

Adobe
Systems Inc. 

Blog: http://blogs. adobe.com/ aharui 



   





From:
flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of 
medconference

Sent: Thursday, October 08, 2009 11:35 AM

To: flexcod...@yahoogro ups.com

Subject: [flexcoders] Flash OCX Error 





   

   







Hello, this is my first post!



I have a large Flex app I'm trying to profile and make more efficient. I have
some basic questions about profiling in general and application development as
it relates to efficiency and performance.



I have a few different item renderers which are based on HBox, have several
embedded images and adds and removes these images from the HBox based on the
data values. Occasionally, when a user interacts with a List or Drop-Down (one
using a custom renderer), they get a Flash Ocx error. This is impossible to
debug as there is no further info. The browser is then forced to crash.



Is this most likely a memory or CPU issue?



Most of my custom components are based on a Canvas stored in a .mxml file. When
resizing my app I see CPU spike. Would basing my components on a UIComponent
help this?



In terms of profiling, I can see my app has 5 cumulative instances but 1
current instance. Why would there be 5 cumulative instances of the main
application class? How is that even possible?



Thanks!

Brandon 





 









 

  




 

















  

RE: [flexcoders] Flash OCX Error

2009-10-09 Thread Brandon Krakowsky
Thanks Alex.  That's all pretty helpful.

Brandon

--- On Fri, 10/9/09, Alex Harui  wrote:

From: Alex Harui 
Subject: RE: [flexcoders] Flash OCX Error
To: "flexcoders@yahoogroups.com" 
Date: Friday, October 9, 2009, 5:07 AM






 





  







Less is more.  The fewer HBox and Canvas tags and more
UIComponent tags will take up less memory and run faster. 

   

Occasionally there can be a Flash Player bug that will cause it
to crash, but the two leading causes are running out of memory, and stack
overflows.  Checking the process memory can eliminate or rule-in the
first.  If your browser is using up more than 500Mb of memory, you could
be running out of memory.  The way I diagnose these problems is to start
commenting out parts of the app to see if there is some portion of the app that
makes a difference. 

   

You may see extra instances of an class if that class generates
supporting objects within the player.  The profiler only knows what is on
top of the actionscript callstack and can’t see what is on the player’s
internal callstack. 

   



Alex Harui 

Flex SDK Developer 

Adobe
Systems Inc. 

Blog: http://blogs. adobe.com/ aharui 



   





From:
flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of 
medconference

Sent: Thursday, October 08, 2009 11:35 AM

To: flexcod...@yahoogro ups.com

Subject: [flexcoders] Flash OCX Error 





   

   







Hello, this is my first post!



I have a large Flex app I'm trying to profile and make more efficient. I have
some basic questions about profiling in general and application development as
it relates to efficiency and performance.



I have a few different item renderers which are based on HBox, have several
embedded images and adds and removes these images from the HBox based on the
data values. Occasionally, when a user interacts with a List or Drop-Down (one
using a custom renderer), they get a Flash Ocx error. This is impossible to
debug as there is no further info. The browser is then forced to crash.



Is this most likely a memory or CPU issue?



Most of my custom components are based on a Canvas stored in a .mxml file. When
resizing my app I see CPU spike. Would basing my components on a UIComponent
help this?



In terms of profiling, I can see my app has 5 cumulative instances but 1
current instance. Why would there be 5 cumulative instances of the main
application class? How is that even possible?



Thanks!

Brandon 





 









 

  




 

















  

Re: [flexcoders] HTML in the List Component?

2009-03-25 Thread Brandon Krakowsky
Great thanks!  This seemed to work.  I copied the whole class and tweaked as 
necessary.

Brandon





From: Alex Harui 
To: "flexcoders@yahoogroups.com" 
Sent: Tuesday, March 24, 2009 1:52:25 PM
Subject: RE: [flexcoders] HTML in the List Component?


If you start with ListItemRenderer, you definitely have to kill
the code that will set the textfield’s text property during the handshake with
the List via the data/listData properties.  But once you do that, it should
measure correctly.  I’d probably make a copy of ListItemRenderer instead of
subclassing, and replace setting .text with setting .htmlText
 
The issue is not labelFunction, it just returns a string.  It is
what the renderer does with that string.
 
Alex Harui
Flex SDK Developer
Adobe
Systems Inc.
Blog: http://blogs. adobe.com/ aharui
 
From:flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On 
Behalf Of Brandon
Krakowsky
Sent: Tuesday, March 24, 2009 9:21 AM
To: flexcod...@yahoogro ups.com
Subject: Re: [flexcoders] HTML in the List Component?
 
Yeah, I'm having a hard time with this.  I'm trying to
display auto-sized html in a list component.  It just never looks
right.  Sometimes there is too much padding on the bottom, sometimes, not
enough and the text is cut-off.  And one I start scrolling, forget
it.  It keeps changing.  I must be missing something.  If the
labelFunction supported HTML I'd be set, as the sizing on this seems fine.

I'm rolling my own "list", based on a VBox.

Thanks,
Brandon
 


 
From:Jeffry Houser 
To: flexcod...@yahoogro ups.com
Sent: Tuesday, March 24, 2009 11:07:53 AM
Subject: Re: [flexcoders] HTML in the List Component?

 Based on my recent experience w/ this; I gave up trying to display HTML
Text in a list using the default itemRenderer ( ListItemRenderer if memory
serves me ).  

 In theory, setting ListItemRenderer. label.htmlText should work  In practice,
it always reverted to 'normal' text when displayed in the context of a
list.  I built my own itemRenderer using a label and that addressed my
issue.  

 I ran into this issue while building the Flextras AutoCompleteComboBo
x.  The ComboBox drop down is just a list, for those that haven't cracked
open the code.  The AutoComplete will support highlighting in the drop
down, based on the filter text.  All baked right in. I'll be sending the
next beta to beta testers in a few hours.  

Brandon Krakowsky wrote: 
I have a List component with both variableRowHeight and
wordWrap set to true.  Is there anyway to leverage the labelField or
labelFunction to render html text?  Is the only way to create a custom
itemRenderer?  I tried it but find it very difficult to set the height of
a UITextField, added to a Canvas.

Thanks,
Brandon
 
 
-- 

Jeffry Houser, Technical Entrepreneur

Adobe Community Expert: http://tinyurl. com/684b5h
http://www.twitter. com/reboog711  | Phone: 203-379-0773

--

Easy to use Interface Components for Flex Developers
http://www.flextras.com?c=104

--
http://www.theflexshow.com
http://www.jeffryhouser.com

--

Part of the DotComIt Brain Trust
 
   


  

Re: [flexcoders] HTML in the List Component?

2009-03-24 Thread Brandon Krakowsky
Yeah, I'm having a hard time with this.  I'm trying to display auto-sized html 
in a list component.  It just never looks right.  Sometimes there is too much 
padding on the bottom, sometimes, not enough and the text is cut-off.  And one 
I start scrolling, forget it.  It keeps changing.  I must be missing something. 
 If the labelFunction supported HTML I'd be set, as the sizing on this seems 
fine.

I'm rolling my own "list", based on a VBox.

Thanks,
Brandon





From: Jeffry Houser 
To: flexcoders@yahoogroups.com
Sent: Tuesday, March 24, 2009 11:07:53 AM
Subject: Re: [flexcoders] HTML in the List Component?



 Based on my recent experience w/ this; I gave up trying to display
HTML Text in a list using the default itemRenderer ( ListItemRenderer
if memory serves me ).  

 In theory, setting ListItemRenderer. label.htmlText should work  In
practice, it always reverted to 'normal' text when displayed in the
context of a list.  I built my own itemRenderer using a label and that
addressed my issue.  

 I ran into this issue while building the Flextras
AutoCompleteComboBo x.  The ComboBox drop down is just a list, for those
that haven't cracked open the code.  The AutoComplete will support
highlighting in the drop down, based on the filter text.  All baked
right in. I'll be sending the next beta to beta testers in a few
hours.  

Brandon Krakowsky wrote: 
I have a List component with both variableRowHeight and wordWrap
set to true.  Is there anyway to leverage the labelField or
labelFunction to render html text?  Is the only way to create a custom
itemRenderer?  I tried it but find it very difficult to set the height
of a UITextField, added to a Canvas.

Thanks,
Brandon



-- 
Jeffry Houser, Technical Entrepreneur
Adobe Community Expert: http://tinyurl. com/684b5h http://www.twitter. 
com/reboog711  | Phone: 203-379-0773
--
Easy to use Interface Components for Flex Developers
http://www.flextras.com?c=104
--
http://www.theflexshow.com
http://www.jeffryhouser.com
--
Part of the DotComIt Brain Trust
   


  

Re: [flexcoders] Re: HTML in the List Component?

2009-03-24 Thread Brandon Krakowsky
I see.  getTextField() is returning a null value.  Let me look into it further.

Thanks,
Brandon





From: carloscarvalhar 
To: flexcoders@yahoogroups.com
Sent: Tuesday, March 24, 2009 5:35:40 AM
Subject: [flexcoders] Re: HTML in the List Component?


Maybe this gonna help you:
http://www.flexer. info/2009/ 02/06/auto- resizable- text-area- component/

--- In flexcod...@yahoogro ups.com, Brandon Krakowsky  wrote:
>
> I have a List component with both variableRowHeight and wordWrap set to true. 
>  Is there anyway to leverage the labelField or labelFunction to render html 
> text?  Is the only way to create a custom itemRenderer?  I tried it but find 
> it very difficult to set the height of a UITextField, added to a Canvas.
> 
> Thanks,
> Brandon
>


   


  

Re: [flexcoders] Re: HTML in the List Component?

2009-03-24 Thread Brandon Krakowsky
This is interesting, thanks.  I can't quite get it to work inside an 
itemRenderer.  I tried with MXML and creating it dynamically with AS.  The 
TextArea is still just remains a static height with whitespace or a scrollbar, 
depending on length of String.

Thanks again,
Brandon





From: carloscarvalhar 
To: flexcoders@yahoogroups.com
Sent: Tuesday, March 24, 2009 5:35:40 AM
Subject: [flexcoders] Re: HTML in the List Component?


Maybe this gonna help you:
http://www.flexer. info/2009/ 02/06/auto- resizable- text-area- component/

--- In flexcod...@yahoogro ups.com, Brandon Krakowsky  wrote:
>
> I have a List component with both variableRowHeight and wordWrap set to true. 
>  Is there anyway to leverage the labelField or labelFunction to render html 
> text?  Is the only way to create a custom itemRenderer?  I tried it but find 
> it very difficult to set the height of a UITextField, added to a Canvas.
> 
> Thanks,
> Brandon
>


   


  

[flexcoders] HTML in the List Component?

2009-03-23 Thread Brandon Krakowsky
I have a List component with both variableRowHeight and wordWrap set to true.  
Is there anyway to leverage the labelField or labelFunction to render html 
text?  Is the only way to create a custom itemRenderer?  I tried it but find it 
very difficult to set the height of a UITextField, added to a Canvas.

Thanks,
Brandon



  

[flexcoders] Issues with Full-Screen Video

2008-09-24 Thread Brandon Krakowsky
I've got a Video object inside of a custom VideoDisplay component inside of a 
larger UI with other components.  The Video object, once resized, ends up being 
250 by 180.  My full-screen toggle button gets the dimensions and location of 
the Video object, in relation to the parentApplication.  I then set the 
fullSreenSourceRect to a new Rectangle with the same dimensions and location.

When the video goes full-screen, it looks fine for a second, then when the 
"Press Esc to Exit" message appears, the entire bottom half of the source 
rectangle area (the area below the message) dissapears.

This can be fixed by setting the scaleMode to StageScaleMode.EXACT_FIT, but 
then when I exit from full-screen mode, my entire UI is sized incorrectly.

Thanks in advance,
Brandon



Code:

var boundsObject:Rectangle = 
videoDisplay.subscribedLiveVideo.getBounds(this.parentApplication as 
DisplayObject);
var x:Number = boundsObject.x;
var y:Number = boundsObject.y;
var w:Number = boundsObject.width;
var h:Number = boundsObject.height;
   
this.parentApplication.stage.fullScreenSourceRect = new Rectangle(x, y, w, h);
//this.parentApplication.stage.scaleMode = StageScaleMode.EXACT_FIT;
this.parentApplication.stage.addEventListener(FullScreenEvent.FULL_SCREEN, 
fullScreenHandler);
this.parentApplication.stage.displayState = StageDisplayState.FULL_SCREEN;


  

Re: [flexcoders] LocalConnection

2008-09-24 Thread Brandon Krakowsky


I ended up getting this to work.  Initially, I was waiting for the 
"onLoadComplete" event before trying to interact with a loaded movie via a 
moviecliploader in the Flash 8 proxy file.  I changed it so that it waits for 
the "onLoadInit" event, which was happening after the "onLoadComplete" event, 
at least when I tested it locally.  So, if I wait for the "onLoadInit" event 
via the moviecliploader, and then call functions, I'm good.

Thanks for your help,
Brandon


- Original Message 
From: Brandon Krakowsky <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Monday, September 22, 2008 2:25:28 PM
Subject: Re: [flexcoders] Does localconnection Class works with different Port 
numbers ?


Sorry for the delay on this.  I'm using LocalConnection to talk to proxy, which 
loads Flash 8 movie and talks to it using Standard AS2.  I also send message 
from the proxy back to the main app using LocalConnection.  The proxy is an 
adapted version of Jesse Warden's:
http://jessewarden.com/2007/06/flex-controlling-flash.html

Thanks Jesse!
Brandon



- Original Message 
From: Gregor Kiddie <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Friday, September 19, 2008 10:21:00 AM
Subject: RE: [flexcoders] Does localconnection Class works with different Port 
numbers ?


So you’re using LocalConnection to speak
from your main app to the proxy, or from the proxy to the Flash 8 movie?
 
Gk.
Gregor Kiddie
Senior Developer
INPS
Tel:   01382
564343
Registered address: The Bread Factory, 1a Broughton Street, LondonSW8 3QJ
Registered Number: 1788577
Registered in the UK
Visit our Internet Web site at www.inps.co. uk
The information in this internet email is confidential and
is intended solely for the addressee. Access, copying or re-use of information
in it by anyone else is not authorised. Any views or opinions presented are
solely those of the author and do not necessarily represent those of INPS or
any of its affiliates. If you are not the intended recipient please contact
is.helpdesk@ inps.co.uk


 
From:[EMAIL PROTECTED] ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf 
Of Brandon Krakowsky
Sent: 19 September 2008 14:18
To: [EMAIL PROTECTED] ups.com
Subject: Re: [flexcoders] Does
localconnection Class works with different Port numbers ?
 
I'm working with LocalConnection now and having some issues.  I'm
trying to load and control some Flash 8 movies with some success.  I'm
first loading in a proxy Flash 8 file, and then loading the movies into there. 
I'm calling functions in the proxy file which basically tell the loaded movies
to go to certain frames, etc.

It seems to work most of the time but every now and again I get weird
"undefined" traces in the Flex IDE.  I have a lot more testing
to do but I'm not sure how the Flash 9 debugger tries to debug AS2 in a Flash 8
file.

Thanks,
Brandon
 



  

Re: [flexcoders] Placing cursor inside UITextField

2008-09-22 Thread Brandon Krakowsky
Got this to work:

textField.addEventListener(Event.ADDED_TO_STAGE, function(evt:Event):void {
var textField:UITextField = evt.currentTarget as UITextField;
textField.setFocus();
});

Thanks for everyone's help,
Brandon


- Original Message 
From: Andriy Panas <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Sunday, September 21, 2008 11:01:23 AM
Subject: Re: [flexcoders] Placing cursor inside UITextField


Hi Brandon,

Use the following to set focus for the textField's instance of UITextField:

var textField:UITextFie ld = new UITextField( );
textField.type = "input";
textField.autoSize = TextFieldAutoSize. LEFT;
textField.multiline = true;
textField.wordWrap = false;
textField.border = false;

myContainer. addChild( textField)

textField.setFocus( textField) ;

Notice, that first you have to add textField to the DisplayChildList
of corresponding container via addChild and only then you can call
"setFocus" on it.

2008/9/19 Brandon Krakowsky <[EMAIL PROTECTED] com>:
> I'm creating some Input UITextField instances dynamically, and then trying
> to place the cursor inside.  Can't seem to get it working.
>
> var textField:UITextFie ld = new UITextField( );
> textField.type = "input";
> textField.autoSize = TextFieldAutoSize. LEFT;
> textField.multiline = true;
> textField.wordWrap = false;
> textField.border = false;
>
> stage.focus = textField;
>
> It seems to get the focus, but doesn't put the cursor inside.  Can't just
> start typing.  Also, textField.setFocus( ) doesn't work.

--
Med venlig hilsen / Best regards
Andriy Panas
[EMAIL PROTECTED] com



  

Re: [flexcoders] Does localconnection Class works with different Port numbers ?

2008-09-22 Thread Brandon Krakowsky
Sorry for the delay on this.  I'm using LocalConnection to talk to proxy, which 
loads Flash 8 movie and talks to it using Standard AS2.  I also send message 
from the proxy back to the main app using LocalConnection.  The proxy is an 
adapted version of Jesse Warden's:
http://jessewarden.com/2007/06/flex-controlling-flash.html

Thanks Jesse!
Brandon



- Original Message 
From: Gregor Kiddie <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Friday, September 19, 2008 10:21:00 AM
Subject: RE: [flexcoders] Does localconnection Class works with different Port 
numbers ?


So you’re using LocalConnection to speak
from your main app to the proxy, or from the proxy to the Flash 8 movie?
 
Gk.
Gregor Kiddie
Senior Developer
INPS
Tel:   01382
564343
Registered address: The Bread Factory, 1a Broughton Street, LondonSW8 3QJ
Registered Number: 1788577
Registered in the UK
Visit our Internet Web site at www.inps.co. uk
The information in this internet email is confidential and
is intended solely for the addressee. Access, copying or re-use of information
in it by anyone else is not authorised. Any views or opinions presented are
solely those of the author and do not necessarily represent those of INPS or
any of its affiliates. If you are not the intended recipient please contact
is.helpdesk@ inps.co.uk


 
From:[EMAIL PROTECTED] ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf 
Of Brandon Krakowsky
Sent: 19 September 2008 14:18
To: [EMAIL PROTECTED] ups.com
Subject: Re: [flexcoders] Does
localconnection Class works with different Port numbers ?
 
I'm working with LocalConnection now and having some issues.  I'm
trying to load and control some Flash 8 movies with some success.  I'm
first loading in a proxy Flash 8 file, and then loading the movies into there. 
I'm calling functions in the proxy file which basically tell the loaded movies
to go to certain frames, etc.

It seems to work most of the time but every now and again I get weird
"undefined" traces in the Flex IDE.  I have a lot more testing
to do but I'm not sure how the Flash 9 debugger tries to debug AS2 in a Flash 8
file.

Thanks,
Brandon
 


  

Re: [flexcoders] Does localconnection Class works with different Port numbers ?

2008-09-19 Thread Brandon Krakowsky
I'm working with LocalConnection now and having some issues.  I'm trying to 
load and control some Flash 8 movies with some success.  I'm first loading in a 
proxy Flash 8 file, and then loading the movies into there.  I'm calling 
functions in the proxy file which basically tell the loaded movies to go to 
certain frames, etc.

It seems to work most of the time but every now and again I get weird 
"undefined" traces in the Flex IDE.  I have a lot more testing to do but I'm 
not sure how the Flash 9 debugger tries to debug AS2 in a Flash 8 file.

Thanks,
Brandon



- Original Message 
From: Gregor Kiddie <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Friday, September 19, 2008 8:51:17 AM
Subject: RE: [flexcoders] Does localconnection Class works with different Port 
numbers ?


Swf ß> swf is usually pretty smooth sailing, the flash player does a
good job of hiding you from a lot of the grunginess.
Swf ß> anything else is annoying as you’ll have to pretty much
redo all the fun stuff the FP hides from you.
The main pitfall is the 40k limit on the
localconnection file, if you are needing to read / write anything larger, you
need to page it and be careful about the timings.
If there’s anything specific you
want to know, hit me up off list. We’ve done a whole lot of work with the
LocalConnection recently!
 
Gk.
Gregor Kiddie
Senior Developer
INPS
Tel:   01382
564343
Registered address: The Bread Factory, 1a Broughton Street, LondonSW8 3QJ
Registered Number: 1788577
Registered in the UK
Visit our Internet Web site at www.inps.co. uk
The information in this internet email is confidential and
is intended solely for the addressee. Access, copying or re-use of information
in it by anyone else is not authorised. Any views or opinions presented are
solely those of the author and do not necessarily represent those of INPS or
any of its affiliates. If you are not the intended recipient please contact
is.helpdesk@ inps.co.uk


 
From:[EMAIL PROTECTED] ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf
Of Josh McDonald
Sent: 19 September 2008 13:26
To: [EMAIL PROTECTED] ups.com
Subject: Re: [flexcoders] Does
localconnection Class works with different Port numbers ?
 
I've got to build some LocalConnection voodoo in the next couple of
weeks at work, anybody have any tips, or pitfalls I should look out for? Or is
it usually smooth sailing?

-Josh


  

Re: [flexcoders] Placing cursor inside UITextField

2008-09-19 Thread Brandon Krakowsky
Good idea.  I'll check that out.  It's strange that this is so tricky to do.  I 
can use a TextInput and use textInput.setFocus() right after creation with no 
problem, but that doesn't suit my needs.

Thanks,
Brandon



- Original Message 
From: Sherif Abdou <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Thursday, September 18, 2008 9:56:51 PM
Subject: Re: [flexcoders] Placing cursor inside UITextField


This is untested and I havent tried it, I am 
guessing somewhere you can dispatch a Fake mouseDown/Click event on the 
UITextField which theortically should place a cursor.
--
Sherif Abdou
http://VadexFX. com
http://Sherifabdou. com
- Original Message - 
From: Brandon  Krakowsky 
To: [EMAIL PROTECTED] ups.com 
Sent: Thursday, September 18, 2008 8:51  PM
Subject: Re: [flexcoders] Placing cursor  inside UITextField

George, thanks, I'll have to test that.  The parent component is  certainly 
initialized.  The UITextFields are triggered by user  interaction.  You mean I 
have to test to see if the UITextField itself  has initialized?

Thanks,
Brandon



-  Original Message 
From: George <[EMAIL PROTECTED] com>
To: [EMAIL PROTECTED] ups.com
Sent:  Thursday, September 18, 2008 6:44:49 PM
Subject: Re: [flexcoders] Placing  cursor inside UITextField


Usually I will begin to run set focus after component already 
initialized. If you try to get focus before that time, wouldn't work for 
sure.

George

Brandon Krakowsky wrote:
> I'm creating  some Input UITextField instances dynamically, and then 
> trying to  place the cursor inside. Can't seem to get it working.
>
> var  textField:UITextFie ld = new UITextField( );
> textField.type =  "input";
> textField.autoSize = TextFieldAutoSize. LEFT;
>  textField.multiline = true;
> textField.wordWrap = false;
>  textField.border = false;
>
> stage.focus =  textField;
>
> It seems to get the focus, but doesn't put the  cursor inside. Can't 
> just start typing. Also, textField.setFocus( )  doesn't work.
>
> Thanks,
>  Brandon





  

Re: [flexcoders] Placing cursor inside UITextField

2008-09-19 Thread Brandon Krakowsky
Yeah, the UITextField instances are created by clicking on the stage.

Thanks,
Brandon



- Original Message 
From: Alex Harui <[EMAIL PROTECTED]>
To: "flexcoders@yahoogroups.com" 
Sent: Friday, September 19, 2008 1:23:40 AM
Subject: RE: [flexcoders] Placing cursor inside UITextField


Don’t forget that the browser doesn’t give focus to Flash until
you click on the app.
 
From:[EMAIL PROTECTED] ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf 
Of Brandon
Krakowsky
Sent: Thursday, September 18, 2008 6:52 PM
To: [EMAIL PROTECTED] ups.com
Subject: Re: [flexcoders] Placing cursor inside UITextField
 
George, thanks, I'll have to test that.  The parent
component is certainly initialized.  The UITextFields are triggered by
user interaction.  You mean I have to test to see if the UITextField
itself has initialized?

Thanks,
Brandon
 
- Original Message 
From: George <[EMAIL PROTECTED] com>
To: [EMAIL PROTECTED] ups.com
Sent: Thursday, September 18, 2008 6:44:49 PM
Subject: Re: [flexcoders] Placing cursor inside UITextField
Usually I will begin to run set focus after
component already 
initialized. If you try to get focus before that time, wouldn't work for 
sure.

George

Brandon Krakowsky wrote:
> I'm creating some Input UITextField instances dynamically, and then 
> trying to place the cursor inside. Can't seem to get it working.
>
> var textField:UITextFie ld = new UITextField( );
> textField.type = "input";
> textField.autoSize = TextFieldAutoSize. LEFT;
> textField.multiline = true;
> textField.wordWrap = false;
> textField.border = false;
>
> stage.focus = textField;
>
> It seems to get the focus, but doesn't put the cursor inside. Can't 
> just start typing. Also, textField.setFocus( ) doesn't work.
>
> Thanks,
> Brandon
  


  

Re: [flexcoders] Placing cursor inside UITextField

2008-09-18 Thread Brandon Krakowsky
George, thanks, I'll have to test that.  The parent component is certainly 
initialized.  The UITextFields are triggered by user interaction.  You mean I 
have to test to see if the UITextField itself has initialized?

Thanks,
Brandon



- Original Message 
From: George <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Thursday, September 18, 2008 6:44:49 PM
Subject: Re: [flexcoders] Placing cursor inside UITextField


Usually I will begin to run set focus after component already 
initialized. If you try to get focus before that time, wouldn't work for 
sure.

George

Brandon Krakowsky wrote:
> I'm creating some Input UITextField instances dynamically, and then 
> trying to place the cursor inside.  Can't seem to get it working.
>
> var textField:UITextFie ld = new UITextField( );
> textField.type = "input";
> textField.autoSize = TextFieldAutoSize. LEFT;
> textField.multiline = true;
> textField.wordWrap = false;
> textField.border = false;
>
> stage.focus = textField;
>
> It seems to get the focus, but doesn't put the cursor inside.  Can't 
> just start typing.  Also, textField.setFocus( ) doesn't work.
>
> Thanks,
> Brandon




  

[flexcoders] Placing cursor inside UITextField

2008-09-18 Thread Brandon Krakowsky
I'm creating some Input UITextField instances dynamically, and then trying to 
place the cursor inside.  Can't seem to get it working.

var textField:UITextField = new UITextField();
textField.type = "input";
textField.autoSize = TextFieldAutoSize.LEFT;
textField.multiline = true;
textField.wordWrap = false;
textField.border = false;

stage.focus = textField;

It seems to get the focus, but doesn't put the cursor inside.  Can't just start 
typing.  Also, textField.setFocus() doesn't work.

Thanks,
Brandon



  

Re: [flexcoders] Re: referencing embedded images inside AdvancedDataGridGroupItemRenderer

2008-07-23 Thread Brandon Krakowsky
Amy, thanks.  The only difference is that I'm assigning the iconFunction in AS 
like so:

adg.iconFunction = myFunction;
private function myFunction(item:Object):Class {
trace("made it this far!");
}

I get nothing.  Let me look into it further.  Thanks for all your help.

Brandon



- Original Message 
From: Amy <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Tuesday, July 22, 2008 10:51:25 PM
Subject: [flexcoders] Re: referencing embedded images inside 
AdvancedDataGridGroupItemRenderer


--- In [EMAIL PROTECTED] ups.com, Brandon Krakowsky  
wrote:
>
> Amy, I can't seem to get the iconFunction to work with the ADG.  As 
per the docs, "This property is ignored by data grid controls."
> 
> It compiles but it IS in fact ignored.  Do you use the 
groupIconFunction?

The iconFunction is not ignored by the _Advanced_ Data Grid.  I can 
tell you this, because I use it successfully in a project I just 
finished.

here's a snippet of my code

//show appropriate menu icon based on state ond
//nature of item
private function menuIcon(item: Object):Class{
if (item is TaskUID){
var taskItem:TaskUID = item as 
TaskUID;
switch (taskItem.isComplet e) {
case Task.NOT_STARTED:
return icnEmpty;
case Task.STARTED:
return icnStarted;
case Task.COMPLETE:
return icnComplete;
}
} else if (item is MenuContainer) {
var containerItem: MenuContainer = 
item as MenuContainer;
switch (containerItem. runMode) {
case 'Normal':
return icnNormal;
case 'Review':
return icnReview;
case 'Analysis':
return icnAnalysis;
}
}
return null;
}

The MXML looks like this:



















  

Re: [flexcoders] Re: referencing embedded images inside AdvancedDataGridGroupItemRenderer

2008-07-22 Thread Brandon Krakowsky
Amy, I can't seem to get the iconFunction to work with the ADG.  As per the 
docs, "This property is ignored by data grid controls."

It compiles but it IS in fact ignored.  Do you use the groupIconFunction?

Thanks again,
Brandon



- Original Message 
From: Amy <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Tuesday, July 22, 2008 12:40:15 PM
Subject: [flexcoders] Re: referencing embedded images inside 
AdvancedDataGridGroupItemRenderer


--- In [EMAIL PROTECTED] ups.com, Brandon Krakowsky  
wrote:
>
> Amy:
> 
> It seems easier this way since I'm using a dataprovider which is 
updated often, changing the icon.  Right now I'm using a switch 
statement which tests "value.icon" and returns the proper embedded 
image class name.  I'm confused as to why I can't convert the String 
the "image1" to Class image1.  Seems easy enough, but nothing works.

That's what iconFunctions are for.

But you could try 

img.source = this[value.icon] ;

HTH;

Amy




  

Re: [flexcoders] Re: referencing embedded images inside AdvancedDataGridGroupItemRenderer

2008-07-22 Thread Brandon Krakowsky
Amy:

It seems easier this way since I'm using a dataprovider which is updated often, 
changing the icon.  Right now I'm using a switch statement which tests 
"value.icon" and returns the proper embedded image class name.  I'm confused as 
to why I can't convert the String the "image1" to Class image1.  Seems easy 
enough, but nothing works.

Thanks,
Brandon



- Original Message 
From: Amy <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Tuesday, July 22, 2008 10:04:34 AM
Subject: [flexcoders] Re: referencing embedded images inside 
AdvancedDataGridGroupItemRenderer


--- In [EMAIL PROTECTED] ups.com, Brandon Krakowsky  
wrote:
>
> I've embedded some images like so:
> 
> [Embed(source= "images/image1. png")]
> private var image1:Class;
> 
> [Embed(source= "images/image2. png")]
> private var image2:Class;
> 
> I can't seem to reference these class names from a String like so:
> 
> override public function set data(value:Object) :void {
> img = new Image;
> img.source = getDefinitionByName (value.icon) as 
Class; //getDefinitionByNa me is part of flash.utils package
> img.width = 22;
> img.height = 22;
> addChild(img) ;
> }
> 
> I also tried the following:
> value.icon as Class
> Class(value. icon)

Why not just use an iconFunction?

-Amy




  

[flexcoders] referencing embedded images inside AdvancedDataGridGroupItemRenderer

2008-07-21 Thread Brandon Krakowsky
I've embedded some images like so:

[Embed(source="images/image1.png")]
private var image1:Class;

[Embed(source="images/image2.png")]
private var image2:Class;

I can't seem to reference these class names from a String like so:

override public function set data(value:Object):void {
img = new Image;
img.source = getDefinitionByName(value.icon) as Class; 
//getDefinitionByName is part of flash.utils package
img.width = 22;
img.height = 22;
addChild(img);
}

I also tried the following:
value.icon as Class
Class(value.icon)

Thanks,
Brandon



  

[flexcoders] comboBox.percentWidth ignored?

2008-07-14 Thread Brandon Krakowsky
I've got a comboBox inside of a HBox.  I can see in the docs that a comboBox, 
by default, takes on the width of the largest title.  Setting the width via 
comboBox.width or comboBox.setActualSize set's it to the correct size, but 
setting the percentWidth property seems to be ignored and the comboBox is way 
to wide for the HBox.

Am I missing something?

Thanks,
Brandon



  

Re: [flexcoders] Re: AdvancedDataGridRendererProvider.renderer

2008-07-10 Thread Brandon Krakowsky
Thanks Amy.  I'll check this out!


- Original Message 
From: Amy <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Thursday, July 10, 2008 11:58:54 AM
Subject: [flexcoders] Re: AdvancedDataGridRendererProvider.renderer


--- In [EMAIL PROTECTED] ups.com, Brandon Krakowsky  
wrote:
>
> Thanks Amy.  This helped.  It actually ends up looking like this:
> iconRendererProvide r.renderer = new ClassFactory( myClass);
> 
> The other issue I'm having is displaying images since 
AdvancedDataGridIte mRenderer extends UITextField.  Do I have to extend 
AdvancedDataGridGro upItemRenderer in order to display images?  The 
DataGrid component doesn't seem to have this option at all.

This may help:

http://flexdiary. blogspot. com/2008/ 06/musings- on-advanceddatag rid-part-
2.html

HTH;

Amy




  

Re: [flexcoders] Re: AdvancedDataGridRendererProvider.renderer

2008-07-10 Thread Brandon Krakowsky
Thanks Amy.  This helped.  It actually ends up looking like this:
iconRendererProvider.renderer = new ClassFactory(myClass);

The other issue I'm having is displaying images since 
AdvancedDataGridItemRenderer extends UITextField.  Do I have to extend 
AdvancedDataGridGroupItemRenderer in order to display images?  The DataGrid 
component doesn't seem to have this option at all.

Thanks again,
Brandon


- Original Message 
From: Amy <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Wednesday, July 9, 2008 7:43:56 PM
Subject: [flexcoders] Re: AdvancedDataGridRendererProvider.renderer


--- In [EMAIL PROTECTED] ups.com, Brandon Krakowsky  
wrote:
>
> I'm trying to set the "renderer" property of an 
AdvancedDataGridRen dererProvider in AS.
> 
> var iconRendererProvide r:AdvancedDataGr idRendererProvid er = new 
AdvancedDataGridRen dererProvider;
> iconRendererProvide r.columnIndex = 0;
> iconRendererProvide r.columnSpan = 1;
> iconRendererProvide r.dataField = "icon";
> iconRendererProvide r.renderer = myClass;
> 
> myClass extends AdvancedDataGridIte mRenderer and overrides the data 
function.
> 
> Here's the error I get:
> 1067: Implicit coercion of a value of type Class to an unrelated 
type mx.core:IFactory.
> 
> I can't seem to figure out how to specify the class.

>From the error, you probably need something more like this:

var iconRendererProvide r = new ClassFactory
(AdvancedDataGridRe ndererProvider) ;

iconRendererProvide r.properties = {columnIndex: 0, columnSpan:1, 
dataField:'icon' , renderer:com. yourorg.views. myClass}

The help for AdvanceDataGridItem Renderer doesn't appear to exist on 
my system, so sorry if this misses the mark.

HTH;

Amy




  

[flexcoders] AdvancedDataGridRendererProvider.renderer

2008-07-09 Thread Brandon Krakowsky
I'm trying to set the "renderer" property of an 
AdvancedDataGridRendererProvider in AS.

var iconRendererProvider:AdvancedDataGridRendererProvider = new 
AdvancedDataGridRendererProvider;
iconRendererProvider.columnIndex = 0;
iconRendererProvider.columnSpan = 1;
iconRendererProvider.dataField = "icon";
iconRendererProvider.renderer = myClass;

myClass extends AdvancedDataGridItemRenderer and overrides the data function.

Here's the error I get:
1067: Implicit coercion of a value of type Class to an unrelated type 
mx.core:IFactory.

I can't seem to figure out how to specify the class.

Thanks,
Brandon


  

Re: [flexcoders] Sizing Components Inside Custom UIComponents

2008-07-02 Thread Brandon Krakowsky
Thanks for the help on this everyone.  I'll do some testing.

Brandon


- Original Message 
From: Gordon Smith <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Tuesday, July 1, 2008 9:23:42 PM
Subject: RE: [flexcoders] Sizing Components Inside Custom UIComponents


If you were extending a Container like VBox,
its updateDisplayList( ) implementation would call setActualSize( ) on the
children, taking their percentWidth and percentHeight into account. But when
you extend UIComponent, you take on the responsibility for sizing your
children.
 
Gordon Smith
Adobe Flex SDK Team
 


 
From:[EMAIL PROTECTED] ups.com [mailto: [EMAIL PROTECTED] ups.com ] On Behalf 
Of  Alex Harui
Sent: Tuesday, July 01, 2008 4:40
PM
To: [EMAIL PROTECTED] ups.com
Subject: RE: [flexcoders] Sizing
Components Inside Custom UIComponents
 
Parents size their children in Flex.  You have to call
setActualSize on your children.
 


 
From:[EMAIL PROTECTED] ups.com 
[mailto: [EMAIL PROTECTED] ups.com ] On Behalf Of krakowskyb
Sent: Tuesday, July 01, 2008 7:44
AM
To: [EMAIL PROTECTED] ups.com
Subject: [flexcoders] Sizing
Components Inside Custom UIComponents
 
I'm
pretty new to Flex. I've created some custom components by
extending UIComponent. I've implemented createChildren,
commitProperties, measure, and updateDisplayList. I can resize the
custom UIComponents using any number of methods:
constraints, CSS, etc. They resize no problem. But if I try to size
a child of that custom component, no width or height is assigned,
unless I use an explicit setActualSize.

For example:
My custom component (Content) has been added to a canvas. The
component is sized using width and height properties:

var content:Content = new Content;
content.width = 800;
content.height = 800;
addChild(content) ;

In content, in createChildren, I create an instance of the Image
component.

var container:Image = new Image;
container.scaleCont ent = false;
addChild(container) ;

I try to do this:
container.percentWi dth = 100;
container.percentHe ight = 100;

But nothing.

I can only seem to resize this inside updateDisplayList like so:
container.setActual Size(unscaledWid th, unscaledHeight) ;

Thanks,
Brandon





  

Re: [flexcoders] Sizing Components Inside Custom UIComponents

2008-07-01 Thread Brandon Krakowsky
Thanks.  Looks like I'm doing it correctly.  I'm sure I'll be back!

Brandon


- Original Message 
From: Josh McDonald <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Tuesday, July 1, 2008 8:02:16 PM
Subject: Re: [flexcoders] Sizing Components Inside Custom UIComponents


Which you need to do from updateDisplayList( ) :)

Also, keep in mind that if you set width and height on a child component 
directly rather than calling setActualSize( ), that child component will no 
longer measure() and you'll only be able to get the dimensions you assigned to 
it rather than the dimensions it thinks it needs to be. 

-Josh


On Wed, Jul 2, 2008 at 9:39 AM, Alex Harui <[EMAIL PROTECTED] com> wrote:

Parents size their children in Flex.  You
have to call setActualSize on your children.
 
,___ 


-- 
"Therefore, send not to know For whom the bell tolls. It tolls for thee."

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED] com 


  

[flexcoders] New Topic?

2008-07-01 Thread Brandon Krakowsky
I posted a new topic this morning but haven't seen it show up yet.  How does it 
get "approved"?

Thanks,
Brandon