Re: [flexcoders] Auto block comment in Flexbuilder 2?

2008-02-20 Thread Derrick Anderson
i only have FB3 but i believe CTRL + SHIFT + C works on both.

On Wed, Feb 20, 2008 at 11:12 AM, Merrill, Jason <
[EMAIL PROTECTED]> wrote:

>Is there a key combination in Flexbuilder 2 to auto-comment out a
> selected region of code?  I hate having to type  manually in
> MXML... or /*  */ in Actionscript.  Thanks.
>
>
> Jason Merrill
> *Bank of America *
> GT&O L&LD Solutions Design & Development
> eTools & Multimedia
>
> *Bank of America Flash Platform Developer Community*
>
> *Interested in innovative ideas in Learning?
> Check out the* *GT&O Innovative Learning 
> Blog*
> ** and & 
> *subscribe*
> .
>
>
>  
>


Re: [flexcoders] Re: bitmap hitTest method

2008-02-20 Thread Troy Gilbert
>  > http://troygilbert.com/category/game-dev/

Wow, first time I've ever seen someone else link to my blog on this
list! ;-) Sweet, thanks... guess I am helping!

And he's right. Here's the direct link:

http://troygilbert.com/2007/06/25/pixel-perfect-collision-detection-in-actionscript3/

Also, it ranks pretty high if you just google "pixel perfect collision
detection in as3".

It will do exactly what you want. It factors in the complete
transforms of the display objects, doesn't care what kind of display
object they are, and does the checking at a pixel-perfect level and at
given alpha threshold. It's pretty efficient, checking only the
minimal amount of pixels, and returns a rectangle that bounds the
overlapping pixels.

If you read the comments there are some suggestions for potential
speed improvements. While those suggestions definitely work in native
apps using hardware with really fast blitters, I'm not sure if the AS3
overhead would cancel out the savings in this case as I've not done
any testing. My gut is that it would, in which case the code provided
is about as fast as it gets for pixel-perfect collision detection.

The reason you're previous code didn't work for you (as I mentioned in
the blog post) is that when doing hit tests Flash sees a bitmap as its
rectangle, not as individual pixels with alpha, which is why you can't
"click through" a bitmap's transparent regions to reach an object
below it unless you manually forward the mouse event.

Troy.


[flexcoders] Re: Flex Ant Task for F3b3 genereates ALWAYS debug version, how to fix that?

2008-02-20 Thread Gaurav Jain
These numbers are after only switching debug (true|false) using flex
tasks.

--- In flexcoders@yahoogroups.com, "lytvynyuk" <[EMAIL PROTECTED]> wrote:
>
> Did you get 241kb and 149kb only switching debug option in ant task or
> one of results is after FB another after ANT?
> 
> --- In flexcoders@yahoogroups.com, "Gaurav Jain"  wrote:
> >
> > In my simple test I see size changing from 241kb to 149kb. I would
> > suggest you log a bug at http://bugs.adobe.com/flex with your test
case
> > 
> > Thanks,
> > Gaurav
> > 
> > --- In flexcoders@yahoogroups.com, "lytvynyuk"  wrote:
> > >
> > > Nothing happened, same size. That is mean, It didn't checks that
> > > options or I do something wrong. Need to do deeper
investigation. All
> > > that FlexAntTasks story is so confusing - there is no proper
> > > documentation, I figured some options only by analyzing java source
> > > files!...g
>




Re: [flexcoders] Re: Best Practices:HTTPService, E4X, XML and dataProvider

2008-02-20 Thread Chris Hunter
On Feb 20, 2008 10:43 AM, Tracy Spratt <[EMAIL PROTECTED]> wrote:

> Performance caveat: It has become clear that accessing data an xml
> node is significantly slower than accessing data in a strongly typed
> object.  This can be noticable if you have, say, a large datagrid
> that displays hundreds of cells.
>
> If this is the case with your app, then best practice is to pre-
> process the e4x xml into strongly typed objects in an ArrayCollection.

Tracy.

I'm curious if you think this is applicable for charts as well. We
have some charts where we're pulling in hundreds or thousands of data
points as XML via HTTPService and the rendering is occasionally slow.
I've been ascribing that to the rendering overhead (and have been
working to address that -- eliminating drop shadow filter, etc...) but
wonder if some of it is just accessing XML data.

Thanks,

Chris Hunter


Re: [flexcoders] how to de-serialize objects

2008-02-20 Thread [p e r c e p t i c o n]
Hi Again,
Ok...so by instantiating my class the Serialization took place and there are
99 elements of that type in the result...however the members of the class
are all null, but i'm printing them to a file on the Java side so I know
that there are values in each object...any ideas on why this is happening?

thanks so much for all your input!
percy


[flexcoders] Re: Power point in FLEX

2008-02-20 Thread Anthony DeBonis
sliderocket creates presentation > not in ppt format thought
http://www.sliderocket.com  

I have code we use to import a ppt file and export .swf files for each 
slide in a ppt file - if you need it.  Can be used with ColdFusion or 
Java.
- one is using FlashSpring 
- one uses DreamSoft PPT import tool



[flexcoders] Re: Flex Ant Task for F3b3 genereates ALWAYS debug version, how to fix that?

2008-02-20 Thread lytvynyuk
In that case no point to report bug, everything works for me too.
Problem for me is different actually it is about RSL.

I try to build everytinh with RSL which suppose to decrease size of my
application. WQhich is not happening. AS you see I included RSL into
my flex build task but it doesnt really affect anything, with or without 



it produces same size app, but when I compiled it WITH and run it it
demands presence of framework_3.0.189825.swf.

With ECLIPSE it actually decreases size of application.

What is the syntax of correct usage of RSL in ant?

--- In flexcoders@yahoogroups.com, "Gaurav Jain" <[EMAIL PROTECTED]> wrote:
>
> These numbers are after only switching debug (true|false) using flex
> tasks.
> 



[flexcoders] Free Image Cropping Component

2008-02-20 Thread Paul Whitelock
Greetings!

I've just completed developing a component for Flex that enables an
image to be cropped. 

A cropping rectangle is used to select the portion of the image to
retain. The cropping rectangle may be resized using four corner
handles and the rectangle may be repositioned by clicking inside of
the rectangle and dragging. The dimensions of the rectangle may be
unconstrained, or they may be constrained to an aspect ratio.

The component is free and includes full source code (licensed under
the MIT License). You can see an example of the component, read the
documentation and download the component, documentation and source
code here:

http://blog.mediablur.com/2008/02/20/flex-image-cropping-component/


Paul

---
Paul Whitelock
Denver, Colorado






Re: [flexcoders] Free Image Cropping Component

2008-02-20 Thread Jon Bradley


On Feb 20, 2008, at 1:06 PM, Paul Whitelock wrote:


Greetings!

I've just completed developing a component for Flex that enables an
image to be cropped.

A cropping rectangle is used to select the portion of the image to
retain. The cropping rectangle may be resized using four corner
handles and the rectangle may be repositioned by clicking inside of
the rectangle and dragging. The dimensions of the rectangle may be
unconstrained, or they may be constrained to an aspect ratio.



Good job on that.  Now all you need to do to make it complete is (in  
my opinion):


1. Incorporate Senocular's wonderful TransformTool class (also  
available from sepiroth.it for Flex)
2. Implement rotation of the crop tool while respecting the boundary  
of the original image


At least, that's what I've done in my own project. I can point you in  
the right direction if you need any pointers or assistance.


cheers and thanks for sharing!

- j

RE: [flexcoders] Auto block comment in Flexbuilder 2?

2008-02-20 Thread Merrill, Jason
Perfect, that's exactly what I was looking for.  Thanks.
 

Jason Merrill 
Bank of America 
GT&O L&LD Solutions Design & Development 
eTools & Multimedia 

Bank of America Flash Platform Developer Community 


Interested in innovative ideas in Learning?
Check out the GT&O Innovative Learning Blog

and & subscribe
 . 






[flexcoders] Re: Flex Ant Task for F3b3 genereates ALWAYS debug version, how to fix that?

2008-02-20 Thread Gaurav Jain
I think you should modify your ant task to following:




${FLEX_HOME}/frameworks/libs/framework.swc
${FLEX_HOME}/frameworks/rsls/framework_3.0.189825.swf



false
false






if you are using FB 3, it would use  and
not .

 was introduced in flex 3 to support
framework caching.

Thanks,
Gaurav

--- In flexcoders@yahoogroups.com, "lytvynyuk" <[EMAIL PROTECTED]> wrote:
>
> In that case no point to report bug, everything works for me too.
> Problem for me is different actually it is about RSL.
> 
> I try to build everytinh with RSL which suppose to decrease size of my
> application. WQhich is not happening. AS you see I included RSL into
> my flex build task but it doesnt really affect anything, with or
without 
> 
> 
> 
> it produces same size app, but when I compiled it WITH and run it it
> demands presence of framework_3.0.189825.swf.
> 
> With ECLIPSE it actually decreases size of application.
> 
> What is the syntax of correct usage of RSL in ant?
> 
> --- In flexcoders@yahoogroups.com, "Gaurav Jain"  wrote:
> >
> > These numbers are after only switching debug (true|false) using flex
> > tasks.
> >
>




Re: [flexcoders] finding all textareas

2008-02-20 Thread yiğit boyar
you can trace all children with;

var obj:Object;
for each(obj in this){
 if(obj is TextArea){
  //than do sth
 }
}

but i dont know it has anything to do with the currentState or not

On Feb 20, 2008 1:15 PM, Nikolas Hagelstein <[EMAIL PROTECTED]> wrote:

> Hi there,
>
> is there a way to determine all e.g. textareas within the current state?
>
> cheers,
> Nikolas
>


[flexcoders] Drag and Drop issues

2008-02-20 Thread Nick Collins
I've got an application I'm working on where I need to be able to drag
things onto a Canvas, and sometimes into containers that are children of the
canvas.

The problem I'm having is that when I have another container inside the
canvas, it doesn't register the dragEnter event, even though I have added an
event listener for that event to the component. Instead, only it's parent
dispatches the dragEnter event.

How can I get the child components to register when the user drags over
them, versus the parent canvas?


RE: [flexcoders] Horizontal Menu?

2008-02-20 Thread Joan Lafferty
Do you have an image of what you are wanting to do? 

Joan

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Aasim
Sent: Tuesday, February 19, 2008 11:08 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Horizontal Menu?

 

Hi,

Has anyone made a horizontal menu componnet which has the items 
arranged horizontally rather than stacked vertically?

-Aasim

 



RE: [flexcoders] Re: Best Practices:HTTPService, E4X, XML and dataProvider

2008-02-20 Thread Brad Bueche
Thank you very much for taking the time to give that answer. Its helping
a lot
 
I guess for turning this into a XMLListCollection and hooking it up to
my dataProvider I'd do the following?
 
//***
[Bindable]
public var dpCollection:XMLListCollection = new XMLListCollection (); 
 
public var dpList:XMLList = new XMLList(); 
 
[...snip...]
 
