RE: [SPAM] [flexcoders] What server do I put my crossdomain.xml file on?

2010-01-14 Thread Tracy Spratt
I am fairly certain that it will need to go on the server that is hosting
the servlet, since that is the only domain that the FlashPlayer is going to
know about.  That would be: http://da803299:8080  .
I am not sure how the sandbox handles port specifications in the url,
though.

 

When in doubt, put a completely open crossdomain everywhere until it works,
them remove them until it breaks.  Then close up the domain and port specs
as needed.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Matthew
Sent: Thursday, January 14, 2010 4:44 PM
To: flexcoders@yahoogroups.com
Subject: [SPAM] [flexcoders] What server do I put my crossdomain.xml file
on?

 

  

Hi - 

I have a Flex app that uses an HTTPService to call a Servlet. The servlet
retrieves a file on another domain and passes back to Flex where they are
prompted by a Windows dialog to either save or open it: It works fine
locally. 

When deployed, I get this error:

Error #2044: Unhandled SecurityErrorEvent:. text=Error #2048: Security
sandbox violation: http://bopswdmmk1:

15010/oats/FlexClient/OATSMain.swf cannot load data from http://da803299:

8080/oats/FTPFile?filename=/oats/oatsftp/feed/Session.csv.01062010.

I'm assuming this is because I need a crossdomain.xml file, right? If so,
where do I put it? On the domain that hosts the servlet, or the domain the
file is retrieved from? 

Crossdomain issues can be confusing and any insight would be greatly
appreciated. 

Thanks,

Matt





RE: [flexcoders] Flex4: getChildById or getElementById

2010-01-14 Thread Gordon Smith
You can write code like

if ("mycomponent" in this)
{
this["mycomponent"].doSomething()
}

to avoid an FTE with mycomponent does not exist.

Gordon Smith
Adobe Flex SDK Team

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Ondina F
Sent: Thursday, January 14, 2010 3:02 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex4: getChildById or getElementById


Hi,
Oftentimes I need to check if a component( for example a  TextInput) exists 
before populating it with data.
The getChildByName()is the only method I know of, that can do this.
I wish there was a getChildById() as well, so I wouldn’t have to set the name 
for all my components( could be hundreds )in addition to their id.
[
If the component( myComponent ) doesn’t exist:
this[“myComponent”] throws the RE ReferenceError: Error #1069
and
this.contains(myComponent) doesn’t compile of course
1120: Access of undefined property myComponentId.
]
I know, Christmas time is over, no more gifts for us from Adobe:)
Should I put it on my next flex-xmas list?
Or do you guys know about other ways of checking the existence of components? 
Any input would be much appreciated.
Cheers,
Ondina
P.S. My message didn’t show up on the mailing list after trying to create a new 
topic on the Yahoo Groups. I must have done something wrong. Sorry for any 
inconvenience I might have caused.




RE: [flexcoders] flex 4 text styling

2010-01-14 Thread Gordon Smith
Flash Player 10 introduced a new text system known as FTE (the 
flash.text.engine classes). It also continues to have the old TextField class. 
So there are basically two text systems, with their own ways of doing text 
formatting.

They have some formats in common, but each also has formats of its own. The 
fontSharpness and fontAntiAliasType formats are not part of FTE and therefore 
not supported by Spark components, which use FTE. Their closest relatives in 
FTE are renderingMode and cffHinting.

- Gordon

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Ariel J
Sent: Thursday, January 14, 2010 1:49 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] flex 4 text styling



In the language reference, I see styles such as fontSharpness and 
fontAntiAliasType for Label, but I am not seeing them as styles for the spark 
Label or RichText. Are they no longer being used?



RE: [flexcoders] flash player 10 problem for Flex textinput in Chinese

2010-01-14 Thread Gordon Smith
What control are you using? ? ?

- Gordon

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of bsyyu
Sent: Tuesday, January 12, 2010 9:32 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] flash player 10 problem for Flex textinput in Chinese