public function resultHandler(event:ResultEvent):void 
{ 
dpList = event.result.month; 
dpCollection = dpList;
linechart.dataProvider = dpCollection;
}
 
 
/*
Is this correct? But then where is the strong typing?
 
I WILL be doing grids and charts with hundreds of data points (for
reporting, query only, purposes), so if I am reading you correctly I
need to put this into an ArrayCollection (which I think, but I'm not
sure, is different than an XMLListcollection?).  
 
thanks,
brad
 
-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tracy Spratt
Sent: Wednesday, February 20, 2008 11:43 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Best Practices:HTTPService, E4X, XML and
dataProvider



If you are not going to programatically update an individual data 
provider item, them XMLList will be fine.

However, if you ever want to have a user update a property of an 
item, in some editable cell for example, then you need to wrap the 
XMLList in an XMLListCollection.

This is because when you use the collection API to modify the data, 
events are dispatched to ensure the UI updates to match the data 
update. This is similar to the relationship between Array and 
ArrayCollection.

There is no performance reason not to use a collection. If you do 
not, then Flex wraps your XMLList or Array in a collection itself.

So, there are no reasons not to use a collection, except for one more 
line of code, and several reasons you should.

Performance caveat: It has become clear that accessing data an xml 
node is significantly slower than accessing data in a strongly typed 
object. This can be noticable if you have, say, a large datagrid 
that displays hundreds of cells.

If this is the case with your app, then best practice is to pre-
process the e4x xml into strongly typed objects in an ArrayCollection.

Tracy

--- In [EMAIL PROTECTED] 
ups.com, "Brad Bueche" <[EMAIL PROTECTED]> wrote:
>
> Thanks to this group, I have come a long way in understanding 
this. I
> want to check my setup and see if I still have further to go. Is 
this
> the preferred way to set up a dataprovider when pulling XML in E4X
> format via HTTPService? Or do I still need to some how incorporate
> XMLListCollection here?
> 
> public var xmlService:HTTPService = new HTTPService(); 
> public var dataProvider:XMLList = new XMLList(); 
> 
> public function loadXML():void 
> { 
> xmlService.url 
= "http://hostname/ 
Data/createXML.php";
> 
> xmlService.resultFormat = "e4x"; 
> xmlService.addEventListener(ResultEvent.RESULT,
> resultHandler); 
> xmlService.send(); 
> } 
> 
> public function resultHandler(event:ResultEvent):void 
> { 
> dataProvider = event.result.month; 
> }
>



 



Re: [flexcoders] Re: bitmap hitTest method

2008-02-20 Thread Daniel Freiman
Yeah, it's like we have a community here or something.  Who new? :)

- Dan

On Wed, Feb 20, 2008 at 12:51 PM, Troy Gilbert <[EMAIL PROTECTED]>
wrote:

>   > > http://troygilbert.com/category/game-dev/
>
> Wow, first time I've ever seen someone else link to my blog on this
> list! ;-) Sweet, thanks... guess I am helping!
>
> And he's right. Here's the direct link:
>
>
> http://troygilbert.com/2007/06/25/pixel-perfect-collision-detection-in-actionscript3/
>
> Also, it ranks pretty high if you just google "pixel perfect collision
> detection in as3".
>
> It will do exactly what you want. It factors in the complete
> transforms of the display objects, doesn't care what kind of display
> object they are, and does the checking at a pixel-perfect level and at
> given alpha threshold. It's pretty efficient, checking only the
> minimal amount of pixels, and returns a rectangle that bounds the
> overlapping pixels.
>
> If you read the comments there are some suggestions for potential
> speed improvements. While those suggestions definitely work in native
> apps using hardware with really fast blitters, I'm not sure if the AS3
> overhead would cancel out the savings in this case as I've not done
> any testing. My gut is that it would, in which case the code provided
> is about as fast as it gets for pixel-perfect collision detection.
>
> The reason you're previous code didn't work for you (as I mentioned in
> the blog post) is that when doing hit tests Flash sees a bitmap as its
> rectangle, not as individual pixels with alpha, which is why you can't
> "click through" a bitmap's transparent regions to reach an object
> below it unless you manually forward the mouse event.
>
> Troy.
>  
>


[flexcoders] how does mx:DataGrid state work?

2008-02-20 Thread coder3

Hi All,

I am trying to use "state" to change to column fields of mx:DataGrid.

for example, if it's state1, i show column1, column3 only. if it's state2, i
show column2, column3 only.

so i made it this way:



   
   

  
   



it works fine right after i change the state. but if i refresh the table,
even it's still in the same state, all the columns will show. 

did i do it wrong? what's the right approach?

thanks!!

c.
-- 
View this message in context: 
http://www.nabble.com/how-does-mx%3ADataGrid-state-work--tp15596181p15596181.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] Supporting both double and single click events for TileList

2008-02-20 Thread Greg
Hi All,

 

I have a photo gallery on my site (TileList of thumbnails) and I am having
problems with double click events when employing click event.  I would like
to support the events as follows:

 

-  ItemClick, open image popup window with image slightly larger
than thumbnail

-  ItemDoubleClick, open image popup window with large view say
800x600

 

The ItemClick event happens before the double click and it displays a popup
over the selected item. It seems impossible to catch the double click the
way I am trying to implement it using both (itemClick and itemDoubleClick
events). It feels like I need to catch a generic 'change' event, inspect how
many mouse clicks occurred and proceed accordingly. 

 

Is this possible? 

 

Thanks,


Greg



RE: [flexcoders] Re: Best Practices:HTTPService, E4X, XML and dataProvider

2008-02-20 Thread Tracy Spratt
For the XMLList collection, do this:

public var dpCollection:XMLListCollection;

 

dpList = event.result.month; 

dpCollection = new XMLListCollection(dpList);

 

One suggestion for flexibility: Keep a reference to the root of the XML.
My advised code below:

private var _xmlResult:XML;

public var _dpCollection:XMLListCollection;  //the leading underscore
just indicates that this is an instance scoped var

 

public function resultHandler(event:ResultEvent):void 
{ 
_xmlResult = XML(event.result);  //you can
also use the "as" operator

trace(_xmlResult.toXMLString()); //so you
can see exactly what you have

var xlMonths:XMLList = _xmlResult.month;  //this interim var
not required, just for clarity and debugging

_dpCollection = new XMLListCollection(xlMonths); 

linechart.dataProvider = _dpCollection;//this is
find, alternatively mark var [Bindable] and bind linechart dataProvider
to var

}// resultHandler

 

The "strong typing" is really a separate issue.  The above is fine
unless you have MANY renderers on screen at once.  I'd say do it like
above first, and go to the ArrayCollection of strongly typed objects if
necessary.  

 

The creation of the ArrayCollection is a manual process.  You will
for-loop over each xml node in the XMLList, create a value object, and
assign the object property values from the xml atribute values (often
the VO takes an xml node and does this itself).  Then you addItem() the
item object to the ArrayCollection.  All this happens in the result
handler.

 

Tracy



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Brad Bueche
Sent: Wednesday, February 20, 2008 1:56 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Best Practices:HTTPService, E4X, XML and
dataProvider

 

Thank you very much for taking the time to give that answer. Its helping
a lot

 

I guess for turning this into a XMLListCollection and hooking it up to
my dataProvider I'd do the following?

 

//***

[Bindable]

public var dpCollection:XMLListCollection = new XMLListCollection (); 

 

public var dpList:XMLList = new XMLList(); 

 

[...snip...]

 

public function resultHandler(event:ResultEvent):void 
{ 
dpList = event.result.month; 

dpCollection = dpList;

linechart.dataProvider = dpCollection;

}

 

 

/*

Is this correct? But then where is the strong typing?

 

I WILL be doing grids and charts with hundreds of data points (for
reporting, query only, purposes), so if I am reading you correctly I
need to put this into an ArrayCollection (which I think, but I'm not
sure, is different than an XMLListcollection?).  

 

thanks,

brad

 

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tracy Spratt
Sent: Wednesday, February 20, 2008 11:43 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Best Practices:HTTPService, E4X, XML and
dataProvider

If you are not going to programatically update an individual
data 
provider item, them XMLList will be fine.

However, if you ever want to have a user update a property of an

item, in some editable cell for example, then you need to wrap
the 
XMLList in an XMLListCollection.

This is because when you use the collection API to modify the
data, 
events are dispatched to ensure the UI updates to match the data

update. This is similar to the relationship between Array and 
ArrayCollection.

There is no performance reason not to use a collection. If you
do 
not, then Flex wraps your XMLList or Array in a collection
itself.

So, there are no reasons not to use a collection, except for one
more 
line of code, and several reasons you should.

Performance caveat: It has become clear that accessing data an
xml 
node is significantly slower than accessing data in a strongly
typed 
object. This can be noticable if you have, say, a large datagrid

that displays hundreds of cells.

If this is the case with your app, then best practice is to pre-
process the e4x xml into strongly typed objects in an
ArrayCollection.

Tracy

--- In flexcoders@yahoogroups.com
 , "Brad Bueche" <[EMAIL PROTECTED]> wrote:
>
> Thanks to this group, I have come a long way in understanding 
this. I
> want to check my setup and see if I still have further to go.
Is 
this
> the preferred way to set up a dataprovider when pulling XML in
E4X
> format via HTTPService? Or do I still need to some how
incorporate
> XMLListCollection here?
> 
> public var xmlService:HTTPServic

Re: [flexcoders] Supporting both double and single click events for TileList

2008-02-20 Thread Maciek Sakrejda
Right. If a double-click occurs, you'll get the single-click behavior as
well. What you want to do is add a listener for the single click that
starts a timer for a function that will execute the single-click
behavior in n milliseconds. If a second click occurs, cancel the timer.
The double-click event handler will be invoked normally. I've seen
examples around, but a quick search did not turn up what I was thinking
of. I'm sure you can find a relevant example with a little
investigation.

Note that this (necessarily) introduces a slight delay for the
single-click behavior. As long as you keep this under 300-500 ms, it
should be barely noticeable for your application.


-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: Greg <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Supporting both double and single click events for
TileList
Date: Wed, 20 Feb 2008 14:20:44 -0500

Hi All,

 

I have a photo gallery on my site (TileList of thumbnails) and I am
having problems with double click events when employing click event.  I
would like to support the events as follows:

 

- ItemClick, open image popup window with image slightly larger
than thumbnail

- ItemDoubleClick, open image popup window with large view say
800x600

 

The ItemClick event happens before the double click and it displays a
popup over the selected item. It seems impossible to catch the double
click the way I am trying to implement it using both (itemClick and
itemDoubleClick events). It feels like I need to catch a generic
‘change’ event, inspect how many mouse clicks occurred and proceed
accordingly. 

 

Is this possible? 

 

Thanks,


Greg


 




Re: [flexcoders] Re: Transparent=true on BitmapData not working

2008-02-20 Thread Josh McDonald
So the colour value is a 32 bi argb instead of just 24 bit rgb then? Well
that makes sense :) Where else in flex is a colour value 32 bit instead of
24 bit? Is it all over the place and I've just never noticed? What about in
styles?

-J

On Thu, Feb 21, 2008 at 3:39 AM, Troy Gilbert <[EMAIL PROTECTED]>
wrote:

>   > Just plain old 0 worked fine. I just went back and checked the docs,
> they do
> > actually tell you to do that, but I doubt I ever would have seen it.
> Doesn't
> > really make sense, but you get that :)
>
> Actually, it makes perfect sense. The default value for the fill color
> is 100% white with 100% alpha (fully opaque), which is 0x in
> ARGB format. You want it to be blank/transparent, so you need to
> provide a default fill color that has 0% alpha, so anything of the
> form 0x00??. Using black with zero-alpha is good habit because
> it's equivalent to pre-multiplying your colors with black, which is
> what works best (or at least most intuitively) with standard computer
> blending equations.
>
> The true/false flag just controls whether or not your BitmapData *has*
> an alpha channel, not what the contents of that alpha channel are (the
> docs should probably be clearer about this and the argument should
> probably be named "hasAlphaChannel" as opposed to "transparency", just
> to be more explicit). Basically, this flag controls whether your data
> is ARGB or RGB (though I wouldn't be surprised if they were both
> stored as 32-bits-per-pixel as that normally speeds up blitting since
> the pixels are word-aligned).
>
> Troy.
>  
>



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

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


[flexcoders] What could make a deleted modal popup redraw the whole screen?

2008-02-20 Thread cmalartre
Dear good fellow coders,

Simple problem with modal popups:

1) Right-click Show redraw region
2) Only part of the app are bordered red
3) Create popup with modal=true
4) Delete popup with PopupManager.removePopup(this)
5) Right-click Show redraw region
6) Whole app is always redrawn. The stage's borders are red. Must be slow!

We do a Show Redraw region and the whole app is always redrawn. Bring
me to tears!

No bugs when the PopUp is not modal. When I create a new project, I'm
unable to reproduce the bug.

What could I test? How can I find what is making the whole stage redraw?

Thanks
Carl



Re: [flexcoders] how to de-serialize objects

2008-02-20 Thread [p e r c e p t i c o n]
just noticed that the namespaces are different...would this matter? on the
POJO it com.xxx.remoting, but on the AS3Object it just package...
percy

On Wed, Feb 20, 2008 at 10:12 AM, [p e r c e p t i c o n] <
[EMAIL PROTECTED]> wrote:

> Hi Again,
> Ok...so by instantiating my class the Serialization took place and there
> are 99 elements of that type in the result...however the members of the
> class are all null, but i'm printing them to a file on the Java side so I
> know that there are values in each object...any ideas on why this is
> happening?
>
> thanks so much for all your input!
> percy
>


RE: [flexcoders] Re: Best Practices:HTTPService, E4X, XML and dataProvider

2008-02-20 Thread Brad Bueche
Ok, I understand!!! (Finally!)
 
thanks!!!
brad

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tracy Spratt
Sent: Wednesday, February 20, 2008 2:47 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Best Practices:HTTPService, E4X, XML and
dataProvider






For the XMLList collection, do this:

public var dpCollection:XMLListCollection;



dpList = event.result.month; 

dpCollection = new XMLListCollection(dpList);



One suggestion for flexibility: Keep a reference to the root of the XML.
My advised code below:

private var _xmlResult:XML;

public var _dpCollection:XMLListCollection;  //the leading underscore
just indicates that this is an instance scoped var



public function resultHandler(event:ResultEvent):void 
{ 
_xmlResult = XML(event.result);  //you can
also use the "as" operator

trace(_xmlResult.toXMLString()); //so you
can see exactly what you have

var xlMonths:XMLList = _xmlResult.month;  //this interim var
not required, just for clarity and debugging

_dpCollection = new XMLListCollection(xlMonths); 

linechart.dataProvider = _dpCollection;//this is
find, alternatively mark var [Bindable] and bind linechart dataProvider
to var

}// resultHandler



The "strong typing" is really a separate issue.  The above is fine
unless you have MANY renderers on screen at once.  I'd say do it like
above first, and go to the ArrayCollection of strongly typed objects if
necessary.  



The creation of the ArrayCollection is a manual process.  You will
for-loop over each xml node in the XMLList, create a value object, and
assign the object property values from the xml atribute values (often
the VO takes an xml node and does this itself).  Then you addItem() the
item object to the ArrayCollection.  All this happens in the result
handler.



Tracy


  _  


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Brad Bueche
Sent: Wednesday, February 20, 2008 1:56 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Best Practices:HTTPService, E4X, XML and
dataProvider



Thank you very much for taking the time to give that answer. Its helping
a lot



I guess for turning this into a XMLListCollection and hooking it up to
my dataProvider I'd do the following?



//***

[Bindable]

public var dpCollection:XMLListCollection = new XMLListCollection (); 



public var dpList:XMLList = new XMLList(); 



[...snip...]



public function resultHandler(event:ResultEvent):void 
{ 
dpList = event.result.month; 

dpCollection = dpList;

linechart.dataProvider = dpCollection;

}





/*

Is this correct? But then where is the strong typing?



I WILL be doing grids and charts with hundreds of data points (for
reporting, query only, purposes), so if I am reading you correctly I
need to put this into an ArrayCollection (which I think, but I'm not
sure, is different than an XMLListcollection?).  



thanks,

brad



-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tracy Spratt
Sent: Wednesday, February 20, 2008 11:43 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Best Practices:HTTPService, E4X, XML and
dataProvider

If you are not going to programatically update an individual data 
provider item, them XMLList will be fine.

However, if you ever want to have a user update a property of an 
item, in some editable cell for example, then you need to wrap the 
XMLList in an XMLListCollection.

This is because when you use the collection API to modify the data, 
events are dispatched to ensure the UI updates to match the data 
update. This is similar to the relationship between Array and 
ArrayCollection.

There is no performance reason not to use a collection. If you do 
not, then Flex wraps your XMLList or Array in a collection itself.

So, there are no reasons not to use a collection, except for one more 
line of code, and several reasons you should.

Performance caveat: It has become clear that accessing data an xml 
node is significantly slower than accessing data in a strongly typed 
object. This can be noticable if you have, say, a large datagrid 
that displays hundreds of cells.

If this is the case with your app, then best practice is to pre-
process the e4x xml into strongly typed objects in an ArrayCollection.

Tracy

--- In [EMAIL PROTECTED] 
ups.com, "Brad Bueche" <[EMAIL PROTECTED]> wrote:
>
> Thanks to this group, I have come a long way in understanding 
this. I
> want to check my setup and see if I still have further to go. Is 
this
> the preferred way to set up a dataprovider when pulling XML in E4X
> format via HTTPService? Or do I still need to some how incorporate
> XMLListCollection here?
> 
> public var xmlService:HTTPService = new HTTPService(); 
> p

[flexcoders] Re: Flex Ant Task for F3b3 genereates ALWAYS debug version, how to fix that?

2008-02-20 Thread lytvynyuk
with
 

${FLEX_HOME}/frameworks/libs/framework.swc

${FLEX_HOME}/frameworks/rsls/framework_3.0.189825.swf
 

in my ant build file I getting:

W:\jboss-4.0.5\server\default\deploy\Myapp.war\build.xml:64: Invalid
element: path-element

But:
 
 
 

Actually builds OK, but doesn't affect size of code at all.

 ${FLEX_HOME} = W:/Program Files/Adobe/Flex Builder 3
Plug-in/sdks/3.0.0

I run Flex Builder Plug-in 3, build 3.0.190133 beta 3

Also I'm getting this warning:
 [mxmlc] Warning: A signed RSL was specified for library W:\Program
Files\Adobe\Flex Builder 3
Plug-in\sdks\3.0.0\frameworks\libs\framework.swc without an unsigned RSL
as a failover. To avoid runtime errors, either require player version
9.0.60 in your HTML wrapper or add an unsigned RSL as a failover for the
signed RSL. Use -target-player=9.0.60 if you choose to require player
version 9.0.60.

--- In flexcoders@yahoogroups.com, "Gaurav Jain" <[EMAIL PROTECTED]> wrote:
>
> I think you should modify your ant task to following:
>
>  output="${DEPLOY_DIR}/ActiveUpdate.swf"
>   actionscript-file-encoding="UTF-8"
>
> services="${BUILD_SPACE}res/services-config.xml"
>   context-root="ISP"
>   locale="en_US" as3="true"
> optimize="true" static-rsls="false" headless-server="true">
> 
> 
>
${FLEX_HOME}/frameworks/libs/framework.swc
>
${FLEX_HOME}/frameworks/rsls/framework_3.0.189825.swf
> 
>
> 
> false
> false
>  append="true">
> 
> 
> 
> 
>
> if you are using FB 3, it would use  and
> not .
>
>  was introduced in flex 3 to support
> framework caching.
>
> Thanks,
> Gaurav
>
> --- In flexcoders@yahoogroups.com, "lytvynyuk" lytvynyuk@ wrote:
> >
> > In that case no point to report bug, everything works for me too.
> > Problem for me is different actually it is about RSL.
> >
> > I try to build everytinh with RSL which suppose to decrease size of
my
> > application. WQhich is not happening. AS you see I included RSL into
> > my flex build task but it doesnt really affect anything, with or
> without
> >
> > 
> >
> > it produces same size app, but when I compiled it WITH and run it it
> > demands presence of framework_3.0.189825.swf.
> >
> > With ECLIPSE it actually decreases size of application.
> >
> > What is the syntax of correct usage of RSL in ant?
> >
> > --- In flexcoders@yahoogroups.com, "Gaurav Jain"  wrote:
> > >
> > > These numbers are after only switching debug (true|false) using
flex
> > > tasks.
> > >
> >
>



[flexcoders] Re: Supporting both double and single click events for TileList

2008-02-20 Thread jmfillman
A timer option may be what you decide, but keep in mind that you can 
still control the popup from the application. So, the first click 
will always create the popup, but if you don't prevent use of the 
parent application while the popup is open (the only way to ever get 
a double click without a timer or some delay option), you should be 
able to change the image from a thumbnail to a larger size with a 
double-click. Take a look at this simple code.


http://www.adobe.com/2006/mxml"; 
layout="vertical">



 


 ---
TestPopUp.mxml


http://www.adobe.com/2006/mxml"; width="400" 
height="300">





--- In flexcoders@yahoogroups.com, "Greg" <[EMAIL PROTECTED]> wrote:
>
> Hi All,
> 
>  
> 
> I have a photo gallery on my site (TileList of thumbnails) and I am 
having
> problems with double click events when employing click event.  I 
would like
> to support the events as follows:
> 
>  
> 
> -  ItemClick, open image popup window with image slightly 
larger
> than thumbnail
> 
> -  ItemDoubleClick, open image popup window with large view 
say
> 800x600
> 
>  
> 
> The ItemClick event happens before the double click and it displays 
a popup
> over the selected item. It seems impossible to catch the double 
click the
> way I am trying to implement it using both (itemClick and 
itemDoubleClick
> events). It feels like I need to catch a generic 'change' event, 
inspect how
> many mouse clicks occurred and proceed accordingly. 
> 
>  
> 
> Is this possible? 
> 
>  
> 
> Thanks,
> 
> 
> Greg
>




[flexcoders] How do I navigate to an mxml file from a login file?

2008-02-20 Thread sirickhoop
I've created a login that will send users in 1 of 3 direction (i.e. 
administrator, teacher, or student). I want each type of user to link 
to a separate mxml file because, if I use States, my file will become 
quite large and I don't want to have to navigate through long files 
when I'm coding. 

My question: How do I link to an another mxml file from the main.mxml 
file?

Thanks!



RE: [flexcoders] How do I navigate to an mxml file from a login file?

2008-02-20 Thread Tracy Spratt
I advise using SWFLoader in a main mxml file.  Or, use modules, with
which I am not yet familiar, but which are intended for this purpose.
One reason to use a main app is to maintain the login/credential
information for use with any data service calls the app may need to
make.

 

If you are intent on hitching a Maserati to a horse, use navigateToUrl()
to navigate to the individual applications.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of sirickhoop
Sent: Wednesday, February 20, 2008 3:08 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How do I navigate to an mxml file from a login
file?

 

I've created a login that will send users in 1 of 3 direction (i.e. 
administrator, teacher, or student). I want each type of user to link 
to a separate mxml file because, if I use States, my file will become 
quite large and I don't want to have to navigate through long files 
when I'm coding. 

My question: How do I link to an another mxml file from the main.mxml 
file?

Thanks!

 



[flexcoders] How to print ViewStack children as multipage document?

2008-02-20 Thread Sergey Kovalyov
Hi All!

Imagine, I have multipage document represented as ViewStack in application.
Each child is document page. Since default creationPolicy is AUTO, ViewStack
grandchildren (page elements) are created only when the page is selected.
Another problem that it seems FlexPrintJob class can print only view that is
on screen now. Probably I do something wrong, because I have never used Flex
printing features before. So any help and ideas are welcome.

Thank you in advance!

Sergey.


[flexcoders] measure(), measuredMinWidth and unscaledWidth

2008-02-20 Thread Giles Roadnight
Hi All

I have a renderer that is showing an image and a textInput in a tileList.
The measure function adds the height of the textField to the height of the
image and the margin to get a value of around 200 pixels. The
minMeasuredHeight and measuredHeight are both set to 200.

When the updateDisplayList function is called the unscaledHeight is less
than this - about 170 so the text field drops off the bottom of the
renderer.

This is when I am adding the first item to the tileList and
variableRowHeight is set to true anyway.

I can't understand why Flex is trying to squach these renderers. Any ideas?

Thanks

-- 
Giles Roadnight
http://giles.roadnight.name


RE: [flexcoders] Drawing in Panel Insanity

2008-02-20 Thread Merrill, Jason
Thanks Jim! I'll check it out.
 

Jason Merrill 
Bank of America 
GT&O L&LD Solutions Design & Development 
eTools & Multimedia 

Bank of America Flash Platform Developer Community 


Interested in innovative ideas in Learning?
Check out the GT&O Innovative Learning Blog

and & subscribe
 . 




 




From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Jim Hayes
Sent: Wednesday, February 20, 2008 12:00 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Drawing in Panel Insanity





I was using comboBox at the time, can't tell you if panel is the
same I'm afraid, but at a guess it probably might be :-)

My source here : http://ifeedme.com/blog/?p=19
  (run the demo and right click),  hope
it helps

Recent Activity

*   
 104
New Members
 

Visit Your Group
 
Yahoo! Finance

It's Now Personal
 

Guides, news,

advice & more.

New business?

Get new customers.
 

List your web site

in Yahoo! Search.

Yahoo! Groups

How-To Zone
 

Do-It-Yourselfers

Connect & share.

.

 
 



RE: [flexcoders] How do I navigate to an mxml file from a login file?

2008-02-20 Thread Alger Werft
You should look into Custom MXML Components (see the LiveDocs).

Create a component for each outcome.

Then, you can put these three components in a ViewStack.

Depending on the outcome of the login process you can then set the
selectedIndex of the viewstack.

 

This results in your main.mxml file, and three more mxml files for each
component.

 

Cheers,

Alger 

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of sirickhoop
Sent: Mittwoch, 20. Februar 2008 21:08
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How do I navigate to an mxml file from a login
file?

 

I've created a login that will send users in 1 of 3 direction (i.e. 
administrator, teacher, or student). I want each type of user to link 
to a separate mxml file because, if I use States, my file will become 
quite large and I don't want to have to navigate through long files 
when I'm coding. 

My question: How do I link to an another mxml file from the main.mxml 
file?

Thanks!

 



RE: [flexcoders] Accessing Multi Dimensional Array Collection Data in a DataGrid

2008-02-20 Thread Tracy Spratt
dataField will only accept strings, not expressions like "practice.name"
These count as strings: "@attrName", "*".

 

labelFunction is the correct solution.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tim Stewart
Sent: Sunday, February 17, 2008 4:41 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Accessing Multi Dimensional Array Collection
Data in a DataGrid

 

Hi, I too was frustratetd by this. I think it ought to work in the way
you've coded it. You can get it to work with labelFunction as follows,
but its more long-winded.

 



 

private function labelFunction (case : Object, column : DataGridColumn)
: String {

return case.practice.name;

}

 

Cheers, Tim



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of michaelisraelcaplan
Sent: Monday, 18 February 2008 6:06 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Accessing Multi Dimensional Array Collection Data
in a DataGrid

Hi there,

Probably a rather straightforward solution that I am just overlooking.
I have an array collection that is acting as the data provider for a
datagrid. I have mapped out all the columns between the array
collection and the data grid with the DataGridColumn element. 
However, my array collection is multi dimensional, and I can't figure
out how to map "deeper" content to the data field. The each
collection row contains a nested array called "practice" that has
values.

How do I map my datagrid column to the "name" property of the nested
array "practice"?
















Thanks,

Mike

 



RE: [flexcoders] dynamic function Names

2008-02-20 Thread Tracy Spratt
As long a "this" is a dynamic object.  In 1.x, mx:Application was
dynamic, in 2+ it is not.

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of joshua gatcke
Sent: Monday, February 18, 2008 4:51 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] dynamic function Names

 

Hi all, after much toil, I have learned that I can have dynamic 
function names doing something like this:

var myFunctionName:String = 'foo';
this[myFunctionName]();

This is awesome! Just thought I would share, but you guys probably 
already knew how to do that ;)

- joshua

 



Re: [flexcoders]Flex Charting - Export to PDF and Images

2008-02-20 Thread Eduardo Dias
We're using java

On Feb 20, 2008 5:41 PM, Derrick Anderson <[EMAIL PROTECTED]>
wrote:

>   what do you have available server side?  i use CF and what i would do is
> setup a CF scheduled task to query the data, generate the reports in
> coldfusion and mail them as attachments.
>
> i wouldn't even involve flex in this matter...
>
>
> On Wed, Feb 20, 2008 at 3:27 PM, Eduardo Dias <[EMAIL PROTECTED]>
> wrote:
>
> >   Ok, We know that we can generate a PDF with alivePDF in the client and
> > also send the data to the server to be process. However we also will need
> > schedule a job that will generate an email with a pdf from charts. In this
> > case we'll also need to create the services to receive and proccess the data
> > and generate the email. We would avoid a lot of work using some kind of
> > client-server solution and also have an integrated solution. Does someone
> > knows something like this?
> >
> >
> > On Feb 17, 2008 11:58 PM, Andrew D. Goodfellow <[EMAIL PROTECTED]>
> > wrote:
> >
> > >   No, I don't think so. Use the AS3 Core Libraries for that.
> > > http://code.google.com/p/as3corelib/
> > >
> > >
> > > On Feb 17, 2008 7:01 AM, Eduardo Dias <[EMAIL PROTECTED]> wrote:
> > >
> > > >   Ok, and what about converting a Flex chart into a JPG or other
> > > > image? Does ALDS do that too? Or, some other Adobe tool?
> > > >
> > > >
> > > > On Feb 17, 2008 3:03 AM, Andrew D. Goodfellow <[EMAIL PROTECTED]>
> > > > wrote:
> > > >
> > > > >   We used the AlivePDF library on one of our client projects to
> > > > > generate PDF reports. I was very happy with the results.
> > > > >
> > > > > http://www.alivepdf.org/
> > > > > http://code.google.com/p/alivepdf/
> > > > >
> > > > > -Andy
> > > > >
> > > > >
> > > > > On Feb 16, 2008 9:40 PM, Eduardo Dias <[EMAIL PROTECTED]>
> > > > > wrote:
> > > > >
> > > > > >   Is there any way with Flex Charting (or some 3rd party tool
> > > > > > integrated with Flex) to output a FlexChart as a PDF or an image for
> > > > > > inclusion in a report?
> > > > > >
> > > > >
> > > > >
> > > >
> > >
> >
>  
>


RE: [flexcoders] Re: Transparent=true on BitmapData not working

2008-02-20 Thread Alex Harui
Only in bitmapdata

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Josh McDonald
Sent: Wednesday, February 20, 2008 11:46 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Transparent=true on BitmapData not working

 

So the colour value is a 32 bi argb instead of just 24 bit rgb then?
Well that makes sense :) Where else in flex is a colour value 32 bit
instead of 24 bit? Is it all over the place and I've just never noticed?
What about in styles?

-J

On Thu, Feb 21, 2008 at 3:39 AM, Troy Gilbert <[EMAIL PROTECTED]
 > wrote:

> Just plain old 0 worked fine. I just went back and checked the docs,
they do
> actually tell you to do that, but I doubt I ever would have seen it.
Doesn't
> really make sense, but you get that :)

Actually, it makes perfect sense. The default value for the fill color
is 100% white with 100% alpha (fully opaque), which is 0x in
ARGB format. You want it to be blank/transparent, so you need to
provide a default fill color that has 0% alpha, so anything of the
form 0x00??. Using black with zero-alpha is good habit because
it's equivalent to pre-multiplying your colors with black, which is
what works best (or at least most intuitively) with standard computer
blending equations.

The true/false flag just controls whether or not your BitmapData *has*
an alpha channel, not what the contents of that alpha channel are (the
docs should probably be clearer about this and the argument should
probably be named "hasAlphaChannel" as opposed to "transparency", just
to be more explicit). Basically, this flag controls whether your data
is ARGB or RGB (though I wouldn't be surprised if they were both
stored as 32-bits-per-pixel as that normally speeds up blitting since
the pixels are word-aligned).

Troy.




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

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

 



RE: [flexcoders] What could make a deleted modal popup redraw the whole screen?

2008-02-20 Thread Alex Harui
Modality is emulated by putting a semi-transparent "shield" over the
entire screen below the popup.  When it goes away, everything is
re-rendered, but your drawing code won't get called unless something
resized so it shouldn't be slow.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of cmalartre
Sent: Wednesday, February 20, 2008 11:22 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] What could make a deleted modal popup redraw the
whole screen?

 

Dear good fellow coders,

Simple problem with modal popups:

1) Right-click Show redraw region
2) Only part of the app are bordered red
3) Create popup with modal=true
4) Delete popup with PopupManager.removePopup(this)
5) Right-click Show redraw region
6) Whole app is always redrawn. The stage's borders are red. Must be
slow!

We do a Show Redraw region and the whole app is always redrawn. Bring
me to tears!

No bugs when the PopUp is not modal. When I create a new project, I'm
unable to reproduce the bug.

What could I test? How can I find what is making the whole stage redraw?

Thanks
Carl

 



Re: [flexcoders]Flex Charting - Export to PDF and Images

2008-02-20 Thread Derrick Anderson
what do you have available server side?  i use CF and what i would do is
setup a CF scheduled task to query the data, generate the reports in
coldfusion and mail them as attachments.

i wouldn't even involve flex in this matter...

On Wed, Feb 20, 2008 at 3:27 PM, Eduardo Dias <[EMAIL PROTECTED]> wrote:

>   Ok, We know that we can generate a PDF with alivePDF in the client and
> also send the data to the server to be process. However we also will need
> schedule a job that will generate an email with a pdf from charts. In this
> case we'll also need to create the services to receive and proccess the data
> and generate the email. We would avoid a lot of work using some kind of
> client-server solution and also have an integrated solution. Does someone
> knows something like this?
>
>
> On Feb 17, 2008 11:58 PM, Andrew D. Goodfellow <[EMAIL PROTECTED]>
> wrote:
>
> >   No, I don't think so. Use the AS3 Core Libraries for that.
> > http://code.google.com/p/as3corelib/
> >
> >
> > On Feb 17, 2008 7:01 AM, Eduardo Dias <[EMAIL PROTECTED]> wrote:
> >
> > >   Ok, and what about converting a Flex chart into a JPG or other
> > > image? Does ALDS do that too? Or, some other Adobe tool?
> > >
> > >
> > > On Feb 17, 2008 3:03 AM, Andrew D. Goodfellow <[EMAIL PROTECTED]>
> > > wrote:
> > >
> > > >   We used the AlivePDF library on one of our client projects to
> > > > generate PDF reports. I was very happy with the results.
> > > >
> > > > http://www.alivepdf.org/
> > > > http://code.google.com/p/alivepdf/
> > > >
> > > > -Andy
> > > >
> > > >
> > > > On Feb 16, 2008 9:40 PM, Eduardo Dias <[EMAIL PROTECTED]> wrote:
> > > >
> > > > >   Is there any way with Flex Charting (or some 3rd party tool
> > > > > integrated with Flex) to output a FlexChart as a PDF or an image for
> > > > > inclusion in a report?
> > > > >
> > > >
> > > >
> > >
> >
>  
>


RE: [flexcoders] measure(), measuredMinWidth and unscaledWidth

2008-02-20 Thread Alex Harui
Can you post a mini-example?  Are you sure the measure() sets
measuredHeight to 200 every time?  Sometimes on the first call, the
image or TextField can have the wrong height.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Giles Roadnight
Sent: Wednesday, February 20, 2008 12:23 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] measure(), measuredMinWidth and unscaledWidth

 

Hi All

I have a renderer that is showing an image and a textInput in a
tileList. The measure function adds the height of the textField to the
height of the image and the margin to get a value of around 200 pixels.
The minMeasuredHeight and measuredHeight are both set to 200.

When the updateDisplayList function is called the unscaledHeight is less
than this - about 170 so the text field drops off the bottom of the
renderer.

This is when I am adding the first item to the tileList and
variableRowHeight is set to true anyway.

I can't understand why Flex is trying to squach these renderers. Any
ideas?

Thanks

-- 
Giles Roadnight
http://giles.roadnight.name   

 



[flexcoders]FlexCharting - Schedule PDF

2008-02-20 Thread Eduardo Dias
Hi,

Ok, We know that we can generate a PDF with alivePDF in the client and also
send the data to the server to be process. However we also will need
schedule a job that will generate an email with a pdf from charts. In this
case we'll also need to create the services to receive and proccess the data
and generate the email. We would avoid a lot of work using some kind of
client-server solution and also have an integrated solution. Does someone
knows something like this?


RE: [flexcoders] how does mx:DataGrid state work?

2008-02-20 Thread Alex Harui
If you refresh, are you resetting the set of columns?

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of coder3
Sent: Wednesday, February 20, 2008 11:26 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] how does mx:DataGrid state work?

 


Hi All,

I am trying to use "state" to change to column fields of mx:DataGrid.

for example, if it's state1, i show column1, column3 only. if it's
state2, i
show column2, column3 only.

so i made it this way:

 






 

it works fine right after i change the state. but if i refresh the
table,
even it's still in the same state, all the columns will show. 

did i do it wrong? what's the right approach?

thanks!!

c.
-- 
View this message in context:
http://www.nabble.com/how-does-mx%3ADataGrid-state-work--tp15596181p1559
6181.html
 
Sent from the FlexCoders mailing list archive at Nabble.com.

 



Re: [flexcoders]Flex Charting - Export to PDF and Images

2008-02-20 Thread Eduardo Dias
Ok, We know that we can generate a PDF with alivePDF in the client and also
send the data to the server to be process. However we also will need
schedule a job that will generate an email with a pdf from charts. In this
case we'll also need to create the services to receive and proccess the data
and generate the email. We would avoid a lot of work using some kind of
client-server solution and also have an integrated solution. Does someone
knows something like this?

On Feb 17, 2008 11:58 PM, Andrew D. Goodfellow <[EMAIL PROTECTED]>
wrote:

>   No, I don't think so. Use the AS3 Core Libraries for that.
> http://code.google.com/p/as3corelib/
>
>
> On Feb 17, 2008 7:01 AM, Eduardo Dias <[EMAIL PROTECTED]> wrote:
>
> >   Ok, and what about converting a Flex chart into a JPG or other image?
> > Does ALDS do that too? Or, some other Adobe tool?
> >
> >
> > On Feb 17, 2008 3:03 AM, Andrew D. Goodfellow <[EMAIL PROTECTED]>
> > wrote:
> >
> > >   We used the AlivePDF library on one of our client projects to
> > > generate PDF reports. I was very happy with the results.
> > >
> > > http://www.alivepdf.org/
> > > http://code.google.com/p/alivepdf/
> > >
> > > -Andy
> > >
> > >
> > > On Feb 16, 2008 9:40 PM, Eduardo Dias <[EMAIL PROTECTED]> wrote:
> > >
> > > >   Is there any way with Flex Charting (or some 3rd party tool
> > > > integrated with Flex) to output a FlexChart as a PDF or an image for
> > > > inclusion in a report?
> > > >
> > >
> > >
> >
>  
>


RE: [flexcoders] Re: getCharBounds not working on AIR?

2008-02-20 Thread Gordon Smith
1. If the same code produces different character bounds in AIR than in
the Flash Player, that's a bug and you should file it.
 
2. A constructor should not call createChildren(). The framework
automatically calls createChildren() at the appropriate time, which is
when the component is added to the display list.
 
3. If you find yourself having to use callLater(), you're probably doing
something the wrong way. In general, you should use events rather than
just waiting awhile. If the framework doesn't provide the event you
need, please file an enhancement request.
 
Gordon Smith
Adobe Flex SDK Team



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of b_alen
Sent: Wednesday, February 20, 2008 8:48 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: getCharBounds not working on AIR?



Great, it seems like callLater saved my butt. Luckily i also found the
blog which explains in short the WHY's and HOW's of the callLater.
Title of the blog is callLater() - The Function That Saved My Butt.
It's here:

http://www.kylehayes.info/blog/index.cfm/2007/5/31/callLater--The-Functi
on-That-Saved-My-Butt
 

The function actually broke because I had to use it within the for
loop. The solution was to to get rid of the for loop and instead split
the iteration into several functions that were calling each other upon
completion.

--- In flexcoders@yahoogroups.com 
, "Daniel Freiman" <[EMAIL PROTECTED]> wrote:
>
> If you want a simple wait, you can use uicomponent.callLater(). 
(See the
> docs). The other alternative is to listen for an event but which
even to
> listen for depends on your use case. (for example if this is
happening when
> the application is loaded applicationComplete would probably be the
correct
> event.) Check out the events thrown by the components involved to
see if one
> jumps out at you.
> 
> - Dan Freiman
> 
> On Wed, Feb 20, 2008 at 10:53 AM, b_alen <[EMAIL PROTECTED]> wrote:
> 
> > Wow, that was fast, I didn't even manage to finish the cigarette :)
> >
> > And it works. Now, should I use the interval or is there a more
> > elegant way to know that the component is ready? You were mentioning
> > "refresh".
> >
> > Thanks a ton buddy
> >
> >
> > --- In flexcoders@yahoogroups.com
  ,
"Daniel
> > Freiman"  wrote:
> > >
> > > Try getting the rect later (Put a button somewhere and click it
after
> > > everything is finished loading) to make sure the UITextField
doesn't
> > just
> > > need to be refreshed first. If that doesn't work, I'd file a bug
if
> > I were
> > > you.
> > >
> > > - Dan Freiman
> > >
> > > On Wed, Feb 20, 2008 at 10:20 AM, b_alen  wrote:
> > >
> > > > It seems a bit ridiculous but it's true. Not just that you have
> > to use
> > > > all sorts of hacks to get access to good old TextField
(IUITextField)
> > > > in Flex in order to even think of accessing characters'
Rectangles.
> > > > Once you do manage to cut your way through, you get a very nasty
> > > > disappointment that IUITextField.getCharBounds() works
perfectly in
> > > > Flex Web apps, but returns some bizarre incorrect values when
running
> > > > on AIR.
> > > >
> > > > If anyone has any suggestion, I'd really appreciate it very
much.
> > > > We're in terrible deadline and this is one of the crucial
> > functionalities.
> > > >
> > > > var tf:TextAreaExtended = new TextAreaExtended();
> > > > tf._textField.text = "dsfsdf sfd sf dsf sfdsd fdsfdsfdsfdsfdsf
fds";
> > > > addChild(tf);
> > > > var rect:Rectangle = tf._textField.getCharBoundaries(20);
> > > >
> > > > // I get values for rect.left something like 0.5
> > > > // same goes for other rect properties, very weird.
> > > >
> > > > // extended TextArea which gives access to TextField
> > > > package
> > > > {
> > > > import mx.controls.TextArea;
> > > > import mx.core.IUITextField;
> > > >
> > > > public class TextAreaExtended extends TextArea
> > > > {
> > > > public function TextAreaExtended()
> > > > {
> > > > createChildren();
> > > >
> > > > }
> > > >
> > > > public function get _textField():IUITextField{
> > > > return textField;
> > > > }
> > > > }
> > > > }
> > > >
> > > >
> > > >
> > >
> >
> > 
> >
>



 


[flexcoders] Reset State in Flex

2008-02-20 Thread ghus32
Is there a way to reset a state in Flex?

Thanks 

steve



RE: [flexcoders] Datagrid item on rollOver

2008-02-20 Thread Alex Harui
What did you try?  itemRollOver="myCode()" should work.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of linko27
Sent: Wednesday, February 20, 2008 2:28 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Datagrid item on rollOver

 

Hello!

Can someone please help me! I need to change a propperty of an item in
my datagrid on the rollOver event, but i just don't know how to get it.

 



Re: [flexcoders] Reset State in Flex

2008-02-20 Thread Mark Lapasa
set currentState to null. -mL

ghus32 wrote:
>
> Is there a way to reset a state in Flex?
>
> Thanks
>
> steve
>
>  



Notice of confidentiality:
The information contained in this e-mail is intended only for the use of the 
individual or entity named above and may be confidential. Should the reader of 
this message not be the intended recipient, you are hereby notified that any 
unauthorized dissemination, distribution or reproduction of this message is 
strictly prohibited. If you have received this message in error, please advise 
the sender immediately and destroy the e-mail.



RE: [flexcoders] Drag and Drop issues

2008-02-20 Thread Alex Harui
Maybe you shouldn't register the canvas.  Put another child in the
canvas with alpha=0 that goes behind all the other children and register
that.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Nick Collins
Sent: Wednesday, February 20, 2008 11:14 AM
To: flexcoders
Subject: [flexcoders] Drag and Drop issues

 

I've got an application I'm working on where I need to be able to drag
things onto a Canvas, and sometimes into containers that are children of
the canvas.

The problem I'm having is that when I have another container inside the
canvas, it doesn't register the dragEnter event, even though I have
added an event listener for that event to the component. Instead, only
it's parent dispatches the dragEnter event.

How can I get the child components to register when the user drags over
them, versus the parent canvas?

 



RE: [flexcoders] embedded swf doe not run

2008-02-20 Thread Alex Harui
You're not embedding it.  You're loading it from an external source.

 

I would add trace output to myflash.swf so you can see how far it got.
If it assumes it can use layers or get to the stage, it may not run
properly.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of elr
Sent: Tuesday, February 19, 2008 11:42 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] embedded swf doe not run

 

Hi all,

First, I have a small Flash 8 swf that loads and parses an xml file.
Paths are ok and it runs perfectly in standalone mode.

Then, I want to embed it into a Flex app. As I don't need any control 
on it, I just used Image tag this way:



Running my Flex app, I can see that swf runs and preload xml file but 
suddenly stalls when the preload bar hit 100%.

Is it a security restriction, a version compatiblity problem ? Can 
somebody help me determine what should I check?

Thx for your help.

Eric

 



RE: [flexcoders] Reset State in Flex

2008-02-20 Thread steven pollard

that brings me back to the original state. I need to reset the current state I 
am in.
 
Thanks
 
Steve


To: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Wed, 20 Feb 2008 16:21:20 
-0500Subject: Re: [flexcoders] Reset State in Flex




set currentState to null. -mLghus32 wrote:>> Is there a way to reset a state in 
Flex?>> Thanks>> steve>> Notice of confidentiality:The information contained in 
this e-mail is intended only for the use of the individual or entity named 
above and may be confidential. Should the reader of this message not be the 
intended recipient, you are hereby notified that any unauthorized 
dissemination, distribution or reproduction of this message is strictly 
prohibited. If you have received this message in error, please advise the 
sender immediately and destroy the e-mail. 






_



RE: [flexcoders] Re: Reset State in Flex

2008-02-20 Thread steven pollard

Thaks for your answers.
 
how would you force a page refresh?
 
Thanks
 
Steve


To: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Wed, 20 Feb 2008 21:32:40 
+Subject: [flexcoders] Re: Reset State in Flex




I am not aware of any quick way to clear all the text inputs and reset the 
application to how it was when it first loaded. The only way I know to do this 
is to programatically set everything back to how you want 
them.myTextArea.text="";myPanel.visible=false;myArray.source = ["One", "Two", 
"Three"];etc.In other words, set each component and each piece of your 
application back to the way it is when your application initially runs. You 
could also force a page refresh, but it will almost always be faster, from the 
users perspective, to create a function to reset everything.JF--- In 
flexcoders@yahoogroups.com, Mark Lapasa <[EMAIL PROTECTED]> wrote:>> set 
currentState to null. -mL> > ghus32 wrote:> >> > Is there a way to reset a 
state in Flex?> >> > Thanks> >> > steve> >> > > > > > Notice of 
confidentiality:> The information contained in this e-mail is intended only for 
the use of the individual or entity named above and may be confidential. Should 
the reader of this message not be the intended recipient, you are hereby 
notified that any unauthorized dissemination, distribution or reproduction of 
this message is strictly prohibited. If you have received this message in 
error, please advise the sender immediately and destroy the e-mail.> 






_



[flexcoders] Question reg. flex + webservices

2008-02-20 Thread cool buddy

HI All,

For webservices to work with flex..do we need to an event listener.
Because i am writing an action script where i am calling the webservice method 
it does n't work..so wondering whether we need to write the event listener.

If any knows please post it.

Thanks,




  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

Re: [flexcoders] do you need CS Degree to get a job?

2008-02-20 Thread Sherif Abdou
wow lots of opinions in here. Thanks it gives me a better idea. 


- Original Message 
From: Daniel Freiman <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Wednesday, February 20, 2008 10:53:06 AM
Subject: Re: [flexcoders] do you need CS Degree to get a job?

Well I said it, so I don't think you have to apologize to Matt if I have his 
job description wrong.

- Dan


On Wed, Feb 20, 2008 at 11:47 AM, Jeffry Houser <[EMAIL PROTECTED] com> wrote:


With all due respects to Matt and Dan...
I have no idea how to judge Matt as an authoritative sort on the 
process of getting a job or hiring people. Does a project manager's 
responsibility at Adobe involve hiring people?

I would have guessed that Adobe was so big, product managers would 
only deal with "programming managers" on high level issues, not the 
actual programmers.

I could be wrong.


Daniel Freiman wrote:
> 
> 3. Matt Chotin is a project manager at Adobe and he posted his response 
> very quickly. There's no more authoritative source (although there are 
> some equally as authoritative sources) to answer the question as it was 
> originally posed.
> 
> - Dan Freiman


-- 
Jeffry Houser
Flex, ColdFusion, AIR
AIM: Reboog711 | Phone: 1-203-379-0773
--
Adobe Community Expert 

My Company: 
My Podcast: 
My Blog: 







  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

[flexcoders] Error in StyleManager

2008-02-20 Thread Christoph Atteneder
Hi,

Just for the case someone else runs into this error:

During the usage of the StyleManager I´ve found a bug which I can  
reproduce all the time.

It throws an Error, if it is not able to load a runtime-style.swf even  
if you implement the StyleEvent.ERROR handler.

Steps to reproduce:
1. Load runtime stylesheet which doesn´t exists. _styleEventDispatcher  
= StyleManager.loadStyleDeclarations("notexisting.swf");
2. Add error eventlistener. e.g.  
_styleEventDispatcher .addEventListener(StyleEvent.ERROR, onLoadFailed);
3. In onLoadFailed method remove event listener:  
_styleEventDispatcher .removeEventListener(StyleEvent.ERROR,  
onLoadFailed);

Does anyone else got this error?

I just checked the source code and I think I´ve found the bug.

Because of the order of the added Module.Error event listener in  
StyleManager and StyleEventDispatcher the check for error handler isn 
´t working.

The StyleEvent.Error event is fired two times. One time from  
StyleEventDispatcher in method  
moduleInfo_errorHandler(event:ModuleEvent):void and the other time in  
StyleManager in the anonymous function errorHandler in line 842.

Looks like two different guys were developing this classes -  
communication is everything ;-)

I´ve added it to the bug base https://bugs.adobe.com/jira/browse/SDK-14699

cheers,

Christoph

[flexcoders] Re: Reset State in Flex

2008-02-20 Thread Anthony DeBonis
This will do it

navigateToURL(new URLRequest("http://.";, "_self");



[flexcoders] Re: Reset State in Flex

2008-02-20 Thread jmfillman
I was afraid you'd ask that :-) It's been years since I really dealt 
with HTML, but something like this should work:

private function reloadPage():void{
 var url:URLRequest = new URLRequest("http://www.mysite.com";);
 navigateToURL(url, "_parent");
}

You are just pointing the browser back to your site so it will load 
the application again.

--- In flexcoders@yahoogroups.com, steven pollard <[EMAIL PROTECTED]> 
wrote:
>
> 
> Thaks for your answers.
>  
> how would you force a page refresh?
>  
> Thanks
>  
> Steve
> 
> 
> To: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Wed, 20 Feb 2008 21:32:40 
+Subject: [flexcoders] Re: Reset State in Flex
> 
> 
> 
> 
> I am not aware of any quick way to clear all the text inputs and 
reset the application to how it was when it first loaded. The only 
way I know to do this is to programatically set everything back to 
how you want 
them.myTextArea.text="";myPanel.visible=false;myArray.source = 
["One", "Two", "Three"];etc.In other words, set each component and 
each piece of your application back to the way it is when your 
application initially runs. You could also force a page refresh, but 
it will almost always be faster, from the users perspective, to 
create a function to reset everything.JF--- In 
flexcoders@yahoogroups.com, Mark Lapasa  wrote:>> set 
currentState to null. -mL> > ghus32 wrote:> >> > Is there a way to 
reset a state in Flex?> >> > Thanks> >> > steve> >> > > > > > Notice 
of confidentiality:> The information contained in this e-mail is 
intended only for the use of the individual or entity named above and 
may be confidential. Should the reader of this message not be the 
intended recipient, you are hereby notified that any unauthorized 
dissemination, distribution or reproduction of this message is 
strictly prohibited. If you have received this message in error, 
please advise the sender immediately and destroy the e-mail.> 
> 
> 
> 
> 
> 
> 
> _
>




Re: [flexcoders] do you need CS Degree to get a job?

2008-02-20 Thread Nick Collins
I'm going to throw my 2p in, for what it's worth. In my experience, it
depends largely on the type of employer you're applying to. If you're trying
to get into a smaller boutique shop (think Universal Mind, Cynergy,
EffectiveUI, etc.) which in my opinion are some of the coolest places to
work, a degree matters less if you got the skills, and can demonstrate them.
If you're trying to get into a corporation, the degree becomes nearly
imperative, unless you know somebody inside that can get you in front of the
hiring manager directly. Basically, it comes down to whether or not you have
to go through an HR department that really doesn't know or care what it is
you do, or what your capabilities are, so long as you look good on paper.
Some companies have it as corporate policy. I know I've been bitten before
where the hiring manager actually wanted to hire me, but HR wouldn't let him
because company policy dictated that anyone in that kind of position have at
least a bachelors degree. Just something to be aware of.

On Feb 20, 2008 3:38 PM, Sherif Abdou <[EMAIL PROTECTED]> wrote:

>   wow lots of opinions in here. Thanks it gives me a better idea.
>
> - Original Message 
> From: Daniel Freiman <[EMAIL PROTECTED]>
> To: flexcoders@yahoogroups.com
> Sent: Wednesday, February 20, 2008 10:53:06 AM
> Subject: Re: [flexcoders] do you need CS Degree to get a job?
>
>  Well I said it, so I don't think you have to apologize to Matt if I have
> his job description wrong.
>
> - Dan
>
> On Wed, Feb 20, 2008 at 11:47 AM, Jeffry Houser <[EMAIL PROTECTED] com<[EMAIL 
> PROTECTED]>>
> wrote:
>
> >
> > With all due respects to Matt and Dan...
> > I have no idea how to judge Matt as an authoritative sort on the
> > process of getting a job or hiring people. Does a project manager's
> > responsibility at Adobe involve hiring people?
> >
> > I would have guessed that Adobe was so big, product managers would
> > only deal with "programming managers" on high level issues, not the
> > actual programmers.
> >
> > I could be wrong.
> >
> >
> > Daniel Freiman wrote:
> > >
> > > 3. Matt Chotin is a project manager at Adobe and he posted his
> > response
> > > very quickly. There's no more authoritative source (although there are
> >
> > > some equally as authoritative sources) to answer the question as it
> > was
> > > originally posed.
> > >
> > > - Dan Freiman
> >
> > --
> > Jeffry Houser
> > Flex, ColdFusion, AIR
> > AIM: Reboog711 | Phone: 1-203-379-0773
> > --
> > Adobe Community Expert
> >  > html
> > >
> > My Company: >
> > My Podcast: >
> > My Blog: >
> >
> >
>
>
> --
> Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it
> now.
>  
>


Re: [flexcoders] Re: Reset State in Flex

2008-02-20 Thread Derrick Anderson
could you not just have an empty state with no instructions, switch to that
state and back to reset the original one?

never tried it, just seemed easier than resetting the entire app

d.

On Wed, Feb 20, 2008 at 4:47 PM, jmfillman <[EMAIL PROTECTED]> wrote:

>   I was afraid you'd ask that :-) It's been years since I really dealt
> with HTML, but something like this should work:
>
> private function reloadPage():void{
> var url:URLRequest = new URLRequest("http://www.mysite.com";);
> navigateToURL(url, "_parent");
> }
>
> You are just pointing the browser back to your site so it will load
> the application again.
>
> --- In flexcoders@yahoogroups.com , steven
> pollard <[EMAIL PROTECTED]>
> wrote:
>
> >
> >
> > Thaks for your answers.
> >
> > how would you force a page refresh?
> >
> > Thanks
> >
> > Steve
> >
> >
> > To: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Wed, 20 Feb 2008 21:32:40
> +Subject: [flexcoders] Re: Reset State in Flex
> >
> >
> >
> >
> > I am not aware of any quick way to clear all the text inputs and
> reset the application to how it was when it first loaded. The only
> way I know to do this is to programatically set everything back to
> how you want
> them.myTextArea.text="";myPanel.visible=false;myArray.source =
> ["One", "Two", "Three"];etc.In other words, set each component and
> each piece of your application back to the way it is when your
> application initially runs. You could also force a page refresh, but
> it will almost always be faster, from the users perspective, to
> create a function to reset everything.JF--- In
> flexcoders@yahoogroups.com , Mark Lapasa
>  wrote:>> set
> currentState to null. -mL> > ghus32 wrote:> >> > Is there a way to
> reset a state in Flex?> >> > Thanks> >> > steve> >> > > > > > Notice
> of confidentiality:> The information contained in this e-mail is
> intended only for the use of the individual or entity named above and
> may be confidential. Should the reader of this message not be the
> intended recipient, you are hereby notified that any unauthorized
> dissemination, distribution or reproduction of this message is
> strictly prohibited. If you have received this message in error,
> please advise the sender immediately and destroy the e-mail.>
> >
> >
> >
> >
> >
> >
> > __
> >
>
>  
>


RE: [flexcoders] dynamic function Names

2008-02-20 Thread Gordon Smith
You can look up properties and methods by name with o[p] syntax even if
o isn't an instance of a dynamic class.
 
And I'm pretty sure that  wasn't a dynamic class in 1.x.
 
Gordon Smith
Adobe Flex SDK Team



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tracy Spratt
Sent: Wednesday, February 20, 2008 12:49 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] dynamic function Names



As long a "this" is a dynamic object.  In 1.x, mx:Application was
dynamic, in 2+ it is not.

Tracy



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of joshua gatcke
Sent: Monday, February 18, 2008 4:51 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] dynamic function Names

Hi all, after much toil, I have learned that I can have dynamic 
function names doing something like this:

var myFunctionName:String = 'foo';
this[myFunctionName]();

This is awesome! Just thought I would share, but you guys probably 
already knew how to do that ;)

- joshua

 


[flexcoders] Re: Reset State in Flex

2008-02-20 Thread jmfillman
I am not aware of any quick way to clear all the text inputs and 
reset the application to how it was when it first loaded. The only 
way I know to do this is to programatically set everything back to 
how you want them.

myTextArea.text="";
myPanel.visible=false;
myArray.source = ["One", "Two", "Three"];
etc.

In other words, set each component and each piece of your application 
back to the way it is when your application initially runs. You could 
also force a page refresh, but it will almost always be faster, from 
the users perspective, to create a function to reset everything.

JF
--- In flexcoders@yahoogroups.com, Mark Lapasa <[EMAIL PROTECTED]> wrote:
>
> set currentState to null. -mL
> 
> ghus32 wrote:
> >
> > Is there a way to reset a state in Flex?
> >
> > Thanks
> >
> > steve
> >
> >  
> 
> 
> 
> Notice of confidentiality:
> The information contained in this e-mail is intended only for the 
use of the individual or entity named above and may be confidential. 
Should the reader of this message not be the intended recipient, you 
are hereby notified that any unauthorized dissemination, distribution 
or reproduction of this message is strictly prohibited. If you have 
received this message in error, please advise the sender immediately 
and destroy the e-mail.
>




RE: [flexcoders] finding all textareas

2008-02-20 Thread Gordon Smith
No, you can't. This can only be used for looping over dynamic properties
of dynamic classes. To loop over the children of a
DisplayObjectContainer, you have to do
 
var n:int = numChildren;
for (var i:int = 0; i < n; i++)
{
var child:DisplayObject = getChildAt(i);
   ...
}
 
Gordon Smith
Adobe Flex SDK Team



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of yigit boyar
Sent: Wednesday, February 20, 2008 11:01 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] finding all textareas



you can trace all children with;

var obj:Object;
for each(obj in this){
 if(obj is TextArea){
  //than do sth
 }
}

but i dont know it has anything to do with the currentState or not


On Feb 20, 2008 1:15 PM, Nikolas Hagelstein <[EMAIL PROTECTED]
 > wrote:


Hi there,

is there a way to determine all e.g. textareas within the
current state?

cheers,
Nikolas



 


[flexcoders] Only DragEvent.DRAG_ENTER fires in Custom Component

2008-02-20 Thread Mark Forsberg
I have the following custom component that allows a user to drag an 
item from a datagrid into an image of a trashcan located in the 
titleBar of the panel housing the datagrid for deletion from the 
grid.

The custom component renders fine, but the only DragEvent that is 
captured is the DRAG_ENTER. Do I need to do something different to 
capture the other Drag Events, particularly the DRAG_DROP?
Thanks.


http://www.adobe.com/2006/mxml"; width="612" 
height="306" headerHeight="25">


 
   









[flexcoders] Web conferencing with Flex

2008-02-20 Thread zynahcall
Hi
Any one can help to develop a web conferencing application with Flex 
Support multiusers, sharing board, sharing desktop and also using rtmp
Thank you



RE: [flexcoders] Only DragEvent.DRAG_ENTER fires in Custom Component

2008-02-20 Thread Joan Lafferty
If you do not call DragManager.acceptDragDrop(), the other drag events
like dragDrop won't fire.

 

Joan

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mark Forsberg
Sent: Wednesday, February 20, 2008 1:58 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Only DragEvent.DRAG_ENTER fires in Custom
Component

 

I have the following custom component that allows a user to drag an 
item from a datagrid into an image of a trashcan located in the 
titleBar of the panel housing the datagrid for deletion from the 
grid.

The custom component renders fine, but the only DragEvent that is 
captured is the DRAG_ENTER. Do I need to do something different to 
capture the other Drag Events, particularly the DRAG_DROP?
Thanks.


http://www.adobe.com/2006/mxml
 " width="612" 
height="306" headerHeight="25">








 



Re: [flexcoders] Web conferencing with Flex

2008-02-20 Thread Alan Rother
Can I ask why you want to re-invent the wheel?

Are you not familiar with Adobe Acrobat Connect? It is exactly that
and yes, based on all those technologies you mentioned.

http://www.adobe.com/products/acrobatconnectpro/?ogn=EN_US-gntray_prod_acrobat_connect_pro_home


There is also Brio, which is a free, scaled down version of Connect

http://labs.adobe.com/technologies/brio/

-- 
Alan Rother
Adobe Certified Advanced ColdFusion MX 7 Developer
Manager, Phoenix Cold Fusion User Group, AZCFUG.org


[flexcoders] Re: Tree descendants

2008-02-20 Thread Rafael Faria
Not really. Got an error as well.

someone else can help me out?? 
raf

--- In flexcoders@yahoogroups.com, "Jim Hayes" <[EMAIL PROTECTED]> wrote:
>
> I think it's XML(dataProvider).descendants().(attributes("enabled") ==
> "true") that you want ? Not checked it but I think it's pretty close at
> least.
>  
> -Original Message-
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Rafael Faria
> Sent: 20 February 2008 05:55
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Tree descendants
>  
> I'm trying to get the descendants from my XML which has the attribute
> "enabled = true"
> 
> if i try
> 
> XML(dataProvider).descendants().(@enabled = "true") 
> 
> i get an error " A term is undefined and has no properties."
> 
> which is understandable because not every node has the enabled
> attribute. The question is how to get all that has the "enabled"
> attribute and is set true.
>  
> 
> __
> This communication is from Primal Pictures Ltd., a company
registered in England and Wales with registration No. 02622298 and
registered office: 4th Floor, Tennyson House, 159-165 Great Portland
Street, London, W1W 5PA, UK. VAT registration No. 648874577.
> 
> This e-mail is confidential and may be privileged. It may be read,
copied and used only by the intended recipient. If you have received
it in error, please contact the sender immediately by return e-mail or
by telephoning +44(0)20 7637 1010. Please then delete the e-mail and
do not disclose its contents to any person.
> This email has been scanned for Primal Pictures by the MessageLabs
Email Security System.
> __
>




[flexcoders] No right mouse button functionality? Really?

2008-02-20 Thread Brad Bueche
I've been googling trying to find out how to turn off the player menu
and enable right mouse button clicks.  So far it looks like you cant do
it.  Am I missing something here? 
 
brad


Re: [flexcoders] Download physical file with URLLoader

2008-02-20 Thread Fidel Viegas
Have a look at flash.net.FileReference

that has a download method. That is what you should use to download or
upload files.

Fidel.

On Wed, Feb 20, 2008 at 5:23 PM, Eric Cobb <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
>
> I'm trying to figure out a way to connect to a remote URL, and download
>  a file from that URL. I'm already using URLLoader to connect to the URL
>  and read an XML file, would I use URLLoader for this as well? I want my
>  Flex 3 /AIR app to be able to hit this URL and download a .db file for
>  updates.
>
>  What's the best way to go about this?
>
>  Thanks!
>
>  Eric
>
>  


Re: [flexcoders] Question reg. flex + webservices

2008-02-20 Thread Maciek Sakrejda
Yes, you'll need an event listener to handle the result of the web
service call (unless, of course, the web service call does not return
any data but merely has some effect on the server). If you can post the
code you're having trouble with, perhaps we can help.
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: cool buddy <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Question reg. flex + webservices
Date: Wed, 20 Feb 2008 13:37:49 -0800 (PST)


HI All,

For webservices to work with flex..do we need to an event listener.
Because i am writing an action script where i am calling the webservice
method it does n't work..so wondering whether we need to write the event
listener.

If any knows please post it.

Thanks,




Looking for last minute shopping deals? Find them fast with Yahoo!
Search.


 




[flexcoders] Re: Only DragEvent.DRAG_ENTER fires in Custom Component

2008-02-20 Thread Mark Forsberg
Joan,

You're spot on.
I modified my two DragEvent handlers to the following and it 
works like a charm:

private function dragEnterEvent(event:DragEvent):void{
  var dropTarget:Box = event.currentTarget as Box;
  DragManager.acceptDragDrop(dropTarget);
}

private function myDropEvent(event:DragEvent):void{
  var myData:Array = event.dragSource.dataForFormat("items") 
as Array;
  var myKey:int = myData[0]['doc_key'];
  Alert.show(String(myKey));
}

Much thanks. It's been a long afternoon.

Mark





--- In flexcoders@yahoogroups.com, "Joan Lafferty" <[EMAIL PROTECTED]> wrote:
>
> If you do not call DragManager.acceptDragDrop(), the other drag 
events
> like dragDrop won't fire.
> 
>  
> 
> Joan
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
> Behalf Of Mark Forsberg
> Sent: Wednesday, February 20, 2008 1:58 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Only DragEvent.DRAG_ENTER fires in Custom
> Component
> 
>  
> 
> I have the following custom component that allows a user to drag 
an 
> item from a datagrid into an image of a trashcan located in the 
> titleBar of the panel housing the datagrid for deletion from the 
> grid.
> 
> The custom component renders fine, but the only DragEvent that is 
> captured is the DRAG_ENTER. Do I need to do something different to 
> capture the other Drag Events, particularly the DRAG_DROP?
> Thanks.
> 
> 
> http://www.adobe.com/2006/mxml
>  " width="612" 
> height="306" headerHeight="25">
> 
> 
> 
> 
> 
> 
> 
>




[flexcoders] Help with Skins with different sizes

2008-02-20 Thread Fidel Viegas
Hi everyone,

I have created a button skin for up, down and over. Each one has a
different size. They were all created in Flash. When I import them
over in Flex, they seem to be fixed to one single size. The size of
the button was supposed to increase when the mouse is over the button,
and decrease when the mouse is down.

Is  there a way to handle these three skins with different sizes? Are
the skins meant to be the same size? Can't we do like in Flash, where
we can use different sizes?

How do I do this?

Hope someone is able to help me.

Thanks in advance.

Fidel.


[flexcoders] Re: Problem with focus in secondary popups

2008-02-20 Thread Dmitri Girski
Hi Alex,

I have created a simple test case:

http://mitek.id.au/TestPopUpSimple.html 
Source:
http://mitek.id.au/PopupFocus.zip

http://mitek.id.au/CMyPanel.as  - is the base class for the popup
window - it performs all the focusing stuff.
Actually this class can focusing without any problem BUT only if
popups are created automatically in one go.
As soon as you use button clicks to create popups - TAB focus is stuck
in the first one and it won't be restored ever.
Even if you close all popups and start it over again.

NB updateComplete listener - is not essential in this particular case,
but I need in because I use my own caching popupmanager where popups
are reused and then creationComplete won't be dispatched for them


http://mitek.id.au/SimplePopUp.mxml  - derived from CMyPanel - just
handles 2 buttons - New and Close

http://mitek.id.au/TestPopUpSimple.mxml - main app.


Just run it, then press New and then press TAB - cursor will move in
the first popup, but selection will be in the second popup.
 

Could you please have a look at this problem?
Thanks!

Dmitri.


--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> systemManager.activate
> 




[flexcoders] Re: BlazeDS - Unknown destination error - SOLVED

2008-02-20 Thread Geoffrey
I honestly don't know how I fixed it.  I reinstalled Apache, and the 
Flex 3 Eclipse plugin.  Then ripped out every instance of Flex 2 I 
could find except for the flex-bootstrap-2.0.1.jar file (if I did 
that, nothing worked).

Now I can receive a message published from our J2EE server.

Thanks to Jeff for the help.

Geoff
--- In flexcoders@yahoogroups.com, "Geoffrey" <[EMAIL PROTECTED]> wrote:
>
> I'm less than thrilled with BlazeDS right now.  running their 
canned 
> examples is no problem, but try to integrate it into your app and 
> it's a bitch!  Our environment is Eclipse 3.2.2, Apache Tomcat 
> 5.5.20, Flex Builder 3 Plug-in, Maven 2.0.5, WST 1.something.
> 
> Regarding Point 1 below, I fixed my compiler argument.  For the 
main 
> Flex application, I navigated to the Flex Compiler properties and 
> entered "-services "C:\workspace-blazeDS\flex\src\main\webapp\WEB-
> INF\flex\services-config.xml" -locale en_US" for my Additional 
> Compiler Arguments.  Previously, I had it pointing to a different 
> workspace.
> 
> On that same screen I see a warning: "Project is being compiled 
with 
> Flex 3.0, but server has Flex 2.0.1".  How do I check what version 
> of Flex the server is using?  I've gone through and removed all 
Flex 
> 2.0.1 related jars, but I seem to need the flex-bootstrap-
2.0.1.jar 
> or else I get a bunch of errors upon server startup.  Is this why 
> I'm getting the warning message above?  Is this why I can't seem 
to 
> pass messages with BlazeDS?  Is there a flex-bootstrap-3.0.jar?  
Not 
> in the flex 3 distribution that I have.
> 
> It was real nice of Adobe to clue us into the fact that BlazeDS 
> requires Flex3.  The only reason that I know this is because 
someone 
> else had some problems and Jesse Warden found out from one of the 
> Flex engineers that Flex 2.0.1 does not support BlazeDS.  What 
other 
> requirements are there that we don't know about?
> 
> Sorry if I'm being harsh, but I've been screwing around with this 
> for the last WEEK and can't get it to work.  It shouldn't be this 
> difficult.
> 
> 
> --- In flexcoders@yahoogroups.com, "Jeff Vroom"  wrote:
> >
> > Sorry for the terse description - it's been a little busy here!
> > 
> >  
> > 
> > For Point 1, the stuff you have there looks like the server 
itself 
> is
> > starting up fine.   The issue is that when you compile your SWF, 
> the
> > tool you use to compile your SWF also should refer to the
> > services-config.xml file.  If you are using flex builder, there 
is 
> a
> > setting for that in your project properties.   If you are 
> requesting the
> > MXML file directly from the browser (where the server compiles 
the 
> mxml
> > file to produce the SWF), this is in your flex-config.xml file.  
> If you
> > are compiling using ant or the command line compiler there is a
> > -services option to the compiler.   
> > 
> >  
> > 
> > For Point 2, since you do not set the "channelSet" property on 
your
> > Consumer component, you need to follow the step in point 1.  
There 
> is
> > another option where the client downloads the configuration for 
> your
> > destination from the server when it connects.  But for that to 
> work, you
> > need to specify the URL to the server so it can connect in the 
> first
> > place.  You do that with the channelSet property.  
> > 
> >  
> > 
> > For Point 3, you can see this by adding the MXML tag:
> > 
> >  
> > 
> >  
> > 
> >  
> > 
> > If you are using the debug player, you'll see some diagnostics 
in 
> the
> > flashlog.txt file.  That gets buried in the user's home 
directory 
> on
> > windows under application data/macromedia/flash player/logs.  
Make 
> sure
> > you have the debug player though since the release player 
doesn't 
> output
> > trace information.  You can also get to this property directly in
> > actionscript with:
> > 
> >  
> > 
> >import flex.messaging.config.ServerConfig;
> > 
> >  
> > 
> >  
> > 
> >
> > 
> >  
> > 
> >trace(ServerConfig.xml);
> > 
> >  
> > 
> > Jeff
> > 
> >  
> > 
> > 
> > 
> > From: flexcoders@yahoogroups.com 
> [mailto:[EMAIL PROTECTED] On
> > Behalf Of Geoffrey
> > Sent: Thursday, February 14, 2008 1:37 PM
> > To: flexcoders@yahoogroups.com
> > Subject: [flexcoders] Re: BlazeDS - Unknown destination error
> > 
> >  
> > 
> > I hate to say it, but I don't know how to do any of that.
> > 
> > -- Point 1 --
> > "[point] your compiler at the services-config.xml which defines 
> those
> > destinations"
> > Here are a couple lines of debug output from the console. I 
think 
> I'm
> > pointing to the correct config files.
> > [Flex] [Configuration] BlazeDS - Community Edition: 3.0.0.353
> > [Flex] [Configuration] Endpoint my-streaming-amf created with
> > security: None
> > [Flex] [Startup.Destination] Destination with id 'userTopic' is
> > ready (startup time: '0' ms)
> > [Flex] [Startup.Service] Service with id 'message-service' is 
ready
> > (startup time: '0' ms)
> > [Flex] [Sta

[flexcoders] Re: Tree descendants

2008-02-20 Thread Rafael Faria
Ok you got it almost right like you said.

instead of attributes use attribute.

var list:XMLList =
XML(dataProvider).descendants().(attribute("editing") == "true")


the thing now is how do i change the element. 
i tried go through the list and change the attribute to "false" but it
doesnt really change it.

this is killing me =/


--- In flexcoders@yahoogroups.com, "Rafael Faria"
<[EMAIL PROTECTED]> wrote:
>
> Not really. Got an error as well.
> 
> someone else can help me out?? 
> raf
> 
> --- In flexcoders@yahoogroups.com, "Jim Hayes"  wrote:
> >
> > I think it's XML(dataProvider).descendants().(attributes("enabled") ==
> > "true") that you want ? Not checked it but I think it's pretty
close at
> > least.
> >  
> > -Original Message-
> > From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On
> > Behalf Of Rafael Faria
> > Sent: 20 February 2008 05:55
> > To: flexcoders@yahoogroups.com
> > Subject: [flexcoders] Tree descendants
> >  
> > I'm trying to get the descendants from my XML which has the attribute
> > "enabled = true"
> > 
> > if i try
> > 
> > XML(dataProvider).descendants().(@enabled = "true") 
> > 
> > i get an error " A term is undefined and has no properties."
> > 
> > which is understandable because not every node has the enabled
> > attribute. The question is how to get all that has the "enabled"
> > attribute and is set true.
> >  
> > 
> > __
> > This communication is from Primal Pictures Ltd., a company
> registered in England and Wales with registration No. 02622298 and
> registered office: 4th Floor, Tennyson House, 159-165 Great Portland
> Street, London, W1W 5PA, UK. VAT registration No. 648874577.
> > 
> > This e-mail is confidential and may be privileged. It may be read,
> copied and used only by the intended recipient. If you have received
> it in error, please contact the sender immediately by return e-mail or
> by telephoning +44(0)20 7637 1010. Please then delete the e-mail and
> do not disclose its contents to any person.
> > This email has been scanned for Primal Pictures by the MessageLabs
> Email Security System.
> > __
> >
>




[flexcoders] Re: Tree descendants

2008-02-20 Thread Rafael Faria
As usual, i sent the message and solve my problem.

The problem was casting the dataProvider as XML.

if i use

var list:XMLList = dataProvider.descendants().(attribute("editing") ==
"true")

i can parse through the list and change it attributes

for (var i:* in list){
 [EMAIL PROTECTED] = "false";
}

:P

Thanks for your help. It put me on the right track :P

raf
--- In flexcoders@yahoogroups.com, "Rafael Faria"
<[EMAIL PROTECTED]> wrote:
>
> Ok you got it almost right like you said.
> 
> instead of attributes use attribute.
> 
>   var list:XMLList =
> XML(dataProvider).descendants().(attribute("editing") == "true")
> 
> 
> the thing now is how do i change the element. 
> i tried go through the list and change the attribute to "false" but it
> doesnt really change it.
> 
> this is killing me =/
> 
> 
> --- In flexcoders@yahoogroups.com, "Rafael Faria"
>  wrote:
> >
> > Not really. Got an error as well.
> > 
> > someone else can help me out?? 
> > raf
> > 
> > --- In flexcoders@yahoogroups.com, "Jim Hayes"  wrote:
> > >
> > > I think it's
XML(dataProvider).descendants().(attributes("enabled") ==
> > > "true") that you want ? Not checked it but I think it's pretty
> close at
> > > least.
> > >  
> > > -Original Message-
> > > From: flexcoders@yahoogroups.com
> [mailto:[EMAIL PROTECTED] On
> > > Behalf Of Rafael Faria
> > > Sent: 20 February 2008 05:55
> > > To: flexcoders@yahoogroups.com
> > > Subject: [flexcoders] Tree descendants
> > >  
> > > I'm trying to get the descendants from my XML which has the
attribute
> > > "enabled = true"
> > > 
> > > if i try
> > > 
> > > XML(dataProvider).descendants().(@enabled = "true") 
> > > 
> > > i get an error " A term is undefined and has no properties."
> > > 
> > > which is understandable because not every node has the enabled
> > > attribute. The question is how to get all that has the "enabled"
> > > attribute and is set true.
> > >  
> > > 
> > >
__
> > > This communication is from Primal Pictures Ltd., a company
> > registered in England and Wales with registration No. 02622298 and
> > registered office: 4th Floor, Tennyson House, 159-165 Great Portland
> > Street, London, W1W 5PA, UK. VAT registration No. 648874577.
> > > 
> > > This e-mail is confidential and may be privileged. It may be read,
> > copied and used only by the intended recipient. If you have received
> > it in error, please contact the sender immediately by return e-mail or
> > by telephoning +44(0)20 7637 1010. Please then delete the e-mail and
> > do not disclose its contents to any person.
> > > This email has been scanned for Primal Pictures by the MessageLabs
> > Email Security System.
> > >
__
> > >
> >
>




[flexcoders] BlazeDS Subtopics from Java

2008-02-20 Thread Geoffrey
I see plenty of examples of how to do subtopics all from MXML/AS 
code, but how to you create a message in Java that has a subtopic?

Here are some code snippets:


:::messaging-config.xml:::



1000
true
.







:::main.mxml:::

public function onCreationComplete():void { 
  siteMessagesConsumer.destination = "siteMessages";
  siteMessagesConsumer.subtopic = "*";
  siteMessagesConsumer.subscribe();
}

public function onSiteMessages( event:MessageEvent ):void { 
  trace("Got it!");
}





:::MyDelegate.java:::
private void sendFlexMessage() throws MyException {
  MessageBroker msgBroker = MessageBroker.getMessageBroker(null);
  String clientID = UUIDUtils.createUUID();

  // Generate a message
  AsyncMessage msg = new AsyncMessage();
  msg.setDestination("siteMessages.allUsers");
  msg.setClientId(clientID);
  msg.setMessageId(UUIDUtils.createUUID());
  msg.setTimestamp(System.currentTimeMillis());
  msg.setBody(getSomeObject());

  // Send a message
  msgBroker.routeMessageToService(msg, null);
}

The sendFlexMessage() method is called from somewhere else.  This 
worked when my destination was just "siteMessages".  But I want to 
send subtopics 
like "siteMessages.allUsers", "siteMessages.allTeams", etc.  I 
looked at the Java API for this stuff and saw nothing that jumped 
out like a setSubTopic() method, so I assumed that it was as simple 
as setting the destination to "something.something".  That seems to 
be the way they did it in the MXML/AS examples I saw, but when I try 
to send the message I get an error saying that there is 
no "siteMessages.allUsers" destination.

Any suggestions would be appreciated.



Re: [flexcoders] No right mouse button functionality? Really?

2008-02-20 Thread Max Frigge
There are some workarounds, but it is not natively supported..
Maybe this might help you...
http://www.flex-flex.net/blog/article.asp?id=27

- Original Message 
From: Brad Bueche <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Thursday, February 21, 2008 9:30:45 AM
Subject: [flexcoders] No right mouse button functionality? Really?










  







I've been googling 
trying to find out how to turn off the player menu and enable right mouse 
button 
clicks.  So far it looks like you cant do it.  Am I missing something 
here? 

 

brad



  
























  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

RE: [flexcoders] Re: Tree descendants

2008-02-20 Thread Jim Hayes
Close but no cigar then :-(
 
> the thing now is how do i change the element.
 
var list:XMLList = XML(dataProvider).descendants().(attribute("editing")
== "true")
 
for each ( var editingNode:XML in list)
{
[EMAIL PROTECTED]"false"; // or whatever you want to do to that node
}
 
 
(that probably won't work either! apologies if I am an idiot)
 
 
 
-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Rafael Faria
Sent: 20 February 2008 23:38
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Tree descendants
 
Ok you got it almost right like you said.

instead of attributes use attribute.

var list:XMLList =
XML(dataProvider).descendants().(attribute("editing") == "true")

the thing now is how do i change the element. 
i tried go through the list and change the attribute to "false" but it
doesnt really change it.

this is killing me =/

--- In flexcoders@yahoogroups.com 
, "Rafael Faria"
<[EMAIL PROTECTED]> wrote:
>
> Not really. Got an error as well.
> 
> someone else can help me out?? 
> raf
> 
> --- In flexcoders@yahoogroups.com
 , "Jim Hayes"  wrote:
> >
> > I think it's XML(dataProvider).descendants().(attributes("enabled")
==
> > "true") that you want ? Not checked it but I think it's pretty
close at
> > least.
> > 
> > -Original Message-
> > From: flexcoders@yahoogroups.com
 
[mailto:flexcoders@yahoogroups.com 
] On
> > Behalf Of Rafael Faria
> > Sent: 20 February 2008 05:55
> > To: flexcoders@yahoogroups.com 

> > Subject: [flexcoders] Tree descendants
> > 
> > I'm trying to get the descendants from my XML which has the
attribute
> > "enabled = true"
> > 
> > if i try
> > 
> > XML(dataProvider).descendants().(@enabled = "true") 
> > 
> > i get an error " A term is undefined and has no properties."
> > 
> > which is understandable because not every node has the enabled
> > attribute. The question is how to get all that has the "enabled"
> > attribute and is set true.
> > 
> > 
> > __
> > This communication is from Primal Pictures Ltd., a company
> registered in England and Wales with registration No. 02622298 and
> registered office: 4th Floor, Tennyson House, 159-165 Great Portland
> Street, London, W1W 5PA, UK. VAT registration No. 648874577.
> > 
> > This e-mail is confidential and may be privileged. It may be read,
> copied and used only by the intended recipient. If you have received
> it in error, please contact the sender immediately by return e-mail or
> by telephoning +44(0)20 7637 1010. Please then delete the e-mail and
> do not disclose its contents to any person.
> > This email has been scanned for Primal Pictures by the MessageLabs
> Email Security System.
> > __
> >
>
 

__
This communication is from Primal Pictures Ltd., a company registered in 
England and Wales with registration No. 02622298 and registered office: 4th 
Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT 
registration No. 648874577.

This e-mail is confidential and may be privileged. It may be read, copied and 
used only by the intended recipient. If you have received it in error, please 
contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 
1010. Please then delete the e-mail and do not disclose its contents to any 
person.
This email has been scanned for Primal Pictures by the MessageLabs Email 
Security System.
__

RE: [flexcoders] dynamic function Names

2008-02-20 Thread Tracy Spratt
Yes, bracket notation will almost always resolve an object reference.
Very powerful.

Regarding mx:Application, perhaps my terminology is incorrect.

I seem recall that the change to tight typing happened in AS3/FP8/Flex2.


And do remember that in a 1x app we coud do:
this["myvar"] = "myvalue"; //dynamically creating the variable 'myvar'
as a member of Application.

In fact, I was so sure of this that I actually cranked up FB 1.5, and
the Flex server (remember that?) and created this example:


http://www.macromedia.com/2003/mxml";
initialize="initApp()">




This does work.

Of course this is so ancient, it is really irrelevant.

Tracy

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Gordon Smith
Sent: Wednesday, February 20, 2008 4:25 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] dynamic function Names

You can look up properties and methods by name with o[p] syntax even if
o isn't an instance of a dynamic class.
 
And I'm pretty sure that  wasn't a dynamic class in 1.x.
 
Gordon Smith
Adobe Flex SDK Team


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tracy Spratt
Sent: Wednesday, February 20, 2008 12:49 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] dynamic function Names
As long a "this" is a dynamic object.  In 1.x, mx:Application was
dynamic, in 2+ it is not.
Tracy

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of joshua gatcke
Sent: Monday, February 18, 2008 4:51 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] dynamic function Names
Hi all, after much toil, I have learned that I can have dynamic 
function names doing something like this:

var myFunctionName:String = 'foo';
this[myFunctionName]();

This is awesome! Just thought I would share, but you guys probably 
already knew how to do that ;)

- joshua
 


RE: [flexcoders] Re: Problem with focus in secondary popups

2008-02-20 Thread Alex Harui
The Flex Framework has some built-in functionality around popups.  In
general, you should not need to call FocusManager.activate() or
SystemManager.activate() unless you are in some unexpected scenario.

 

I modified your example and it seemed to work correctly for me.  Here
are the changes I made:

 

SimplePopUp.mxml

private function fClose():void

{

PopUpManager.removePopUp(this);

if (m_pParent is CMyPanel)

{

   //
CMyPanel(m_pParent).fSetFocus();

}

}

 

CMyPanel.as

 

public function fSetFocus():void

{

PopUpManager.centerPopUp(this);

 

//var fm:FocusManager = new FocusManager(this);

//fm.activate();

 

//fm.setFocus(m_InitialFocus as IFocusManagerComponent);

m_InitialFocus.setFocus();

 

//fm.showFocus();

 

//systemManager.activate(this);

 

m_bFocused = true;

}

 

-Alex

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Dmitri Girski
Sent: Wednesday, February 20, 2008 3:16 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Problem with focus in secondary popups

 

Hi Alex,

I have created a simple test case:

http://mitek.id.au/TestPopUpSimple.html
  
Source:
http://mitek.id.au/PopupFocus.zip  

http://mitek.id.au/CMyPanel.as   - is
the base class for the popup
window - it performs all the focusing stuff.
Actually this class can focusing without any problem BUT only if
popups are created automatically in one go.
As soon as you use button clicks to create popups - TAB focus is stuck
in the first one and it won't be restored ever.
Even if you close all popups and start it over again.

NB updateComplete listener - is not essential in this particular case,
but I need in because I use my own caching popupmanager where popups
are reused and then creationComplete won't be dispatched for them

http://mitek.id.au/SimplePopUp.mxml
  - derived from CMyPanel - just
handles 2 buttons - New and Close

http://mitek.id.au/TestPopUpSimple.mxml
  - main app.

Just run it, then press New and then press TAB - cursor will move in
the first popup, but selection will be in the second popup.


Could you please have a look at this problem?
Thanks!

Dmitri.

--- In flexcoders@yahoogroups.com 
, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> systemManager.activate
> 

 



RE: [flexcoders] dynamic function Names

2008-02-20 Thread Gordon Smith
Sorry, it seems like such ancient history that I forgot...
 
ALL classes in AS2 / Flex 1.x were what we now call "dynamic". The
distinction between a dynamic class and a non-dynamic ("sealed") one --
as determined by the 'dynamic' keyword on a class declaration -- was
introduced in AS3 / Flex 2.
 
- Gordon



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tracy Spratt
Sent: Wednesday, February 20, 2008 4:32 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] dynamic function Names



Yes, bracket notation will almost always resolve an object reference.
Very powerful.

Regarding mx:Application, perhaps my terminology is incorrect.

I seem recall that the change to tight typing happened in AS3/FP8/Flex2.


And do remember that in a 1x app we coud do:

this["myvar"] = "myvalue"! ; //dynamically creating the variable 'myvar'
as a member of Application.

In fact, I was so sure of this that I actually cranked up FB 1.5, and
the Flex server (remember that?) and created this example:



http://www.macromedia.com/2003/mxml
 " initialize="initApp()">







This does work.

Of course this is so ancient, it is really irrelevant.

Tracy

From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com
 ] On Behalf Of Gordon Smith
Sent: Wednesday, February 20, 2008 4:25 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] dynamic function Names

You can look up properties and methods by name with o[p] syntax even if
o isn't an instance of a dynamic class.

 

And I'm pretty sure that  wasn't a dynamic class in 1.x.

 

Gordon Smith

Adobe Flex SDK Team

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tracy Spratt
Sent: Wednesday, February 20, 2008 12:49 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] dynamic function Names

As long a "this" is a dynamic object.  In 1.x, mx:Application was
dynamic, in 2+ it is not.

Tracy

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of joshua gatcke
Sent: Monday, February 18, 2008 4:51 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] dynamic function Names

Hi all, after much toil, I have learned that I can have dynamic
function names doing something like this:

var myFunctionName:String = 'foo';
this[myFunctionName]();

This is awesome! Just thought I would share, but you guys probably
already knew how to do that ;)

- joshua

 


[flexcoders] Redirect flash player from localhost to PC client when access flex app

2008-02-20 Thread Harry Saputra
How to make a express installation from localhost when PC client doesn't
have a flash player 9.0 before ?

When client access my flex app, and doesn't have installed flash player, the
app give a option to install it from my localhost server..

thanks



[flexcoders] Re: Using module from Flex library project

2008-02-20 Thread Gaurav Jain
I looked at the project file you sent. If you follow the instructions
I sent you earlier, you should be all set. 

1. Delete MainApp.mxml from ModulesHome project.
2. Modify ModulesHome project by setting "do not optimize for any project"

3. remove the source path entry (for module home) from the main app
project.

4. Modify MainApp project's compile setting and add 
-link-report=C:\lnkreport.xml

5. Modify MoulesHome compiler setting and add
-load-externs=C:\lnkreport.xm

finally before running copy the module swf from ModuleHome to MainApp
(nect to the MainApp.swf).

Thanks,
Gaurav



--- In flexcoders@yahoogroups.com, "mydarkspoon" <[EMAIL PROTECTED]> wrote:
>
> --- In flexcoders@yahoogroups.com, "Gaurav Jain"  wrote:
> >
> > > The flex project that uses the module puts the "module home" project
> > > in its source path, 
> > Why is it required? Since you module is supposedly independent of your
> > main app, you  do not need to specify it in the source path. 
> > 
> > > However, when compiling the main app (the shell) it complains about
> > > the module's locale files (ModuleTexts.properties for example)
> > 
> > Are you using some class from the module project directly in your main
> > app? I would suggest to have main app independent of the module
> > classes, if that is not possble including /locale/en_US
> > in the source path of main app should resolve the compilation errors.
> > 
> > Thanks,
> > Gaurav
> >
> 
> 
> Hi again,
> Putting the locales in the source path merely won't help compiling,
> because the locales are treated differently.
> I put an example siutuation online, the link is in my previous post.
> 
> Thanks,
> Almog Kurtser
>




[flexcoders] Re: Problem with focus in secondary popups

2008-02-20 Thread Dmitri Girski
Alex, thank you very much for the help.
You just saved me from madness after 4 days I spent with this problem.


Only one thing I want to mention: if I use a mixture of automatic &
manual popups generation, I still have to call manually fSetFocus() in
the parent.

PS I've updated the code in examples, so now it works in any
combination of calls



Dmitri.




--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> The Flex Framework has some built-in functionality around popups.  In
> general, you should not need to call FocusManager.activate() or
> SystemManager.activate() unless you are in some unexpected scenario.




[flexcoders] Re: Flex Ant Task for F3b3 genereates ALWAYS debug version, how to fix that?

2008-02-20 Thread Gaurav Jain
My bad. The syntax I sent was incorrect. It was meant to be 



The warning you get is because you have specified the signed version
of the framework rsl (.swz) in the arguments.  It would go away if you
either use the unsigned version (.swf) or also add the
target-player=9.0.60 (signed rsl support is only available from 9.0.60
onwards)

As to why you don't see difference in size between in FB and ant
tasks. I would recommend you to compare all setting once again (look
in the .actionScriptProperties file), if you don't find any
differences file a bug (with your test case). 

Thanks,
Gaurav

--- In flexcoders@yahoogroups.com, "lytvynyuk" <[EMAIL PROTECTED]> wrote:
>
> with
>  
> 
> ${FLEX_HOME}/frameworks/libs/framework.swc
> 
> ${FLEX_HOME}/frameworks/rsls/framework_3.0.189825.swf
>  
> 
> in my ant build file I getting:
> 
> W:\jboss-4.0.5\server\default\deploy\Myapp.war\build.xml:64: Invalid
> element: path-element
> 
> But:
>   path-element="${FLEX_HOME}/frameworks/libs/framework.swc">
>   rsl-url="${FLEX_HOME}/frameworks/rsls/framework_3.0.189825.swz"/>
>  
> 
> Actually builds OK, but doesn't affect size of code at all.
> 
>  ${FLEX_HOME} = W:/Program Files/Adobe/Flex Builder 3
> Plug-in/sdks/3.0.0
> 
> I run Flex Builder Plug-in 3, build 3.0.190133 beta 3
> 
> Also I'm getting this warning:
>  [mxmlc] Warning: A signed RSL was specified for library W:\Program
> Files\Adobe\Flex Builder 3
> Plug-in\sdks\3.0.0\frameworks\libs\framework.swc without an unsigned RSL
> as a failover. To avoid runtime errors, either require player version
> 9.0.60 in your HTML wrapper or add an unsigned RSL as a failover for the
> signed RSL. Use -target-player=9.0.60 if you choose to require player
> version 9.0.60.
> 
> --- In flexcoders@yahoogroups.com, "Gaurav Jain"  wrote:
> >
> > I think you should modify your ant task to following:
> >
> >  > output="${DEPLOY_DIR}/ActiveUpdate.swf"
> >   actionscript-file-encoding="UTF-8"
> >
> > services="${BUILD_SPACE}res/services-config.xml"
> >   context-root="ISP"
> >   locale="en_US" as3="true"
> > optimize="true" static-rsls="false" headless-server="true">
> > 
> > 
> >
> ${FLEX_HOME}/frameworks/libs/framework.swc
> >
> ${FLEX_HOME}/frameworks/rsls/framework_3.0.189825.swf
> > 
> >
> > 
> > false
> > false
> >  > append="true">
> > 
> > 
> > 
> > 
> >
> > if you are using FB 3, it would use  and
> > not .
> >
> >  was introduced in flex 3 to support
> > framework caching.
> >
> > Thanks,
> > Gaurav
> >
> > --- In flexcoders@yahoogroups.com, "lytvynyuk" lytvynyuk@ wrote:
> > >
> > > In that case no point to report bug, everything works for me too.
> > > Problem for me is different actually it is about RSL.
> > >
> > > I try to build everytinh with RSL which suppose to decrease size of
> my
> > > application. WQhich is not happening. AS you see I included RSL into
> > > my flex build task but it doesnt really affect anything, with or
> > without
> > >
> > >  url="${BUILD_SPACE}framework_3.0.189825.swf"/>
> > >
> > > it produces same size app, but when I compiled it WITH and run it it
> > > demands presence of framework_3.0.189825.swf.
> > >
> > > With ECLIPSE it actually decreases size of application.
> > >
> > > What is the syntax of correct usage of RSL in ant?
> > >
> > > --- In flexcoders@yahoogroups.com, "Gaurav Jain"  wrote:
> > > >
> > > > These numbers are after only switching debug (true|false) using
> flex
> > > > tasks.
> > > >
> > >
> >
>




Re: [flexcoders] how to de-serialize objects

2008-02-20 Thread Sujit Reddy
If you are mapping the AS object to the Java class using the RemoteClass
metatag, that will do the work. just make sure the name of the Java class in
the RemoteClass metatag has the fully qualified name i.e. com.xxx.remoting
.

You need not de-serialize the arraylist, if the mapped objects are passed in
the ArrayList from Java, you get them as the objects in ArrayCollection in
AS.

did you include the reference to the AS object mapped to the Java object in
you main application file? if a reference of AS object is not included in
the main application file, then that class definition will not be available
during runtime.

If any of the above suggestions are not helping you, share few code snippets
from your application, we can try to debug the problem.

Regards,
Sujit Reddy G

On Thu, Feb 21, 2008 at 12:58 AM, [p e r c e p t i c o n] <
[EMAIL PROTECTED]> wrote:

>   just noticed that the namespaces are different...would this matter? on
> the POJO it com.xxx.remoting, but on the AS3Object it just package...
> percy
>
>
> On Wed, Feb 20, 2008 at 10:12 AM, [p e r c e p t i c o n] <
> [EMAIL PROTECTED]> wrote:
>
> > Hi Again,
> > Ok...so by instantiating my class the Serialization took place and there
> > are 99 elements of that type in the result...however the members of the
> > class are all null, but i'm printing them to a file on the Java side so I
> > know that there are values in each object...any ideas on why this is
> > happening?
> >
> > thanks so much for all your input!
> > percy
> >
>
>  
>



-- 
Regards,
Sujit Reddy. G


[flexcoders] Re: Tree descendants

2008-02-20 Thread Rafael Faria
Hey mate... who said you are an idiot? 

 no worries mate... you put me on the right path :P 

thanks a lot!!!

raf


--- In flexcoders@yahoogroups.com, "Jim Hayes" <[EMAIL PROTECTED]> wrote:
>
> Close but no cigar then :-(
>  
> > the thing now is how do i change the element.
>  
> var list:XMLList = XML(dataProvider).descendants().(attribute("editing")
> == "true")
>  
> for each ( var editingNode:XML in list)
> {
> [EMAIL PROTECTED]"false"; // or whatever you want to do to that node
> }
>  
>  
> (that probably won't work either! apologies if I am an idiot)
>  
>  
>  
> -Original Message-
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Rafael Faria
> Sent: 20 February 2008 23:38
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Tree descendants
>  
> Ok you got it almost right like you said.
> 
> instead of attributes use attribute.
> 
> var list:XMLList =
> XML(dataProvider).descendants().(attribute("editing") == "true")
> 
> the thing now is how do i change the element. 
> i tried go through the list and change the attribute to "false" but it
> doesnt really change it.
> 
> this is killing me =/
> 
> --- In flexcoders@yahoogroups.com 
> , "Rafael Faria"
>  wrote:
> >
> > Not really. Got an error as well.
> > 
> > someone else can help me out?? 
> > raf
> > 
> > --- In flexcoders@yahoogroups.com
>  , "Jim Hayes"  wrote:
> > >
> > > I think it's XML(dataProvider).descendants().(attributes("enabled")
> ==
> > > "true") that you want ? Not checked it but I think it's pretty
> close at
> > > least.
> > > 
> > > -Original Message-
> > > From: flexcoders@yahoogroups.com
>  
> [mailto:flexcoders@yahoogroups.com 
> ] On
> > > Behalf Of Rafael Faria
> > > Sent: 20 February 2008 05:55
> > > To: flexcoders@yahoogroups.com 
> 
> > > Subject: [flexcoders] Tree descendants
> > > 
> > > I'm trying to get the descendants from my XML which has the
> attribute
> > > "enabled = true"
> > > 
> > > if i try
> > > 
> > > XML(dataProvider).descendants().(@enabled = "true") 
> > > 
> > > i get an error " A term is undefined and has no properties."
> > > 
> > > which is understandable because not every node has the enabled
> > > attribute. The question is how to get all that has the "enabled"
> > > attribute and is set true.
> > > 
> > > 
> > > __
> > > This communication is from Primal Pictures Ltd., a company
> > registered in England and Wales with registration No. 02622298 and
> > registered office: 4th Floor, Tennyson House, 159-165 Great Portland
> > Street, London, W1W 5PA, UK. VAT registration No. 648874577.
> > > 
> > > This e-mail is confidential and may be privileged. It may be read,
> > copied and used only by the intended recipient. If you have received
> > it in error, please contact the sender immediately by return e-mail or
> > by telephoning +44(0)20 7637 1010. Please then delete the e-mail and
> > do not disclose its contents to any person.
> > > This email has been scanned for Primal Pictures by the MessageLabs
> > Email Security System.
> > > __
> > >
> >
>  
> 
> __
> This communication is from Primal Pictures Ltd., a company
registered in England and Wales with registration No. 02622298 and
registered office: 4th Floor, Tennyson House, 159-165 Great Portland
Street, London, W1W 5PA, UK. VAT registration No. 648874577.
> 
> This e-mail is confidential and may be privileged. It may be read,
copied and used only by the intended recipient. If you have received
it in error, please contact the sender immediately by return e-mail or
by telephoning +44(0)20 7637 1010. Please then delete the e-mail and
do not disclose its contents to any person.
> This email has been scanned for Primal Pictures by the MessageLabs
Email Security System.
> __
>




[flexcoders] Selecting a Item on a Tree Control

2008-02-20 Thread Rafael Faria
I was reading blog.flexexamples and i saw an example of what i need.
But it was quite exactly.

The following example is Opening nodes on a tree control.

http://blog.flexexamples.com/2007/11/29/opening-nodes-in-a-flex-tree-control-using-the-expanditem-method/

What i need is basically the same thing but using a different source.

in the example above it uses

var node:XMLList = mlb.league.division.team.(@label == team);

to get the list.

If i try to change based on the dataProvider XML it wont work although
i traced and it seems to get the right data.

var node:XMLList = XML(tree.dataProvider).league.division.team.(@label
== team);

any one would know how to explain why it happen?

Thanks in advanced
Raf




[flexcoders] Re: Web conferencing with Flex

2008-02-20 Thread b_alen

> Are you not familiar with Adobe Acrobat Connect? It is exactly that
> and yes, based on all those technologies you mentioned.

A. It's expensive
B. It sucks




[flexcoders] Re: getCharBounds not working on AIR?

2008-02-20 Thread b_alen

> 1. If the same code produces different character bounds in AIR than in
> the Flash Player, that's a bug and you should file it.

It produces the same bounds, you just can't access the function at the
same time, that is upon setting the text property. You have to do it
later at some point in time.


> 2. A constructor should not call createChildren(). The framework
> automatically calls createChildren() at the appropriate time, which is
> when the component is added to the display list.


If I don't call createChildren() I get null object exception. 


> 3. If you find yourself having to use callLater(), you're probably doing
> something the wrong way. In general, you should use events rather than
> just waiting awhile. If the framework doesn't provide the event you
> need, please file an enhancement request.

Or it might be that Adobe is doing something the wrong way and we're
just forced to use all sorts of hacks to work with half baked
products. (no access to TextField, no documentation on mx_internal,
AIR bounds vs. FP bounds, etc, etc...)


Cheers










> Gordon Smith
> Adobe Flex SDK Team
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of b_alen
> Sent: Wednesday, February 20, 2008 8:48 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: getCharBounds not working on AIR?
> 
> 
> 
> Great, it seems like callLater saved my butt. Luckily i also found the
> blog which explains in short the WHY's and HOW's of the callLater.
> Title of the blog is callLater() - The Function That Saved My Butt.
> It's here:
> 
> http://www.kylehayes.info/blog/index.cfm/2007/5/31/callLater--The-Functi
> on-That-Saved-My-Butt
>  ion-That-Saved-My-Butt> 
> 
> The function actually broke because I had to use it within the for
> loop. The solution was to to get rid of the for loop and instead split
> the iteration into several functions that were calling each other upon
> completion.
> 
> --- In flexcoders@yahoogroups.com 
> , "Daniel Freiman"  wrote:
> >
> > If you want a simple wait, you can use uicomponent.callLater(). 
> (See the
> > docs). The other alternative is to listen for an event but which
> even to
> > listen for depends on your use case. (for example if this is
> happening when
> > the application is loaded applicationComplete would probably be the
> correct
> > event.) Check out the events thrown by the components involved to
> see if one
> > jumps out at you.
> > 
> > - Dan Freiman
> > 
> > On Wed, Feb 20, 2008 at 10:53 AM, b_alen  wrote:
> > 
> > > Wow, that was fast, I didn't even manage to finish the cigarette :)
> > >
> > > And it works. Now, should I use the interval or is there a more
> > > elegant way to know that the component is ready? You were mentioning
> > > "refresh".
> > >
> > > Thanks a ton buddy
> > >
> > >
> > > --- In flexcoders@yahoogroups.com
>   ,
> "Daniel
> > > Freiman"  wrote:
> > > >
> > > > Try getting the rect later (Put a button somewhere and click it
> after
> > > > everything is finished loading) to make sure the UITextField
> doesn't
> > > just
> > > > need to be refreshed first. If that doesn't work, I'd file a bug
> if
> > > I were
> > > > you.
> > > >
> > > > - Dan Freiman
> > > >
> > > > On Wed, Feb 20, 2008 at 10:20 AM, b_alen  wrote:
> > > >
> > > > > It seems a bit ridiculous but it's true. Not just that you have
> > > to use
> > > > > all sorts of hacks to get access to good old TextField
> (IUITextField)
> > > > > in Flex in order to even think of accessing characters'
> Rectangles.
> > > > > Once you do manage to cut your way through, you get a very nasty
> > > > > disappointment that IUITextField.getCharBounds() works
> perfectly in
> > > > > Flex Web apps, but returns some bizarre incorrect values when
> running
> > > > > on AIR.
> > > > >
> > > > > If anyone has any suggestion, I'd really appreciate it very
> much.
> > > > > We're in terrible deadline and this is one of the crucial
> > > functionalities.
> > > > >
> > > > > var tf:TextAreaExtended = new TextAreaExtended();
> > > > > tf._textField.text = "dsfsdf sfd sf dsf sfdsd fdsfdsfdsfdsfdsf
> fds";
> > > > > addChild(tf);
> > > > > var rect:Rectangle = tf._textField.getCharBoundaries(20);
> > > > >
> > > > > // I get values for rect.left something like 0.5
> > > > > // same goes for other rect properties, very weird.
> > > > >
> > > > > // extended TextArea which gives access to TextField
> > > > > package
> > > > > {
> > > > > import mx.controls.TextArea;
> > > > > import mx.core.IUITextField;
> > > > >
> > > > > public class TextAreaExtended extends TextArea
> > > > > {
> > > > > public function TextAreaExtended()
> > > > > {
> > > > > createChildren();
> > > > >
> > > > > }
> > > > >
> > > > > public function get _textField():IUITextField{
> > > > > return textField;
> 

[flexcoders] Re: Alternate row color of DataGridColumn

2008-02-20 Thread sreeni_r

I have posted a sample here 

http://flexpearls.blogspot.com/2008/02/alternate-row-color-in-
datagrid-per.html

-Sreenivas

--- In flexcoders@yahoogroups.com, Danish Tehseen <[EMAIL PROTECTED]> 
wrote:
>
> DataGrid alternate item's color can be set by datagrid's 
alternatingItemColors property, but is there a way to change 
alternating item color of DataGridColumn? There is a case where i 
have to set different alternate row colors to different 
DataGridColumn. If not possible in DataGrid, is it possible in 
AdvanceDataGrid control.
> 
> Thanks & Regards,
> 
> Danish
> 
> 
>   
__
__
> Looking for last minute shopping deals?  
> Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping
>




[flexcoders] Re: AdvancedDataGrid - Changing the background color on a row.

2008-02-20 Thread sreeni_r

I have posted a working sample here which I think you can tweak it 
work your scenario.

http://flexpearls.blogspot.com/2008/02/row-background-color-in.html

-Sreenivas

--- In flexcoders@yahoogroups.com, "Dominic Pazula" <[EMAIL PROTECTED]> 
wrote:
>
> I thought this would be easy to do, but I have been banging my head 
> on it for a while.  I'm wanting to let the user "mark" rows as they 
> scroll through the ADG.  
> 
> I created a function myRowStyle and set 
styleFunction="myRowStyle".  
> What I cannot figure out is how to change the background color on 
the 
> row.  I've figured out how to change just about everything else.
> 
> Here is the myRowStyle function.  I am just setting a static set of 
> rows to the style to help me figure this out.
> 
> private function myRowStyle(data:Object, 
> col:AdvancedDataGridColumn):Object{
>   var vals:Array = [0, 2, 4, 6];
>   
>   var i:int = dg.dataProvider.getItemIndex(data);
>   
>   if (vals.indexOf(i) >= 0){
>   var o:Object = new Object;
>   o.color = 0x00;
>   o.fontWeight = "bold";
>   o.backgroundColor = 0xFF;
>   return o;
>   }
>   else return null;
> }
> 
> o.backgroundColor is just my latest attempt.  I've tried everything 
I 
> can think of, but obviously have not thought of everything.
> 
> Does anyone know the trick to doing this?
> 
> Thanks
> Dominic
>




[flexcoders] Creating a constantly pressed button - reptative firing of Mouse_Down event?

2008-02-20 Thread polestar11
Hi there

How would one set up events on a button so that a function can be
called while it is in the pressed state? For example, I want an item
on the stage to scale while I hold down the "Scale" button.

Mouse_Down is only called once. I tried setting up Mouse_Over events
in the mouseDownHandler, but this didnt do anything.

Any suggestions?
Tracy 



RE: [flexcoders] Creating a constantly pressed button - reptative firing of Mouse_Down event?

2008-02-20 Thread Alex Harui
autoRepeat=true, and listen for buttonDown, not mouseDown

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of polestar11
Sent: Wednesday, February 20, 2008 10:48 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Creating a constantly pressed button - reptative
firing of Mouse_Down event?

 

Hi there

How would one set up events on a button so that a function can be
called while it is in the pressed state? For example, I want an item
on the stage to scale while I hold down the "Scale" button.

Mouse_Down is only called once. I tried setting up Mouse_Over events
in the mouseDownHandler, but this didnt do anything.

Any suggestions?
Tracy 

 



[flexcoders] Circle Canvas

2008-02-20 Thread Swamy Nathan
Hi Folks,

I am swaminathan, and am new to flex env...

i want to create the Circle Shape Canvas. How can i ?

Please help me...

-- 
Thanks & Regards
Swaminathan. M


RE: [flexcoders] Circle Canvas

2008-02-20 Thread Gordon Smith
Can you explain more what you mean by the Circle Shape Canvas?
 
- Gordon



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Swamy Nathan
Sent: Wednesday, February 20, 2008 11:01 PM
To: [EMAIL PROTECTED]; flexcoders@yahoogroups.com
Subject: [flexcoders] Circle Canvas



Hi Folks,

I am swaminathan, and am new to flex env...

i want to create the Circle Shape Canvas. How can i ?

Please help me...

-- 
Thanks & Regards
Swaminathan. M 

 


[flexcoders] Re: Creating a constantly pressed button - reptative firing of Mouse_Down event?

2008-02-20 Thread polestar11
--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> autoRepeat=true, and listen for buttonDown, not mouseDown
> 
>  
>
THANKS!



RE: [flexcoders] Re: getCharBounds not working on AIR?

2008-02-20 Thread Gordon Smith
1. I don't think AIR and Flash Player should have different timing. If
the Flash Player knows the correct bounds immediately after setting the
text, AIR should too. Please file a bug.
 
2. You get a null object exception because you're expecting children to
exist after newing a component, and that's not the way any of our
framework components work. You have to first do the addChild().
 
3a. The textField of a TextArea is a protected var accessible by any
subclass, and there is a public getTextField() method in the mx_internal
namespace, so it's not accurate to say "no access to TextField".
 
3b. The mx_internal namespace has the documentation 
 
/**
 *  This namespace is used for undocumented APIs -- usually
implementation
 *  details -- which can't be private because they need to visible
 *  to other classes.
 *  APIs in this namespace are completely unsupported and are likely to
 *  change in future versions of Flex.
 */
 