I make a application to capture the user textinput in Chinese.
I test this in windows xp using xp default text input editor.
In flash player 9, the input editor is located close to the textinput field and 
move according to the text.
however for flash player 10, the text editor is located at upper left corner of 
the application and does not move according to the text.

any idea ?



[flexcoders] Re: Displaying additional child nodes in Datatip

2010-01-14 Thread turbo_vb
If the dataTipFunction doesn't give you enough flexibility, you could try a 
dataTipRenderer.  In either case, you can drill down to the child nodes there.

-TH

--- In flexcoders@yahoogroups.com, "Monette"  wrote:
>
> The line chart displays multiple series created with the seriesDataFunction 
> (assigning the x and y points).  The XML file includes additional child nodes 
> per item that I would like to include in the datatip.  How do I include those 
> items?  When I use o.item.rate, it lists all the rates for each series in the 
> datatip.
> Thanks.
> Monette
>




[flexcoders] Re: Help: Line chart multiple series datatip

2010-01-14 Thread turbo_vb
Think that you're looking for the dataTipFunction.

-TH

--- In flexcoders@yahoogroups.com, "Monette"  wrote:
>
> I assigned the y and x axis to each series in a line chart.  I need to 
> include additional information for each datapoint in the datatip from the XML 
> file. How can this be accomplished?
> Thanks.
>




[flexcoders] Flex4: getChildById or getElementById

2010-01-14 Thread ondina_fd
Hi,
Oftentimes I need to check if a component( for example a TextInput) exists 
before populating it with data. 
The getChildByName()is the only method I know of that can do this.
I wish there was a getChildById() as well, so I wouldn't have to set the name 
for all my components( could be hundreds )in addition to their id.
[
If the component( myComponentId ) doesn't exist:
this["myComponentId"] throws the RE ReferenceError: Error #1069
and 
this.contains(myComponentId) doesn't compile of course
1120: Access of undefined property myComponentId.   
]
I know, Christmas time is over, no more gifts for us from Adobe:)
Should I put it on my next flex-xmas list?
Or do you guys know about other ways of checking the existence of components? 
Cheers,
Ondina

P.S. My message didn't show up the first time. Hopefully it won't appear   
twice! If so I'm really sorry. 



[flexcoders] Help: Line chart multiple series datatip

2010-01-14 Thread Monette
I assigned the y and x axis to each series in a line chart.  I need to include 
additional information for each datapoint in the datatip from the XML file. How 
can this be accomplished?
Thanks.



[flexcoders] Flex4: getChildById or getElementById

2010-01-14 Thread Ondina F
Hi,
Oftentimes I
need to check if a component( for example a  TextInput) exists before 
populating it with data. 
The getChildByName()is
the only method I know of, that can do this.
I wish there was
a getChildById() as well, so I wouldn’t have to set the name for all my
components( could be hundreds )in addition to their id.
[
If the
component( myComponent ) doesn’t exist:
this[“myComponent”]
throws the RE ReferenceError: Error #1069
and 
this.contains(myComponent)
doesn’t compile of course
1120: Access of
undefined property myComponentId.
]
I know,
Christmas time is over, no more gifts for us from Adobe:)
Should I put it
on my next flex-xmas list?
Or do you guys
know about other ways of checking the existence of components? Any input would
be much appreciated.
Cheers,

Ondina
P.S. My message
didn’t show up on the mailing
list after tryingto create
a new topic on the Yahoo Groups. I must have done something wrong. Sorry for
any inconvenience I might have caused.


  

[flexcoders] Displaying additional child nodes in Datatip

2010-01-14 Thread Monette
The line chart displays multiple series created with the seriesDataFunction 
(assigning the x and y points).  The XML file includes additional child nodes 
per item that I would like to include in the datatip.  How do I include those 
items?  When I use o.item.rate, it lists all the rates for each series in the 
datatip.
Thanks.
Monette



[flexcoders] Re: Flex Video and Firefox Issue

2010-01-14 Thread arocheking
In case someone else has this same problem. 
Here is the solution.

set apache to turn off gzip compression 
in httpd.config (or could do it in .htaccess) we added m4v to the following 
line.