We don't want to advertise it heavily because that would defeat the
entire purpose of it.
 
3c. I'm sorry that your experience with Flex 3 makes you feel that it's
half-baked. We have a public bugbase so that you can let us know what
we're doing wrong in a way that gets tracked. Complaints on flexcoders
don't always get tracked.
 
Gordon Smith
Adobe Flex SDK Team



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of b_alen
Sent: Wednesday, February 20, 2008 9:51 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: getCharBounds not working on AIR?




> 1. If the same code produces different character bounds in AIR than in
> the Flash Player, that's a bug and you should file it.

It produces the same bounds, you just can't access the function at the
same time, that is upon setting the text property. You have to do it
later at some point in time.

> 2. A constructor should not call createChildren(). The framework
> automatically calls createChildren() at the appropriate time, which is
> when the component is added to the display list.

If I don't call createChildren() I get null object exception. 

> 3. If you find yourself having to use callLater(), you're probably
doing
> something the wrong way. In general, you should use events rather than
> just waiting awhile. If the framework doesn't provide the event you
> need, please file an enhancement request.

Or it might be that Adobe is doing something the wrong way and we're
just forced to use all sorts of hacks to work with half baked
products. (no access to TextField, no documentation on mx_internal,
AIR bounds vs. FP bounds, etc, etc...)