# Don't compress images
SetEnvIfNoCase Request_URI \
\.(?:gif|jpe?g|png|m4v)$ no-gzip dont-vary

OR more broadly you could use:

SetEnv no-gzip dont-vary

More info-

From:
http://www.longtailvideo.com/support/forum/Setup-Problems/19359/FLV-won-t-play-in-Firefox

But there is a serious other reason, why flv / f4v files are not played in 
Firefox, but in IE and maybe other browsers.

The reason is Apache itself. Even the latest version (2.2.13) - what we have 
freshly compiled for our Sun Sparc Platforms, has a problem to produce the 
correct header for flv files.

This incorporates that Apache - even if you added the correct mime type for flv 
/ f4v files to mime.types or in httpd.conf as AddType - does not add the 
content-length to the http header.

On IE it works fine, the flash player streams until the web server has the flv 
file served completely.

Not so on Firefox, especially not on some Unix Systems. Your Flash Movie Player 
just keeps on telling you he is buffering the movie, though you can trace from 
the apache transfer log, that the file has benn already transmitted completely. 
But the movie won't start at all.

This unexpected behavior occurs even with having in use the same flash player 
version in IE and Firefox.

-- John --



[flexcoders] flex-iframe (resize panel container based on html doc height)

2010-01-14 Thread flexfortress
I have been tasked with a proof of concept for a Flex application, and I've 
been asked to render html within a panel and have the panel resize during 
runtime depending upon the height of the html content.

I've check out the code for Christophe's exmaple - which is a good start:
http://www.deitte.com/IFrameDemo3/IFrameDemo.html

However, I need to have the panel resize on the fly; therefore, making the 
browser implement scrollbars, and not the panel.

I checked out flex-iframe which looks very promising, but I have not been able 
to get the examples to render.
http://code.google.com/p/flex-iframe/

Any help?  Insights?  Has anyone dealt with this?  (I know iframes blow, but 
it's a requirement)  

It seems like I can embed a Javascript function in the html file that announces 
the dimensions to ActionScript and then an AS function resizes the panel - 
which one of the flex-iframe examples proves. but, so far, I haven't been able 
to do this.

Thanks for any assistance!

David



[flexcoders] Flex4: getChildById or getElementById

2010-01-14 Thread ondina_fd
Hi,
Oftentimes I need to check if a component( for example a  TextInput) exists 
before populating it with data. 
The getChildByName()is the only method I know of that can do this.
I wish there was a getChildById() as well, so I wouldn't have to set the name 
for all my components( could be hundreds )in addition to their id.
[
If the component( myComponentId ) doesn't exist:
this["myComponentId"] throws the RE ReferenceError: Error #1069
and 
this.contains(myComponentId) doesn't compile of course
1120: Access of undefined property myComponentId.   
]
I know, Christmas time is over, no more gifts for us from Adobe:)
Should I put it on my next flex-xmas list?
Or do you guys know about other ways of checking the existence of components? 
Cheers,
Ondina



[flexcoders] apply style in newly created component

2010-01-14 Thread hworke


Hi I am trying to apply style in a newly created component
but since it is not instantiated it gives me error message.

My code is like this:

var button:Button = new Button;
button.setStyle("styleName", "myStyle");
canvas.addChild(button);
I need to create the component dynamically and also need
to apply the style dynamically. How can I do that?

Regards,



[flexcoders] flex 4 text styling

2010-01-14 Thread Ariel J
In the language reference, I see styles such as fontSharpness and 
fontAntiAliasType for Label, but I am not seeing them as styles for the spark 
Label or RichText. Are they no longer being used?



[flexcoders] Re: asdoc "Error: Property is write-only."

2010-01-14 Thread Mike
I also get the same error any time Math.ceil() or Math.floor() is used in 
another file.  Math.min() and Math.max() do not generate the error message.



[flexcoders] Re: A strange observation on TextInputs

2010-01-14 Thread s_grollins
Yea it only happens with Firefox for me too (at least with the app I'm working 
on right now).