Cheers

> Gordon Smith
> Adobe Flex SDK Team
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com 
] On
> Behalf Of b_alen
> Sent: Wednesday, February 20, 2008 8:48 AM
> To: flexcoders@yahoogroups.com  
> Subject: [flexcoders] Re: getCharBounds not working on AIR?
> 
> 
> 
> Great, it seems like callLater saved my butt. Luckily i also found the
> blog which explains in short the WHY's and HOW's of the callLater.
> Title of the blog is callLater() - The Function That Saved My Butt.
> It's here:
> 
>
http://www.kylehayes.info/blog/index.cfm/2007/5/31/callLater--The-Functi
 
> on-That-Saved-My-Butt
>
 
> ion-That-Saved-My-Butt> 
> 
> The function actually broke because I had to use it within the for
> loop. The solution was to to get rid of the for loop and instead split
> the iteration into several functions that were calling each other upon
> completion.
> 
> --- In flexcoders@yahoogroups.com


> , "Daniel Freiman"  wrote:
> >
> > If you want a simple wait, you can use uicomponent.callLater(). 
> (See the
> > docs). The other alternative is to listen for an event but which
> even to
> > listen for depends on your use case. (for example if this is
> happening when
> > the application is loaded applicationComplete would probably be the
> correct
> > event.) Check out the events thrown by the components involved to
> see if one
> > jumps out at you.
> > 
> > - Dan Freiman
> > 
> > On Wed, Feb 20, 2008 at 10:53 AM, b_alen  wrote:
> > 
> > > Wow, that was fast, I didn't even manage to finish the cigarette
:)
> > >
> > > And it works. Now, should I use the interval or is there a more
> > > elegant way to know that the component is ready? You were
mentioning
> > > "refresh".
> > >
> > > Thanks a ton buddy
> > >
> > >
> > > --- In flexcoders@yahoogroups.com
 
>  ,
> "Daniel
> > > Freiman"  wrote:
> > > >
> > > > Try gett

[flexcoders] mozilla linux vs mozilla mac os x - different results in processing xml files

2008-02-20 Thread hoytlee2000
I've noticed a difference between the results my flex application between the 
flash player 
on linux and on mac osx.  I am processing an xml file and creating a CDATA 
element, I 
then print it out to check it before I send it to a php script to save it out

I use this to add the CDATA element:

var tmpStr:XML = new XML("\

however on the linux browser I get:

mary had a little lamb

the player version on mac is 9,0,115,0 and the player on the linux is 9,0,48,0, 
I'd love to 
sync up the two versions but unfortunately the linux version is controlled by 
my 
company's IT dept.  However, I can't believe the minor version difference is 
this off, am I 
missing something here or is there a better way to add a CDATA element to an 
xml file?

Thanks.

be well,
Hoyt



<    1   2