--- In flexcoders@yahoogroups.com, "tc"  wrote:
>
> 
> 
> I have noticed this and also that arrow up and arrow down will jump two rows 
> at a time instead of one. (I don't remember which control(s) that was in, 
> tho.) Like you, I have not investigated further. I mostly use Firefox 
> browser, which may be relevant.
> 
> --- In flexcoders@yahoogroups.com, "s_grollins"  wrote:
> >
> > Hi everyone,
> > 
> > I had noticed something a month ago on an app I worked on at work -- 
> > basically if you typed in the text input controls then pressed the arrow 
> > keys to move left or right, it would move 2 spaces left or right. I 
> > couldn't track it down, but I admit I didn't try too hard because there 
> > wasn't a ticket for it.
> > 
> > Anyways I've noticed this once again on a completely different project 
> > which uses *nothing* from the previous project (that is, no shared modules, 
> > components, projects, rsls, whatever else).
> > 
> > Has anyone ever come across this and if so were you able to fix it?
> >
>




[flexcoders] What server do I put my crossdomain.xml file on?

2010-01-14 Thread Matthew
Hi - 

I have a Flex app that uses an HTTPService to call a Servlet. The servlet 
retrieves a file on another domain and passes back to Flex where they are 
prompted by a Windows dialog to either save or open it: It works fine locally. 

When deployed, I get this error:

Error #2044: Unhandled SecurityErrorEvent:. text=Error #2048: Security sandbox 
violation: http://bopswdmmk1:15010/oats/FlexClient/OATSMain.swf cannot load 
data from 
http://da803299:8080/oats/FTPFile?filename=/oats/oatsftp/feed/Session.csv.01062010.

I'm assuming this is because I need a crossdomain.xml file, right? If so, where 
do I put it? On the domain that hosts the servlet, or the domain the file is 
retrieved from? 

Crossdomain issues can be confusing and any insight would be greatly 
appreciated. 

Thanks,

Matt



[flexcoders] asdoc "Error: Property is write-only."

2010-01-14 Thread Mike
I'm having an issue with asdoc.  I've tried asdoc.exe from SDK 3.2, 3.3 and 
3.5; the same error always appears:

Error: Property is write-only.
 [exec] Math.pow(10, 2);
 [exec] ^

I've tried putting that statement in other files, and it does not generate an 
error.  If I put that statement anywhere in the class that it belongs to, the 
error appears.  Something about this class triggers the error message.  If it 
put the statement in a subclass of the problem class, no error results.

Suggestions?

Mike



[flexcoders] Problem working with webservices and exceptions

2010-01-14 Thread Jorge Silva
Hi everyone!
I have a problem when working with webservices and backend exceptions.
This is the situation:
I have a backend written  in Java, and a frontend in Flex 3, both connected
through web services. For the TOs (transfer objects) I use the Import Web
Services tool provided by Flex Builder.
Everything works fairly fine... but I have an issue when the backend throws
an exception.
This is the code:

public class SecurityMainService extends MovieClip
> {
>
>
  private var securityService:SecurityWS = new SecurityWS();
>
>
> public function SecurityMainService()
> {
> super();
>
> this.securityService.addSecurityWSFaultEventListener(errorHandler);
> }
>
> public function errorHandler(event:FaultEvent):void{
> Assets.show_alert_alert(event.fault.faultString);
> }
>
> public function deleteRole(aRole:Role, handler:Function):void{
> this.securityService.adddeleteRoleEventListener(handler);
> var arg:DeleteRole = new DeleteRole();
> arg.arg0 = aRole.id;
> this.securityService.deleteRole(arg);
> }
>

 When the backend throws an exception, the errorHandler is called. The
backend sends me a custom exception, and i can see it in the raw http
response, but here, in the FaultEvent object, it seems that is lost... it
suppoused to be inside fault attribute, but it's not.
So, the question is, what I'm doing wrong?
I hope you understand. Let me know if you need more detail to give me a
hand.
Thanks in advance!
Cheers,
Jorge


Re: [flexcoders] Flex address/handle for toString() tracing

2010-01-14 Thread Alex Harui
There is no API for it.  Maybe someday


On 1/14/10 5:03 AM, "yaksaver"  wrote:






Hi,

How can one programmatically retrieve the address / handle that is seen in Flex 
Debugger?

Example:
  flash.system.ApplicationDomain (@788d1f1)

Background:
Classes without an explicit toString() method give the default Object String 
(e.g. "[object ApplicationDomain]") for trace() or logging statements.  This 
means one cannot spot the difference between different instances in the logs.

In Java (sorry, yes I'm more a Java guy but have been using Flex for the last 
6-odd months), the default toString() method gives the instance handle (the 
address-like thing).

Obviously, this exists within the AVM.  So my question is how to access it 
programmatically?  (perhaps some namespace, perhaps some me! thod we've 
overlooked?)

Some thoughts:

 *   The tripple-equals test must compare by this value so things like 
Dictionary must be indexing off it (but we can't find the source for this class)
 *
 *   It would be an obvious thing to use as default for a hash-table 
implementation.
 *   Obviously, since it's used for sending and offlining, describeType() 
doesn't include this information. (it would change per run)
 *
 *   ObjectUtil.toString() gives a something with "#0" at the end rather than 
this instance info.

All hints and thoughts welcome!
Cheers,
YakS[h]aver R.





--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui


[flexcoders] Re: styleFunction on adv datagrid

2010-01-14 Thread valdhor
Have you tried using an item renderer instead?

--- In flexcoders@yahoogroups.com, Nick Middleweek  wrote:
>
> Hello,
> 
> I've got a groupingCollection as the dataProvider for my adv data grid (ADG)
> and I've got a styleFunction attached to the ADG to set the text color to
> grey.
> 
> The groupingCollection is collapsed to start with and when I expandthe tree
> nodes, the rows come into show but they are rendered in the old color during
> the time it takes for the grouping node to expand, then it switches to the
> grey color.
> 
> I can only assume that the styleFunction is being executed after the
> grouping is fully expanded.
> 
> Is there a way around this because it doesn't behave this way with a flat
> dataProvider and it's causing a visible color change which isn't great on
> the eye...
> 
> 
> Thanks in advance,
> N
>




[flexcoders] styleFunction on adv datagrid

2010-01-14 Thread Nick Middleweek
Hello,

I've got a groupingCollection as the dataProvider for my adv data grid (ADG)
and I've got a styleFunction attached to the ADG to set the text color to
grey.

The groupingCollection is collapsed to start with and when I expandthe tree
nodes, the rows come into show but they are rendered in the old color during
the time it takes for the grouping node to expand, then it switches to the
grey color.

I can only assume that the styleFunction is being executed after the
grouping is fully expanded.

Is there a way around this because it doesn't behave this way with a flat
dataProvider and it's causing a visible color change which isn't great on
the eye...


Thanks in advance,
N


[flexcoders] Flex address/handle for toString() tracing

2010-01-14 Thread yaksaver
Hi,

How can one programmatically retrieve the address / handle that is seen
in Flex Debugger?

Example:
   flash.system.ApplicationDomain (@788d1f1)

Background:
Classes without an explicit toString() method give the default Object
String (e.g. "[object ApplicationDomain]") for trace() or logging
statements.  This means one cannot spot the difference between different
instances in the logs.

In Java (sorry, yes I'm more a Java guy but have been using Flex for the
last 6-odd months), the default toString() method gives the instance
handle (the address-like thing).

Obviously, this exists within the AVM.  So my question is how to access
it programmatically?  (perhaps some namespace, perhaps some method we've
overlooked?)

Some thoughts:
* The tripple-equals test must compare by this value so things like
Dictionary must be indexing off it (but we can't find the source for
this class)

* It would be an obvious thing to use as default for a hash-table
implementation.
* Obviously, since it's used for sending and offlining,
describeType() doesn't include this information. (it would change per
run)

* ObjectUtil.toString() gives a something with "#0" at the end rather
than this instance info.

All hints and thoughts welcome!
Cheers,
YakS[h]aver R.