RE: [flexcoders] Best language for remoting

2008-12-09 Thread Gregor Kiddie
We, on this list, have yet to come up with a consensus on *anything*,
so good luck with that.

I dunno... we could probably come up with a consensus that you rock!
(Oh, and that you aren't a girl ;) )

 

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

Registered address: The Bread Factory, 1a Broughton Street, London SW8
3QJ

Registered Number: 1788577

Registered in the UK

Visit our Internet Web site at www.inps.co.uk
blocked::http://www.inps.co.uk/ 

The information in this internet email is confidential and is intended
solely for the addressee. Access, copying or re-use of information in it
by anyone else is not authorised. Any views or opinions presented are
solely those of the author and do not necessarily represent those of
INPS or any of its affiliates. If you are not the intended recipient
please contact [EMAIL PROTECTED]



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tracy Spratt
Sent: 09 December 2008 01:00
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Best language for remoting

 

We, on this list, have yet to come up with a consensus on *anything*, so
good luck with that.

 

Tracy

 





RE: [flexcoders] AIR as GUI on Linux

2008-12-09 Thread James Ward
I've been exploring using File IO in AIR to connect to DBUS on Linux as a way 
to communicate between AIR apps and other applications.  Nothing to show yet 
but it certainly seems possible.  There is already a JavaScript DBUS API that 
could be partially ported.

Would that work?

-James


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ben 
Cessa
Sent: Sunday, December 07, 2008 2:27 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] AIR as GUI on Linux


I'm starting with Flex/AIR and I wanna build some apps as GUI for some
shell programs like: portage from Gentoo and a DHCP server, may big
doubt here is this: what's the best way to communicate which such
programs from an AIR application or what can I use as middleware
between both.

I really hope that someone with more experience can point me in the
right direction on this one. Thanx a lot for your help.

inline: image001.jpginline: image002.jpg

Re: [flexcoders] Parsley MVC :: some thoughts

2008-12-09 Thread Jules Suggate
How can something be asynchronous but not concurrent? Asynchronous
means that control returns from the function call immediately although
the transaction triggered by the call may still be ongoing. To me,
that absolutely *requires* concurrency, even if it's simulated through
a timeslicing scheduler or some such.

I'm pretty sure for something to be asynchronous there has to be some
sort of interleaving.

That's the whole point of what I just realised: there is no such
interleaving within the Flex framework. Event dispatch in Flex/Flash
is a *blocking* operation. There's no scheduler or anything within the
event bus. Maybe your handlers will make calls to a truly asynchronous
API like network calls or something, but until they make that call and
return control to the code that dispatched the event, the next line of
code in your event producer object will *not* execute.

I'm just freaked out that I never realised this. How have my
applications even been *usable* until now?!?!? Pure luck and good
API design from Adobe/Macromedia.

Cheers to the Player team!

On Tue, Dec 9, 2008 at 03:02, Paul Andrews [EMAIL PROTECTED] wrote:
 They are asynchronous but they aren't concurrent.

 Paul

 - Original Message -
 From: Jules Suggate [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Monday, December 08, 2008 1:59 PM
 Subject: Re: [flexcoders] Parsley MVC :: some thoughts

 boom head explodes heh!

 I have been happily thinking the whole time that events really *are*
 asynchronous, but that's obviously not true. Reality check...

 Thanks guys. I think I might have run out of reasons *not* to use Parsley
 :)

 On Tue, Dec 9, 2008 at 01:06, Paul Andrews [EMAIL PROTECTED] wrote:
 - Original Message -
 From: Jules Suggate [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Monday, December 08, 2008 6:49 AM
 Subject: [flexcoders] Parsley MVC :: some thoughts

 Anyone used Parsley MVC? I'm a bit confused by it.

 There's the standard MVC FrontController class, which exposes a method
 dispatchEvent() for app-wide notifications. It also has a concept of
 interceptors which is nice... so far so good.

 BUT... that dispatchEvent() call executes *synchronously*. Control
 won't return to your code until *every single listener* to that event
 finishes executing!! In a single-threaded environment like Flash
 Player, I would have thought this to be a disastrous design
 decision... can anyone shed any light on this, as I'm sure there's
 something I'm missing here!

 Why is it disastrous? The flash player is single threaded so it's not
 possible have concurrently running code (something I think that Adobe
 should
 address in the future) so why shouldn't all the waiting listeners be
 called?

 It's not possible to resume execution elsewhere while a listener is still
 active because that would require semaphores to handle pseudo concurrency
 and I'm sure that holds true not just for the listeners themselves but
 also
 for the mechanism that calls the waiting listeners.

 Paul


 TIA,
 +J

 PS another thing I haven't figured out yet is how to inject
 dependencies into a View component... it seems Parsley can only inject
 into objects that have been created in the Parsley config file ... and
 because View components are instantiated by the Flex framework, from
 what I can tell Parsley has no way to reference them... this has the
 unpleasant side-effect of requiring all my View code to access the
 FrontController directly through the FrontController.root static
 property.

 In fact, the FrontController class is bugging me -- it is a concrete
 class with no abstract interface I can code to. It's making me nervous
 about lock-in to the Parsley framework.

 Kinda goes against the whole IoC thing, no?

 PPS And yeah, I will post this to the Parsley forums, but I want the
 esteemed opinion of those on this list too!

 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location:


 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
 Links






 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location:

 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
 Links




 


[flexcoders] Re: Charts Datatip hide delay

2008-12-09 Thread pratikshah83
Thanks for your reply. I would just like to know. Is there a way to
use the detaTipRenderer style already available to delay the display
of the tooltip. 

I am aware of having event on items and handle it separately. But just
wanted to know if there is something like hideDelay available in
tooltipmanager.

Thanks
Pratik
 

--- In flexcoders@yahoogroups.com, Brendan Meutzner [EMAIL PROTECTED]
wrote:

 An example based on DataGrid control... could be modified for use with
 Series item renderers on a chart easily enough based on mouse events
as I
 have for the Datagrid here already:
 http://www.meutzner.com/blog/attachments/menu_tooltip/
 
 
 HTH,
 
 Brendan
 
 
 
 On Mon, Dec 8, 2008 at 7:21 PM, pratikshah83 [EMAIL PROTECTED] wrote:
 
Help would really be appreciated.
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
  pratikshah83 pratikshah83@
  wrote:
 
  
   Hi Guys,
  
   I would like to know how to delay the hiding of datatip for charts.
  
   I am planning to have a URL in the datatip. But when I move the
mouse
   it destroys the datatip. I would like to delay it so that the
user can
   move over the tooltip and click the URL, I can destroy it on
mouse out
   event.
  
   Replies in this regards will be highly appreciated.
  
   Thanks
   Pratik
  
 
   
 
 
 
 
 -- 
 Brendan Meutzner
 http://www.meutzner.com/blog/





Re: [flexcoders] Parsley MVC :: some thoughts

2008-12-09 Thread Josh McDonald
Not exactly, asynchronous simply means your event handler will fire some
time in the future, rather than when you call addEventListener(). Not
everything is a blocking dispatch, either IIRC. Concurrent means there's
multiple things going on at the same time. Most of the time there's
*nothing* going on, really :)

On Tue, Dec 9, 2008 at 6:55 PM, Jules Suggate [EMAIL PROTECTED]wrote:

 How can something be asynchronous but not concurrent? Asynchronous
 means that control returns from the function call immediately although
 the transaction triggered by the call may still be ongoing. To me,
 that absolutely *requires* concurrency, even if it's simulated through
 a timeslicing scheduler or some such.

 I'm pretty sure for something to be asynchronous there has to be some
 sort of interleaving.

 That's the whole point of what I just realised: there is no such
 interleaving within the Flex framework. Event dispatch in Flex/Flash
 is a *blocking* operation. There's no scheduler or anything within the
 event bus. Maybe your handlers will make calls to a truly asynchronous
 API like network calls or something, but until they make that call and
 return control to the code that dispatched the event, the next line of
 code in your event producer object will *not* execute.

 I'm just freaked out that I never realised this. How have my
 applications even been *usable* until now?!?!? Pure luck and good
 API design from Adobe/Macromedia.

 Cheers to the Player team!

 On Tue, Dec 9, 2008 at 03:02, Paul Andrews [EMAIL PROTECTED] wrote:
  They are asynchronous but they aren't concurrent.
 
  Paul
 
  - Original Message -
  From: Jules Suggate [EMAIL PROTECTED]
  To: flexcoders@yahoogroups.com
  Sent: Monday, December 08, 2008 1:59 PM
  Subject: Re: [flexcoders] Parsley MVC :: some thoughts
 
  boom head explodes heh!
 
  I have been happily thinking the whole time that events really *are*
  asynchronous, but that's obviously not true. Reality check...
 
  Thanks guys. I think I might have run out of reasons *not* to use
 Parsley
  :)
 
  On Tue, Dec 9, 2008 at 01:06, Paul Andrews [EMAIL PROTECTED] wrote:
  - Original Message -
  From: Jules Suggate [EMAIL PROTECTED]
  To: flexcoders@yahoogroups.com
  Sent: Monday, December 08, 2008 6:49 AM
  Subject: [flexcoders] Parsley MVC :: some thoughts
 
  Anyone used Parsley MVC? I'm a bit confused by it.
 
  There's the standard MVC FrontController class, which exposes a method
  dispatchEvent() for app-wide notifications. It also has a concept of
  interceptors which is nice... so far so good.
 
  BUT... that dispatchEvent() call executes *synchronously*. Control
  won't return to your code until *every single listener* to that event
  finishes executing!! In a single-threaded environment like Flash
  Player, I would have thought this to be a disastrous design
  decision... can anyone shed any light on this, as I'm sure there's
  something I'm missing here!
 
  Why is it disastrous? The flash player is single threaded so it's not
  possible have concurrently running code (something I think that Adobe
  should
  address in the future) so why shouldn't all the waiting listeners be
  called?
 
  It's not possible to resume execution elsewhere while a listener is
 still
  active because that would require semaphores to handle pseudo
 concurrency
  and I'm sure that holds true not just for the listeners themselves but
  also
  for the mechanism that calls the waiting listeners.
 
  Paul
 
 
  TIA,
  +J
 
  PS another thing I haven't figured out yet is how to inject
  dependencies into a View component... it seems Parsley can only inject
  into objects that have been created in the Parsley config file ... and
  because View components are instantiated by the Flex framework, from
  what I can tell Parsley has no way to reference them... this has the
  unpleasant side-effect of requiring all my View code to access the
  FrontController directly through the FrontController.root static
  property.
 
  In fact, the FrontController class is bugging me -- it is a concrete
  class with no abstract interface I can code to. It's making me nervous
  about lock-in to the Parsley framework.
 
  Kinda goes against the whole IoC thing, no?
 
  PPS And yeah, I will post this to the Parsley forums, but I want the
  esteemed opinion of those on this list too!
 
  
 
  --
  Flexcoders Mailing List
  FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Alternative FAQ location:
 
 
 
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
  Search Archives:
  http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
  Links
 
 
 
 
 
 
  
 
  --
  Flexcoders Mailing List
  FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Alternative FAQ location:
 
 
 

Re: [flexcoders] Parsley MVC :: some thoughts

2008-12-09 Thread Paul Andrews
Jules, I confess I actually misread your original post - I had anticipated 
that when an event is despatch it wouldn't be actioned until the current 
code section had been completed then the player would act upon events 
awaiting despatch.

On the face of it, if events are despatched and all handlers invoked 
synchronously before the next statement runs then there's an opportunity for 
an unexpected race condition if handlers are updating the same data 
structures as the code that despatched the event. Like you I would be 
surprised at this behaviour and I might try and check that out for myself 
later today.

So you are right my comments don't match your findings. I don't have a 
problem with the event despatcher invoking all handlers for an event in 
sequence - event handling has a predefined order through the display list, 
but there's no guarantee that multiple handlers at the same place in the 
hierarchy will be invoked in a set sequence.

I'm somewhat surprised at your assertion that despatching an event will 
invoke handlers for that event synchronously - it would be interesting to 
get a better handle on this from someone who knows thelow-level mechanism 
more intimately than I do. My event handling code doesn't anticipate that 
despatched events are handled syncronously and as i've already said, there's 
always a danger of an unexpected race condition if that were true.

In my previous life writing a lot of code running on multiprocessor systems 
we took great care to control asynchronous behaviour and to protect data 
structures from multiple updates using semaphores. In a faux system like the 
flash player, there isn't true concurrency, but if what you say is true 
there would be a real potential of getting an unwanted side-effect since 
effectively shared data structures would be open to being updated 
unexpectedly whenever an event is despatched.

So, I'm kinda with you.

Paul

- Original Message - 
From: Jules Suggate [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Tuesday, December 09, 2008 8:55 AM
Subject: Re: [flexcoders] Parsley MVC :: some thoughts


 How can something be asynchronous but not concurrent? Asynchronous
 means that control returns from the function call immediately although
 the transaction triggered by the call may still be ongoing. To me,
 that absolutely *requires* concurrency, even if it's simulated through
 a timeslicing scheduler or some such.

 I'm pretty sure for something to be asynchronous there has to be some
 sort of interleaving.

 That's the whole point of what I just realised: there is no such
 interleaving within the Flex framework. Event dispatch in Flex/Flash
 is a *blocking* operation. There's no scheduler or anything within the
 event bus. Maybe your handlers will make calls to a truly asynchronous
 API like network calls or something, but until they make that call and
 return control to the code that dispatched the event, the next line of
 code in your event producer object will *not* execute.

 I'm just freaked out that I never realised this. How have my
 applications even been *usable* until now?!?!? Pure luck and good
 API design from Adobe/Macromedia.

 Cheers to the Player team!

 On Tue, Dec 9, 2008 at 03:02, Paul Andrews [EMAIL PROTECTED] wrote:
 They are asynchronous but they aren't concurrent.

 Paul

 - Original Message -
 From: Jules Suggate [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Monday, December 08, 2008 1:59 PM
 Subject: Re: [flexcoders] Parsley MVC :: some thoughts

 boom head explodes heh!

 I have been happily thinking the whole time that events really *are*
 asynchronous, but that's obviously not true. Reality check...

 Thanks guys. I think I might have run out of reasons *not* to use 
 Parsley
 :)

 On Tue, Dec 9, 2008 at 01:06, Paul Andrews [EMAIL PROTECTED] wrote:
 - Original Message -
 From: Jules Suggate [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Monday, December 08, 2008 6:49 AM
 Subject: [flexcoders] Parsley MVC :: some thoughts

 Anyone used Parsley MVC? I'm a bit confused by it.

 There's the standard MVC FrontController class, which exposes a method
 dispatchEvent() for app-wide notifications. It also has a concept of
 interceptors which is nice... so far so good.

 BUT... that dispatchEvent() call executes *synchronously*. Control
 won't return to your code until *every single listener* to that event
 finishes executing!! In a single-threaded environment like Flash
 Player, I would have thought this to be a disastrous design
 decision... can anyone shed any light on this, as I'm sure there's
 something I'm missing here!

 Why is it disastrous? The flash player is single threaded so it's not
 possible have concurrently running code (something I think that Adobe
 should
 address in the future) so why shouldn't all the waiting listeners be
 called?

 It's not possible to resume execution elsewhere while a listener is 
 still
 active because that would 

Re: [flexcoders] Re: interface layout help

2008-12-09 Thread Paul Andrews
There's no real difference between clicking on a tile and clicking on a row 
in a  datagrid - they both work from the same dataprovider.

- Original Message - 
From: stinasius [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Tuesday, December 09, 2008 10:00 AM
Subject: [flexcoders] Re: interface layout help


i think that having a tile list is great but then hw do i bring up the
 map and the virtual tour when one needs details on property?



[flexcoders] Resize and Movw effect to air main native window

2008-12-09 Thread abhishekchess1
hello frnds,

I have  air application, in that i have 1 canvas which contain 1
component page,
canvas has height=0 at first,
When user clicks on increase btn it should increase  to top , when
user clicks on decrease it should go again to  height=0;
both should work with effect , but it is not working,
is any idea?

thx in advanced
:)
[EMAIL PROTECTED]



Re: [flexcoders] Re: interface layout help

2008-12-09 Thread Paul Andrews
acrobat.com is using transitions to ease the view from one state to another. 
There's nothing stopping you from doing the same. The real trick to making 
slick interfaces is skill and experience, so it takes time. I'm still 
working on it.

You shouldn't be too hard on yourself. Some people make interfaces look 
simple - they didn't acheive that skill on day one.

Paul
- Original Message - 
From: stinasius [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Tuesday, December 09, 2008 11:18 AM
Subject: [flexcoders] Re: interface layout help


 what am saying is that i would like to deliver info on demand in a way
 that is easy to understand and fluid. for example have just the tile
 view with the option of jumping to a datagrid view, then show the map
 and virtual tour when needed all in a fluid way and easy to
 understand. for example acrobat.com can give you an idea


 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location: 
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives: 
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups 
 Links






[flexcoders] huge AMF messages

2008-12-09 Thread Robin Burrer

Hi all,

I planning to build an  AIR application. In this application the user  
can create libraries that consist of multiple value Entry objects.


Each EntryVO should look like this (there will be more properties of  
course) :


package vo
{
[RemoteClass(alias=vo.EntryVO)]

import flash.net.registerClassAlias;
import flash.utils.ByteArray;

public class EntryVO
{
[Bindable]
public var image_data:ByteArray;

[Bindable]
public var image_name:String;


public static  function register():void
{   
registerClassAlias(vo.EntryVO, EntryVO);
}

}   

}


To simplify the uploading and downloading process I want to transfer  
images as ByteArrays to a .NetBackend.
My question: What are my limitations here file size wise?  Let's say I  
have 10 EntryVO. An each of these

has an 1 MB byte array embedded.

That means that my libraryVO (10 x 1 MB EntryVO)  would have a file  
size of 10 MB.


Will this work at all? Is there a progress event for remote  
operations? I guess it will take a while to transfer

a 10 MB AMF message.


Thanks for any input!


Cheers

Robin









[flexcoders] Re: interface layout help

2008-12-09 Thread stinasius
i think that having a tile list is great but then hw do i bring up the
map and the virtual tour when one needs details on property?



[flexcoders] vertical scrollbar problems...Please help i am freaking out :-)

2008-12-09 Thread fotis.chatzinikos
Hello all, I do not know how many hours i have spend playing around
with scroll policies, heights, tops and bottoms...but still no solution.

The application layout is the following:

HBOX
LEFT VBOX
RIGHT VBOX
--PANEL
--VIEW STACK
PANEL 1 (lets say 200 pixels height)
PANEL 2 (lets say 500 pixels height)

Initialy, The viewstack show Panel 1, and when i play with smaller
screen sizes, ie make firefox smaller than my monitor's full height a
vertical scroll bar appears correctly (when panel 1 bottom reaches the
bottom of the browser window)...

The problem appears when i switch to the second panel in the viewstack
(selectedIndex==1). The scrollbar appears and disappears, but it seems
that the measuredHeight is wrong! The scrollbar only appears when the
screen becomes less than the height of the first panel which is 300
pixels less height than the second panel making the application not
usable as 300 pixels of panel 2 are hidden...

Does it pop any ideas? The viewstack's resizeToContent is true...

Thanks,
Fotis



[flexcoders] Flex Builder caching PNGs

2008-12-09 Thread tom s
I'm @Embedding some PNGs to skin some buttons.
If I Run once, then edit the PNG file, then Run again I get the old PNG (w/o
the edits), not the new one.
My current work-around is to rename the file after each change, but this is
a pain.

How do I get Flex Builder to not cache the PNGs / to check for changes on
each compile?

thanks

tom


[flexcoders] speed of the for each looping

2008-12-09 Thread Cato Paus
Hi, all you experts :)

I'm tying to speed up my application and I use a lot of
 
exsample
for (var i:int = 0; i  5; i++)
{
   trace(i);
} 


so is the for each looping faster ?



RES: [flexcoders] vertical scrollbar problems...Please help i am freaking out :-)

2008-12-09 Thread Luciano Manerich Junior
Got that same issue few days ago..

Ive just swap the Panels, putting the higher first... Not that good solution, 
but, it has no problems for me.

What you could try is, add canvas as child of the viewStack and panels as child 
of the canvas, resulting in a vertical scroll inside the canvas, not on the 
view stack.

Set canvas to use full width and height...

Not a solution, just a work around. 

-Mensagem original-
De: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Em nome de 
fotis.chatzinikos
Enviada em: terça-feira, 9 de dezembro de 2008 11:10
Para: flexcoders@yahoogroups.com
Assunto: [flexcoders] vertical scrollbar problems...Please help i am freaking 
out :-)

Hello all, I do not know how many hours i have spend playing around with scroll 
policies, heights, tops and bottoms...but still no solution.

The application layout is the following:

HBOX
LEFT VBOX
RIGHT VBOX
--PANEL
--VIEW STACK
PANEL 1 (lets say 200 pixels height) PANEL 2 (lets say 500 
pixels height)

Initialy, The viewstack show Panel 1, and when i play with smaller screen 
sizes, ie make firefox smaller than my monitor's full height a vertical scroll 
bar appears correctly (when panel 1 bottom reaches the bottom of the browser 
window)...

The problem appears when i switch to the second panel in the viewstack 
(selectedIndex==1). The scrollbar appears and disappears, but it seems that the 
measuredHeight is wrong! The scrollbar only appears when the screen becomes 
less than the height of the first panel which is 300 pixels less height than 
the second panel making the application not usable as 300 pixels of panel 2 are 
hidden...

Does it pop any ideas? The viewstack's resizeToContent is true...

Thanks,
Fotis




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Alternative FAQ location: 
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links





RES: [flexcoders] Flex Builder caching PNGs

2008-12-09 Thread Luciano Manerich Junior
Clean  Build Project?



De: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Em nome de tom s
Enviada em: terça-feira, 9 de dezembro de 2008 11:27
Para: flexcoders@yahoogroups.com
Assunto: [flexcoders] Flex Builder caching PNGs


I'm @Embedding some PNGs to skin some buttons. 
If I Run once, then edit the PNG file, then Run again I get the old PNG (w/o 
the edits), not the new one. 
My current work-around is to rename the file after each change, but this is a 
pain. 
 
How do I get Flex Builder to not cache the PNGs / to check for changes on each 
compile?
 
thanks
 
tom
 
 
 


RE: [flexcoders] Flex Builder caching PNGs

2008-12-09 Thread Jim Hayes
From what I can tell FB will not detect changes in files (images, and I
believe css files) by itself, so if you change one then run/debug it
will think nothings different and just show the last compiled version.
 
When I'm doing stuff like that, I've got into the habit of just
adding/deleting a space character to one of the mxml or .as files in the
project, which FB will then notice and force a recompile that *does*
update the resource in the build. It's at least easier than renaming a
whole file.
 
If there's a better way then I'm unaware of it I'm afraid. It does still
catch me out from time to time.
 
-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of tom s
Sent: 09 December 2008 13:27
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex Builder caching PNGs
 
I'm @Embedding some PNGs to skin some buttons. 
If I Run once, then edit the PNG file, then Run again I get the old PNG
(w/o the edits), not the new one. 
My current work-around is to rename the file after each change, but this
is a pain. 
 
How do I get Flex Builder to not cache the PNGs / to check for changes
on each compile?
 
thanks
 
tom
 
 
 

__
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] Parsley MVC :: some thoughts

2008-12-09 Thread Ralf Bokelberg
I'm confused. Let's clarify what we are talking about.

The event dispatching is fully synchronous.
If you call dispatchEvent, all event handlers are called, before the
next statement is executed.

Some processes (eg loading something from the backend or a timer)
dispatch events in an asynchronous manner. So they call dispatchEvent
at some unknown point in time

I think, this is how it works.

Cheers
Ralf.



On Tue, Dec 9, 2008 at 10:27 AM, Paul Andrews [EMAIL PROTECTED] wrote:
 Jules, I confess I actually misread your original post - I had anticipated
 that when an event is despatch it wouldn't be actioned until the current
 code section had been completed then the player would act upon events
 awaiting despatch.

 On the face of it, if events are despatched and all handlers invoked
 synchronously before the next statement runs then there's an opportunity for
 an unexpected race condition if handlers are updating the same data
 structures as the code that despatched the event. Like you I would be
 surprised at this behaviour and I might try and check that out for myself
 later today.

 So you are right my comments don't match your findings. I don't have a
 problem with the event despatcher invoking all handlers for an event in
 sequence - event handling has a predefined order through the display list,
 but there's no guarantee that multiple handlers at the same place in the
 hierarchy will be invoked in a set sequence.

 I'm somewhat surprised at your assertion that despatching an event will
 invoke handlers for that event synchronously - it would be interesting to
 get a better handle on this from someone who knows thelow-level mechanism
 more intimately than I do. My event handling code doesn't anticipate that
 despatched events are handled syncronously and as i've already said, there's
 always a danger of an unexpected race condition if that were true.

 In my previous life writing a lot of code running on multiprocessor systems
 we took great care to control asynchronous behaviour and to protect data
 structures from multiple updates using semaphores. In a faux system like the
 flash player, there isn't true concurrency, but if what you say is true
 there would be a real potential of getting an unwanted side-effect since
 effectively shared data structures would be open to being updated
 unexpectedly whenever an event is despatched.

 So, I'm kinda with you.

 Paul

 - Original Message -
 From: Jules Suggate [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Tuesday, December 09, 2008 8:55 AM
 Subject: Re: [flexcoders] Parsley MVC :: some thoughts

 How can something be asynchronous but not concurrent? Asynchronous
 means that control returns from the function call immediately although
 the transaction triggered by the call may still be ongoing. To me,
 that absolutely *requires* concurrency, even if it's simulated through
 a timeslicing scheduler or some such.

 I'm pretty sure for something to be asynchronous there has to be some
 sort of interleaving.

 That's the whole point of what I just realised: there is no such
 interleaving within the Flex framework. Event dispatch in Flex/Flash
 is a *blocking* operation. There's no scheduler or anything within the
 event bus. Maybe your handlers will make calls to a truly asynchronous
 API like network calls or something, but until they make that call and
 return control to the code that dispatched the event, the next line of
 code in your event producer object will *not* execute.

 I'm just freaked out that I never realised this. How have my
 applications even been *usable* until now?!?!? Pure luck and good
 API design from Adobe/Macromedia.

 Cheers to the Player team!

 On Tue, Dec 9, 2008 at 03:02, Paul Andrews [EMAIL PROTECTED] wrote:
 They are asynchronous but they aren't concurrent.

 Paul

 - Original Message -
 From: Jules Suggate [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Monday, December 08, 2008 1:59 PM
 Subject: Re: [flexcoders] Parsley MVC :: some thoughts

 boom head explodes heh!

 I have been happily thinking the whole time that events really *are*
 asynchronous, but that's obviously not true. Reality check...

 Thanks guys. I think I might have run out of reasons *not* to use
 Parsley
 :)

 On Tue, Dec 9, 2008 at 01:06, Paul Andrews [EMAIL PROTECTED] wrote:
 - Original Message -
 From: Jules Suggate [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Monday, December 08, 2008 6:49 AM
 Subject: [flexcoders] Parsley MVC :: some thoughts

 Anyone used Parsley MVC? I'm a bit confused by it.

 There's the standard MVC FrontController class, which exposes a method
 dispatchEvent() for app-wide notifications. It also has a concept of
 interceptors which is nice... so far so good.

 BUT... that dispatchEvent() call executes *synchronously*. Control
 won't return to your code until *every single listener* to that event
 finishes executing!! In a single-threaded environment like Flash
 

Re: [flexcoders] Flex Builder caching PNGs

2008-12-09 Thread Fotis Chatzinikos
Hi Tom,

I had the same problem, did not really found a good solution... It seems
that flex does some kind of trancoding and this does not pick up changed...

What worked is to delete all images, recompile the project, get some errors
on missing resources and then paste the new images and recompile

On Tue, Dec 9, 2008 at 3:26 PM, tom s [EMAIL PROTECTED] wrote:

   I'm @Embedding some PNGs to skin some buttons.
 If I Run once, then edit the PNG file, then Run again I get the old PNG
 (w/o the edits), not the new one.
 My current work-around is to rename the file after each change, but this is
 a pain.

 How do I get Flex Builder to not cache the PNGs / to check for changes on
 each compile?

 thanks

 tom


  




-- 
Fotis Chatzinikos, Ph.D.
Founder,
Phinnovation
[EMAIL PROTECTED],


[flexcoders] Call Flex from JavaScript

2008-12-09 Thread wkolcz
Using a set up in my ActionScript of:
ExternalInterface.addCallback(tagWithClosed,windowClosed);

How can I write a JavaScript function that calls 'tagWithClosed' to Flex when 
the user closes the window (window.close() ) or when they leave for another 
page?



[flexcoders] Invoking Flex fuction from Javascript for close.window

2008-12-09 Thread wkolcz
Using a set up in my ActionScript of:
ExternalInterface.addCallback(tagWithClosed,windowClosed);

How
can I write a JavaScript function that calls 'tagWithClosed' to Flex
when the user closes the window (window.close() ) or when they leave
for another page?


RE: [flexcoders] Re: Desperate Times...Desprate Messures: What is sent by HTTPRequest?

2008-12-09 Thread wkolcz
Figured it out. Wrapped the query in a try/catch that outputted to a pdf. It 
was the weirdest thing..same values hardcoded and sent, but the sent ones were 
truncated..

Now I just need to figure out how to write a javascript that calls to Flex and 
invokes a function on window.close...stay tuned.

Than you for your help Tracy.


From: Tracy Spratt [EMAIL PROTECTED]
Sent: Monday, December 08, 2008 4:53 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Desperate Times...Desprate Messures: What is sent 
by HTTPRequest? 

Also, have you yet managed to get Flex to communicate
with the server at all?   If not, that is job 1.   I'd advise simplifying 
things as much
as possible, like creating a simple page that accepts an HTTPService request (no
parameters) and returns a hard coded value (I advise xml).   Then, make that 
page an echo
page, that takes a single querystring parameter and returns it to the Flex
client.  Test that from a browser before you try it from Flex (using GET).  Then
use an htm form to submit the parm, then POST from Flex..   When you get that, 
you will be pretty much
in business.   Ah, also try it without https.  There are
some considerations with HTTPS, particularly with serving the Flex app from
http, but the data from https.  Google that.   Tracy

 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tracy 
Spratt
Sent: Monday, December 08, 2008
7:35 PM
To:flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re:
Desperate Times...Desprate Messures: What is sent by HTTPRequest?   That error 
typically means that flex failed to contact the
specified URL.   You said,  Ok, I see what is being sent.  How did you 
determine that?  You saw that where?   Tracy   

 From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED]
On Behalf Of wkolcz
Sent: Monday, December 08, 2008
6:01 PM
To:flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re:
Desperate Times...Desprate Messures: What is sent by HTTPRequest?   

I created
a form that submitted to the same page that the HTTPService sends to. It
inserts fine. The variables are there, I generated a document with them. What
needs to be sent back and how? This is the error I am getting:

faultCode:Server.Error.Request 

faultString:'HTTP request error' 

faultDetail:'Error: [IOErrorEvent type=ioError bubbles=false
cancelable=false eventPhase=2 text=Error #2032: Stream Error. URL:
https://ummciisdevweb22.med.umich.edu/videotracking/tracker.cfm;].
URL: https://ummciisdevweb22.med.umich.edu/videotracking/tracker.cfm' 

 From : Tracy Spratt [EMAIL PROTECTED]
Sent: Monday, December 08, 2008
1:26 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re:
Desperate Times...Desprate Messures: What is sent by HTTPRequest? That means 
Flex is sending the call with the data corrrectly. 
So then where is the error happening? Between CF and the Database?  Does
the CF Insert query work if you hard code the values?  What IS the error?   
Send something back to Flex.  Hard code it if necessary. 
I have never done either HTTPService or WebSevice calls without some return
data.  Maybe flex is trying work with a null.   I advise setting 
resultFormat=e4x for either RPC call
types.  I always send back a status node to flex.   Tracy   

 From: flexcoders@yahoogroups.com  [mailto:[EMAIL PROTECTED] On Behalf Of wkolcz
Sent: Monday, December 08, 2008
3:56 PM
To:flexcoders@yahoogroups.com
Subject: re: [flexcoders] Re:
Desperate Times...Desprate Messures: What is sent by HTTPRequest?   

Ok, I see
what is being sent. If I dump them to a pdf, I can see them fine. 

cfdocument
format=PDF overwrite=yes filename=whatyousee.pdf

FORM:

cfdump
var=#form# /

cfoutput

#form.duration#

 #form.action#

#form.source#

/cfoutput

/cfdocument

But when I just submit them to a page with just an insert Query, using the
form.variable, I get an error! This is making NO sense.

cfquery name=create
datasource=webstatistics-test

INSERT INTO
tracker(clickCount, duration, action, dept, videoFile, datePlayed)

VALUES(1, #form.duration#, '#form.action#',
'PRMC', '#form.source#', #Now()#)

/cfquery

Is Flex waiting for something else? Do I need to send something back. I just
want to insert a counter into the database each time the user leaves the page
or clicks the stop button.


 From : valdhor [EMAIL PROTECTED]
Sent: Monday, December 08, 2008
12:50 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re:
Desperate Times...Desprate Messures: What is sent by HTTPRequest? 

Grab a
copy of Charles (http://www.charlesproxy.com).
This will show

you exactly what is being sent to your server.

--- In 

[flexcoders] Lazy loading trees

2008-12-09 Thread dandante
Hello,

I have a Tree control and I want to load each node's children in lazy 
fashion--that is, when 
the user expands a node, I want to fetch that node's children from the server. 
(there is way 
too much data to populate the entire tree ahead of time).

I've looked around and the closest I came to a solution is this old post:
http://www.mail-archive.com/flexcoders@yahoogroups.com/msg62360.html

This code works, but it seems that it will only modify the children of the root 
nodes. It isn't 
clear how to expand this code to work with a deep tree.

Does anyone have ideas on that, specifically, or on other approaches to this 
problem?
Thanks





[flexcoders] How to wite a javascript that calls to ActionScript

2008-12-09 Thread wkolcz
Can someone show me how to write a javascript function that calls to a Flex/AS 
function before a browser window closes?

In my AS contructor I have:
if (ExternalInterface.available)
ExternalInterface.addCallback(tagWithClosed,windowClosed);

I tried something like this, but I don't know how to actually invoke the 
correct function name. The swf is FXVideo.swf, the swf id is FXVideo and the 
.as file is FXVideo.as:
SCRIPT LANGUAGE=JavaScript
window.onbeforeunload = closingWindow;
function closingWindow()
{
   FXVideo.tagWithClosed();
}
/SCRIPT

I would greatly appreciate it if someone could help me write this. Project due 
tomorrow.



[flexcoders] AIR Application - Positioning.

2008-12-09 Thread Daniel
Hi,

I have a requirement for an application, it provides extensions based 
on a name entry box.

The client would like it to appear as a system tray icon, and when you 
click it, the application opens above it. When you find results the 
application window stretches upwards to show the results.

My google powers have failed me and I'm unsure on the best way to 
tackle this. Two possibilities, I assume, are to make a 100% screen 
size transparent application with an area visible in the bottom right 
OR just resize the application in the bottom right.

I'm unsure on either at the moment.

Thanks, Dan






[flexcoders] Deployment of Flex Application in IIS

2008-12-09 Thread srik_kanth_g
Hi, 

I am trying to deploy a small Flex application in IIS, but I could not 
succed. 

I have installed Flex Bulider 3 in Server and deployed code into 
WWWRoot under InetPub folder. when I tried to browse the .html page,it 
did not fetch any data from the database, just displayed empty charts.

Actually, I am new to flex so I am not able to fix this issues. 

could anyone please let me know how to deploy the flex application?

Thank you

Srikanth



[flexcoders] tile control

2008-12-09 Thread prashant_ipem
how to select all item of tile control through 'select All' and is it 
possible to select an item of tile control.  



Re: [flexcoders] vertical scrollbar problems...Please help i am freaking out :-)

2008-12-09 Thread Fotis Chatzinikos
Does anyone know if there is a way to tell the viewstack to recalculate its
height? (Should not it do that automatically?)

On Tue, Dec 9, 2008 at 3:31 PM, Luciano Manerich Junior 
[EMAIL PROTECTED] wrote:

   Got that same issue few days ago..

 Ive just swap the Panels, putting the higher first... Not that good
 solution, but, it has no problems for me.

 What you could try is, add canvas as child of the viewStack and panels as
 child of the canvas, resulting in a vertical scroll inside the canvas, not
 on the view stack.

 Set canvas to use full width and height...

 Not a solution, just a work around.

 -Mensagem original-
 De: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com [mailto:
 flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] Em nome de
 fotis.chatzinikos
 Enviada em: terça-feira, 9 de dezembro de 2008 11:10
 Para: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
 Assunto: [flexcoders] vertical scrollbar problems...Please help i am
 freaking out :-)


 Hello all, I do not know how many hours i have spend playing around with
 scroll policies, heights, tops and bottoms...but still no solution.

 The application layout is the following:

 HBOX
 LEFT VBOX
 RIGHT VBOX
 --PANEL
 --VIEW STACK
 PANEL 1 (lets say 200 pixels height) PANEL 2 (lets say 500
 pixels height)

 Initialy, The viewstack show Panel 1, and when i play with smaller screen
 sizes, ie make firefox smaller than my monitor's full height a vertical
 scroll bar appears correctly (when panel 1 bottom reaches the bottom of the
 browser window)...

 The problem appears when i switch to the second panel in the viewstack
 (selectedIndex==1). The scrollbar appears and disappears, but it seems that
 the measuredHeight is wrong! The scrollbar only appears when the screen
 becomes less than the height of the first panel which is 300 pixels less
 height than the second panel making the application not usable as 300 pixels
 of panel 2 are hidden...

 Does it pop any ideas? The viewstack's resizeToContent is true...

 Thanks,
 Fotis

 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location:
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
 Links

  




-- 
Fotis Chatzinikos, Ph.D.
Founder,
Phinnovation
[EMAIL PROTECTED],


Re: [flexcoders] Resize and Movw effect to air main native window

2008-12-09 Thread jitendra jain
Can u please paste some code?

 Thanks,

with Regards,
Jitendra Jain






From: abhishekchess1 [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Tuesday, 9 December, 2008 4:37:44 PM
Subject: [flexcoders] Resize and Movw effect  to air main native window


hello frnds,

I have  air application, in that i have 1 canvas which contain 1
component page,
canvas has height=0 at first,
When user clicks on increase btn it should increase  to top , when
user clicks on decrease it should go again to  height=0;
both should work with effect , but it is not working,
is any idea?

thx in advanced
:)
abhishekchess1@ gmail.com




  Connect with friends all over the world. Get Yahoo! India Messenger at 
http://in.messenger.yahoo.com/?wm=n/

Re: [flexcoders] Defining, but not adding to parent in MXML

2008-12-09 Thread Michael Prescott
That's it exactly.  Basically, we have a number of situations where we need
to add pop-up details to elements in our application, so I thought I'm
trying to make reusable non-visual component that orchestrates that, like
this:

mx:Whatever id=summary/

mx:Canvas id=myPopUp
  mx:Label text=All sorts of useful information/
/mx:Canvas

*my:PopUpDetail
target={summary}
popUp={myPopUp}
popUpOnRollover=true
popUpOnFocus=true /*

So I've dug around in PopUpButton to see how it manages its pop-up, and that
looks simple enough.  But PopUpButton uses the existence of popUp.parent to
determine whether it is managing the pop up yet (no parent, and it assumes
that it isn't) - so it seemed that, along with my not knowing about
includeInLayout=false, creating the popup control in some sort of
parentless way was important.

Michael


On Tue, Dec 9, 2008 at 1:33 AM, Josh McDonald [EMAIL PROTECTED] wrote:

   I think he's intending to use PopupManager, but wants to define it in
 the same file as its container?


 On Tue, Dec 9, 2008 at 4:30 PM, Alex Harui [EMAIL PROTECTED] wrote:

  Why not use tooltip or popup manager to float that thing?  Then it won't
 be clipped and what not



 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Josh McDonald
 *Sent:* Monday, December 08, 2008 5:04 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] Defining, but not adding to parent in MXML



 That's not exactly what you're after, in this case the object will be
 added to the list of children, it's just not positioned on
 parent.updateDisplayList() or counted during parent.measure().

 The only way I can think of off the top of my head to do what you're after
 is wrap it in mx:Array. Here's a quick example:

 http://pastie.textmate.org/private/hjd33kkztkuojpzltd2ylw

 You can use mx:component to do thins kind of like this, but
 mx:component defines classes,  not interfaces, and IIRC, mxmlc is kinda
 picky as to where it'll let you do it.

 -Josh

 On Tue, Dec 9, 2008 at 10:53 AM, Michael Prescott 
 [EMAIL PROTECTED] wrote:

 Sweet!  Nice that there's an easy answer.



 On Mon, Dec 8, 2008 at 4:47 PM, Tracy Spratt [EMAIL PROTECTED]
 wrote:

 includeInLayout=false (also visible=false, of course)



 Tracy


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Michael Prescott
 *Sent:* Monday, December 08, 2008 4:28 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] Defining, but not adding to parent in MXML



 Is it possible to define a component but somehow cause it to be omitted
 from the enclosing component's list of children?  Essentially:

 mx:VBox
   mx:Label text=This is added as a child of the vbox, as normal./
   mx:Label visible=false text=This is invisible.. but is there some
 way to not have it be a child of the vbox at all?/
 /mx:VBox

 An obvious question is, Why are you defining the component there if it's
 not supposed to be a child?

 I've got a datagrid inline item renderer that always shows a (summary)
 piece of information, but I want a pop-up to appear on rollover of the
 summary.  The problem I'm having is that the detail is (of course) added to
 the container that holds the summary, which causes the datagrid cell to blow
 open too big.

 mx:itemRenderer
   mx:Component
 mx:Box
   !-- This always shows up, which is fine and dandy --
   mx:MySummary data={data}  popUp={detail} /

 *  !-- It would be nice if this was never added to the parent box,
 so that it's free to be used as a popup --
   mx:MyDetail id=detail data={data}/*
 /mx:Box
   /mx:Component
 /mx:itemRenderer

 Defining the detail outside the itemrenderer entirely seems one way to go,
 except that this would mean there's only one pop up for all of the rows of
 the data grid.

 Can you do this sort of thing with a nested component?

 mx:itemRenderer
   mx:Component
 mx:Box
   !-- This always shows up, which is fine and dandy --
   mx:MySummary data={data}
 mx:popUp
 *  mx:Component
 mx:MyDetail id=detail data={data}/
   /mx:Component*
 /mx:popUp
   /mx:MySummary
 /mx:Box
   /mx:Component
 /mx:itemRenderer

 Any tips would be appreciated!

 Michael






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

 Like the cut of my jib? Check out my Flex blog!

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]
 :: http://flex.joshmcdonald.info/
 :: http://twitter.com/sophistifunk




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

 Like the cut of my jib? Check out my Flex blog!

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]
 :: http://flex.joshmcdonald.info/
 :: http://twitter.com/sophistifunk
  



[flexcoders] Re: interface layout help

2008-12-09 Thread stinasius
yeah but if combined together like having two views that guys can
switch to (for example the datagrid view and a tile window view) would
be great. my problem is that i feel there must be another way to bring
up the map and the virtual tour. having all the four components
showing at the same time. but am not in anyway a good visual designer.



[flexcoders] Re: Flex Messaging - Typing Objects.

2008-12-09 Thread Rodrigo Pereira Fraga
Hi!

Thanks, It works fine. My objects are typed.



--- In flexcoders@yahoogroups.com, Seth Hodgson [EMAIL PROTECTED] wrote:

 Yes, you can build and push AsyncMessages that contain typed objects
as the message bodies.
 
 If you're just pushing messages from client to client through the
server (i.e. no JMS or some other custom adapter into a backend
messaging system), you can just tag your ActionScript class with
[RemoteClass] (no alias=... attribute), and it'll show up at the
receiving client as an instance of the desired type. In this case you
don't even need a corresponding server-side Java class.
 
 Best,
 Seth
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of Rodrigo Pereira Fraga
 Sent: Monday, December 08, 2008 5:05 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Flex Messaging - Typing Objects.
 
 Hi!
 
 I'm using the messaging services of BlazeDS.
 So, anybody here knows if I can type an object using [RemoteClass]?
 
 My messages are sent from java to flex.
 
 Thanks.





[flexcoders] Please Help: Shift data Up|Down in array/datagrid

2008-12-09 Thread cox.blair
Hi everyone, hope someone can offer a suggestion to solve this, or at
least let me know if it possible within Flex/ActionScript.

Here is my sample data:

Date   Var1   Var2
-
Mon 34 45
Tues67 87
Wed 83 12
Thurs   89 23
Fri 12 98
... ......

Lets say there is more data, but this is what is visible at the moment.

Question: How could I adjust the Var2 column by essentially moving it
up or down within its column? So if I moved it down (perhaps adding a
null reference to the first row) 45 would appear in the Tues row,
however Var1 would not be changed. If we were to move it up, the 45
would be removed and the 98 in the Fri row would move to Thurs. 

At best, it would be good to be able to do this with a slider control
and have it return to normal without destroying the original data
loaded in the array. I was thinking of a custom filter function,
however could not find any references that indicated it could be used
in this manner. Would IViewCursor be capable of doing this? As long as
the datagrid showed the changes, I would be able to perform the
necessary calculations on the adjusted data - correlation.

Any thoughts whatsoever would be greatly appreciated. 

--
Blair



[flexcoders] Re: Flex Builder caching PNGs

2008-12-09 Thread oneworld95
Same issues with me. Embedded PNG's are cached somehow and become
impossible to update. The only method that seems to work is to use
what Fotis explained. 

-Alex

--- In flexcoders@yahoogroups.com, Fotis Chatzinikos
[EMAIL PROTECTED] wrote:

 Hi Tom,
 
 I had the same problem, did not really found a good solution... It seems
 that flex does some kind of trancoding and this does not pick up
changed...
 
 What worked is to delete all images, recompile the project, get some
errors
 on missing resources and then paste the new images and recompile
 
 On Tue, Dec 9, 2008 at 3:26 PM, tom s [EMAIL PROTECTED] wrote:
 
I'm @Embedding some PNGs to skin some buttons.
  If I Run once, then edit the PNG file, then Run again I get the
old PNG
  (w/o the edits), not the new one.
  My current work-around is to rename the file after each change,
but this is
  a pain.
 
  How do I get Flex Builder to not cache the PNGs / to check for
changes on
  each compile?
 
  thanks
 
  tom
 
 
   
 
 
 
 
 -- 
 Fotis Chatzinikos, Ph.D.
 Founder,
 Phinnovation
 [EMAIL PROTECTED],





Re: [flexcoders] Flex Builder caching PNGs

2008-12-09 Thread Jon Bradley


On Dec 9, 2008, at 8:26 AM, tom s wrote:

How do I get Flex Builder to not cache the PNGs / to check for  
changes on each compile?


I think there's a bug there somewhere.

What I do is go into the class where the embed tag is and make a  
change to the embed tag, then save, then make the change back again.  
Then run/debug.


Works for me, even though it is a bit of a PITA.

cheers,

jon



Re: [flexcoders] Re: interface layout help

2008-12-09 Thread Paul Andrews
It's a common thing inFlex apps to offer a switch between a textual datagrid 
and a tile view,  so I'm not sure why this adds any complication.

There are loads of ways to implement an interface for the application that 
you have - there is no one right way to make this interface.

Paul
- Original Message - 
From: stinasius [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Tuesday, December 09, 2008 10:38 AM
Subject: [flexcoders] Re: interface layout help


 yeah but if combined together like having two views that guys can
 switch to (for example the datagrid view and a tile window view) would
 be great. my problem is that i feel there must be another way to bring
 up the map and the virtual tour. having all the four components
 showing at the same time. but am not in anyway a good visual designer.


 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location: 
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives: 
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups 
 Links






[flexcoders] Re: interface layout help

2008-12-09 Thread stinasius
what am saying is that i would like to deliver info on demand in a way
that is easy to understand and fluid. for example have just the tile
view with the option of jumping to a datagrid view, then show the map
and virtual tour when needed all in a fluid way and easy to
understand. for example acrobat.com can give you an idea



Re: [flexcoders] Lazy loading trees

2008-12-09 Thread Johannes Nel
Implement ITreeDataDescriptor and set the tree's data descriptor
thus every time you open a node you call the getChildren function of your
data descriptor
a simple example

internal class ReferenceDataDescriptor implements ITreeDataDescriptor
{
private var __delegate:QueryBuilderTreeDelegate;

public function
ReferenceDataDescriptor(delegate:QueryBuilderTreeDelegate)
{
__delegate = delegate;
}

public function getChildren(node:Object,
model:Object=null):ICollectionView
{
var referenceDataDelegate:ReferenceDataBrowserDelegate =
__delegate.referenceDataDelegate
var gt:GenericTable = GenericTable


}
then store the data i get back in a hash table

so hash['a\b'] = ArraycCOlleciton

for local caching.


On Tue, Dec 9, 2008 at 4:04 AM, dandante [EMAIL PROTECTED] wrote:

   Hello,

 I have a Tree control and I want to load each node's children in lazy
 fashion--that is, when
 the user expands a node, I want to fetch that node's children from the
 server. (there is way
 too much data to populate the entire tree ahead of time).

 I've looked around and the closest I came to a solution is this old post:
 http://www.mail-archive.com/flexcoders@yahoogroups.com/msg62360.html

 This code works, but it seems that it will only modify the children of the
 root nodes. It isn't
 clear how to expand this code to work with a deep tree.

 Does anyone have ideas on that, specifically, or on other approaches to
 this problem?
 Thanks

  




-- 
j:pn
\\no comment


[flexcoders] Socket and Pop3

2008-12-09 Thread quantum_ohm
Hi All !

I'm building a POP3 mail client in AIR, and can't figure out how to
dispatch events (or where ) to send all the commands one after each
other in a unique same shot.

For now I have to send them individually like :
USER 
then when I have the response
PASS 
then
STAT
then
RETR and so on... As the server needs to send a response
before the AIR client can send another command.
I think this is a kind of Synchronous/Asynchronous issue
that I have some trouble to understand...

is there any way to do that ?

Thx for help :-)



Re: [flexcoders] Drag and Drop into a Popup Window

2008-12-09 Thread Reto M. Kiefer
Hello Alex,

thanks for your answer!

it was my fault. I didn't specified the proper event handlers in the
drop target. It's working quite fine now.

Sorry for the disturbance..

Cheers

Reto

2008/12/8 Alex Harui [EMAIL PROTECTED]:
 What didn't work?  Post a mini-example.



 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Reto M. Kiefer
 Sent: Monday, December 08, 2008 1:25 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Drag and Drop into a Popup Window



 Dear all,

 I want to drag and drop data from the main application into field in a
 popup window.

 The usual handling of dragEnter and dragDrop doesn't work.

 Any hints / links on how to enable drag and drop into a popup window
 is highly appreciated.

 Thanks in advance

 Reto

 


Re: [flexcoders] Parsley MVC :: some thoughts

2008-12-09 Thread Jules Suggate
Hi Ralf,

That's my understanding now too. What I'm slowly coming to terms with
are the facts you so lucidly summarise below :)

I (and I think Paul too) had always assumed that control returned from
the dispatchEvent function immediately. I'm still a little bit shocked
about it. In this light, dispatchEvent just routes function calls
through a common object.

It's too early to say whether it'll make much difference to how I code in Flex.

I hate stories that end with a deus ex machina :)

On Wed, Dec 10, 2008 at 02:47, Ralf Bokelberg [EMAIL PROTECTED] wrote:
 I'm confused. Let's clarify what we are talking about.

 The event dispatching is fully synchronous.
 If you call dispatchEvent, all event handlers are called, before the
 next statement is executed.

 Some processes (eg loading something from the backend or a timer)
 dispatch events in an asynchronous manner. So they call dispatchEvent
 at some unknown point in time

 I think, this is how it works.

 Cheers
 Ralf.

 On Tue, Dec 9, 2008 at 10:27 AM, Paul Andrews [EMAIL PROTECTED] wrote:
 Jules, I confess I actually misread your original post - I had anticipated
 that when an event is despatch it wouldn't be actioned until the current
 code section had been completed then the player would act upon events
 awaiting despatch.

 On the face of it, if events are despatched and all handlers invoked
 synchronously before the next statement runs then there's an opportunity
 for
 an unexpected race condition if handlers are updating the same data
 structures as the code that despatched the event. Like you I would be
 surprised at this behaviour and I might try and check that out for myself
 later today.

 So you are right my comments don't match your findings. I don't have a
 problem with the event despatcher invoking all handlers for an event in
 sequence - event handling has a predefined order through the display list,
 but there's no guarantee that multiple handlers at the same place in the
 hierarchy will be invoked in a set sequence.

 I'm somewhat surprised at your assertion that despatching an event will
 invoke handlers for that event synchronously - it would be interesting to
 get a better handle on this from someone who knows thelow-level mechanism
 more intimately than I do. My event handling code doesn't anticipate that
 despatched events are handled syncronously and as i've already said,
 there's
 always a danger of an unexpected race condition if that were true.

 In my previous life writing a lot of code running on multiprocessor
 systems
 we took great care to control asynchronous behaviour and to protect data
 structures from multiple updates using semaphores. In a faux system like
 the
 flash player, there isn't true concurrency, but if what you say is true
 there would be a real potential of getting an unwanted side-effect since
 effectively shared data structures would be open to being updated
 unexpectedly whenever an event is despatched.

 So, I'm kinda with you.

 Paul

 - Original Message -
 From: Jules Suggate [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Tuesday, December 09, 2008 8:55 AM
 Subject: Re: [flexcoders] Parsley MVC :: some thoughts

 How can something be asynchronous but not concurrent? Asynchronous
 means that control returns from the function call immediately although
 the transaction triggered by the call may still be ongoing. To me,
 that absolutely *requires* concurrency, even if it's simulated through
 a timeslicing scheduler or some such.

 I'm pretty sure for something to be asynchronous there has to be some
 sort of interleaving.

 That's the whole point of what I just realised: there is no such
 interleaving within the Flex framework. Event dispatch in Flex/Flash
 is a *blocking* operation. There's no scheduler or anything within the
 event bus. Maybe your handlers will make calls to a truly asynchronous
 API like network calls or something, but until they make that call and
 return control to the code that dispatched the event, the next line of
 code in your event producer object will *not* execute.

 I'm just freaked out that I never realised this. How have my
 applications even been *usable* until now?!?!? Pure luck and good
 API design from Adobe/Macromedia.

 Cheers to the Player team!

 On Tue, Dec 9, 2008 at 03:02, Paul Andrews [EMAIL PROTECTED] wrote:
 They are asynchronous but they aren't concurrent.

 Paul

 - Original Message -
 From: Jules Suggate [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Monday, December 08, 2008 1:59 PM
 Subject: Re: [flexcoders] Parsley MVC :: some thoughts

 boom head explodes heh!

 I have been happily thinking the whole time that events really *are*
 asynchronous, but that's obviously not true. Reality check...

 Thanks guys. I think I might have run out of reasons *not* to use
 Parsley
 :)

 On Tue, Dec 9, 2008 at 01:06, Paul Andrews [EMAIL PROTECTED] wrote:
 - Original Message -
 From: Jules Suggate [EMAIL PROTECTED]
 

[flexcoders] Re: Deployment of Flex Application in IIS

2008-12-09 Thread nathanpdaniel
That issue has more to do with how you load data than the fact that 
you're using IIS.  You should look into the security issues involved 
with loading external data to start with.

--- In flexcoders@yahoogroups.com, srik_kanth_g [EMAIL PROTECTED] 
wrote:

 Hi, 
 
 I am trying to deploy a small Flex application in IIS, but I could 
not 
 succed. 
 
 I have installed Flex Bulider 3 in Server and deployed code into 
 WWWRoot under InetPub folder. when I tried to browse the .html 
page,it 
 did not fetch any data from the database, just displayed empty 
charts.
 
 Actually, I am new to flex so I am not able to fix this issues. 
 
 could anyone please let me know how to deploy the flex application?
 
 Thank you
 
 Srikanth





[flexcoders] Re: Parsley MVC :: some thoughts

2008-12-09 Thread Amy
--- In flexcoders@yahoogroups.com, Paul Andrews [EMAIL PROTECTED] wrote:

 Jules, I confess I actually misread your original post - I had 
anticipated 
 that when an event is despatch it wouldn't be actioned until the 
current 
 code section had been completed then the player would act upon 
events 
 awaiting despatch.
 
 On the face of it, if events are despatched and all handlers 
invoked 
 synchronously before the next statement runs then there's an 
opportunity for 
 an unexpected race condition if handlers are updating the same data 
 structures as the code that despatched the event. Like you I would 
be 
 surprised at this behaviour and I might try and check that out for 
myself 
 later today.
 
 So you are right my comments don't match your findings. I don't 
have a 
 problem with the event despatcher invoking all handlers for an 
event in 
 sequence - event handling has a predefined order through the 
display list, 
 but there's no guarantee that multiple handlers at the same place 
in the 
 hierarchy will be invoked in a set sequence.
 
 I'm somewhat surprised at your assertion that despatching an event 
will 
 invoke handlers for that event synchronously - it would be 
interesting to 
 get a better handle on this from someone who knows thelow-level 
mechanism 
 more intimately than I do. My event handling code doesn't 
anticipate that 
 despatched events are handled syncronously and as i've already 
said, there's 
 always a danger of an unexpected race condition if that were true.
 
 In my previous life writing a lot of code running on multiprocessor 
systems 
 we took great care to control asynchronous behaviour and to protect 
data 
 structures from multiple updates using semaphores. In a faux system 
like the 
 flash player, there isn't true concurrency, but if what you say is 
true 
 there would be a real potential of getting an unwanted side-effect 
since 
 effectively shared data structures would be open to being updated 
 unexpectedly whenever an event is despatched.
 
 So, I'm kinda with you.

I actually had this very thing happen in my code a couple of weeks 
ago.  I normally expect that the code in a function will all run as a 
block unless, of course, I'm calling out to another function.  But in 
one case, one of the statements I was using (addEventListener, I 
think), opened up enough of a timing hole in my code that some 
other code (not the function that was being added in the event 
listener, which might have been partially understandable) ran 
unexpectedly at that point.  The only solution I found was to make 
sure I put all of the other code that _had_ to run in that block 
before anything else happened above the addEventListener code.

-Amy



[flexcoders] Re: Does anyone know ANYTHING about AS Webservices?

2008-12-09 Thread valdhor
The following works for me:

?xml version=1.0?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
creationComplete=onCreationComplete()
 mx:Script
 ![CDATA[
 import mx.controls.Alert;
 import mx.rpc.events.ResultEvent;
 import mx.rpc.events.FaultEvent;
 import mx.rpc.soap.mxml.WebService;

 private var ws:mx.rpc.soap.mxml.WebService;
 private var getMyInfoRequest:Object = new Object();

 public function onCreationComplete():void
 {
 ws = new mx.rpc.soap.mxml.WebService();
 ws.endpointURI = http://myserver.com/myService.php;;
 ws.loadWSDL(http://myserver.com/myService.wsdl;);
 ws.addEventListener(FaultEvent.FAULT, faultHandler);
 ws.addEventListener(ResultEvent.RESULT, resultHandler);

 getMyInfoRequest.parameter1 = aaa;
 getMyInfoRequest.parameter2 = bbb;
 getMyInfoRequest.parameter3 = ccc;
 }

 public function resultHandler(event:ResultEvent):void
 {
 Alert.show((event.result as Object).myInfo);
 }
 public function faultHandler(event:FaultEvent):void
 {
 Alert.show(event.fault.faultString);
 }

 public function runRequest():void
 {
 ws.getMyInfo(getMyInfoRequest);
 }
 ]]
 /mx:Script
 mx:Button label=RunRequest click=runRequest()/
/mx:Application

Now, I did have to update my crossdomain.xml file to:

?xml version=1.0?
!DOCTYPE cross-domain-policy SYSTEM
http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd;
cross-domain-policy
   site-control permitted-cross-domain-policies=all
 allow-access-from domain=* ports=* /
 allow-access-from domain=* to-ports=* secure=true /
 allow-http-request-headers-from domain=* headers=* /
   /site-control
/cross-domain-policy

Also, I had to add my bin-debug folder to the list in the Global
Security Settings Panel at:
http://www.macromedia.com/support/documentation/en/flashplayer/help/sett\
ings_manager04.html.

Perhaps you could post the WSDL and I can give it a try here.


HTH



Steve


--- In flexcoders@yahoogroups.com, wkolcz [EMAIL PROTECTED] wrote:

 I put the webservice so it creates a public instance ready for use.

 public var webService:WebService = new WebService();
 public var trackInfo:Object = new Object();
 public var myTimer:Timer = new Timer(0);

 I then change the code to:

 private function wsdlLoaded(event:LoadEvent):void {
 Alert.show(Web Service Loaded and Ready, Service Status);
 webService.countIt(trackInfo);
 webService.addEventListener(FaultEvent.FAULT, alertFault);

 }

 private function stop_onClick(event:MouseEvent):void {
 myTimer.stop()
 trackInfo.addOne = 1 ;
 trackInfo.duration =  myTimer.currentCount;
 trackInfo.action = Video Stopped;
 trackInfo.source = source;
 webService.wsdl =
https://ummciisdevweb22.umich.edu/videotracking/trackerDAO.cfc?wsdl;;
 webService.loadWSDL();
 webService.addEventListener(LoadEvent.LOAD, wsdlLoaded);
 stop();
 playPressed = false;
 }

 It loads the WSDL and the Alert pops up, but still cant get it to the
database. Now I am getting:

 faultCode:DecodingError
 faultString:'SOAP Response cannot be decoded.
 Raw response: ' faultDetail:'null'

 
 From: Tracy Spratt [EMAIL PROTECTED]
 Sent: Monday, December 08, 2008 10:08 AM
 To: flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] Does anyone know ANYTHING about AS
Webservices?

 First, loadWSDL() is asynchronous.  You
 need to wait for the LoadEvent.LOAD event before attempting to call an
 operation.   Also, declare and use a result Handler in
 addition to the fault handler.   Tracy
 
  From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of wkolcz
 Sent: Monday, December 08, 2008
 12:34 PM
 To:flexcoders@yahoogroups.com
 Subject: [flexcoders] Does anyone
 know ANYTHING about AS Webservices?

 I created
 a simple web service using ColdFusion CFC. It takes a struct and
inserts the
 info into the database. Works fine from a direct call using CF's
createObject(webservice)
 so I know it works...

 However in AS, I am getting this error:

 faultCode:DecodingError faultString:'SOAP Response cannot be decoded.
 Raw response: ' faultDetail:'null'

 Here is my Web Service Script:

 var ws:WebService = new WebService();

 ws.wsdl =
https://ummciisdevweb22.umich.edu/videotracking/trackerDAO.cfc?wsdl;;

 ws.addEventListener(FaultEvent.FAULT, alertFault);

 ws.loadWSDL();

 ws.countIt({trackData:trackInfo});

 I have looked at 100 different examples and none of them work. Does
ANYONE know
 how I can get this to 

Re: [flexcoders] vertical scrollbar problems...Please help i am freaking out :-)

2008-12-09 Thread Fotis Chatzinikos
Oups, isn't it funny when you mail the list after hours of head banging (on
a wall not just rocking :-) and then solve it in the next half an hour...?

I had everything wrapped in a 'parent' viewstack which i forgot to enable
its resizeToContent flag...

Works now...


On Tue, Dec 9, 2008 at 3:56 PM, Fotis Chatzinikos 
[EMAIL PROTECTED] wrote:

 Does anyone know if there is a way to tell the viewstack to recalculate its
 height? (Should not it do that automatically?)


 On Tue, Dec 9, 2008 at 3:31 PM, Luciano Manerich Junior 
 [EMAIL PROTECTED] wrote:

   Got that same issue few days ago..

 Ive just swap the Panels, putting the higher first... Not that good
 solution, but, it has no problems for me.

 What you could try is, add canvas as child of the viewStack and panels as
 child of the canvas, resulting in a vertical scroll inside the canvas, not
 on the view stack.

 Set canvas to use full width and height...

 Not a solution, just a work around.

 -Mensagem original-
 De: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com [mailto:
 flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] Em nome de
 fotis.chatzinikos
 Enviada em: terça-feira, 9 de dezembro de 2008 11:10
 Para: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
 Assunto: [flexcoders] vertical scrollbar problems...Please help i am
 freaking out :-)


 Hello all, I do not know how many hours i have spend playing around with
 scroll policies, heights, tops and bottoms...but still no solution.

 The application layout is the following:

 HBOX
 LEFT VBOX
 RIGHT VBOX
 --PANEL
 --VIEW STACK
 PANEL 1 (lets say 200 pixels height) PANEL 2 (lets say 500
 pixels height)

 Initialy, The viewstack show Panel 1, and when i play with smaller screen
 sizes, ie make firefox smaller than my monitor's full height a vertical
 scroll bar appears correctly (when panel 1 bottom reaches the bottom of the
 browser window)...

 The problem appears when i switch to the second panel in the viewstack
 (selectedIndex==1). The scrollbar appears and disappears, but it seems that
 the measuredHeight is wrong! The scrollbar only appears when the screen
 becomes less than the height of the first panel which is 300 pixels less
 height than the second panel making the application not usable as 300 pixels
 of panel 2 are hidden...

 Does it pop any ideas? The viewstack's resizeToContent is true...

 Thanks,
 Fotis

 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location:
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
  Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
 Links

  




 --
 Fotis Chatzinikos, Ph.D.
 Founder,
 Phinnovation
 [EMAIL PROTECTED],




-- 
Fotis Chatzinikos, Ph.D.
Founder,
Phinnovation
[EMAIL PROTECTED],


Re: [flexcoders] Re: Parsley MVC :: some thoughts

2008-12-09 Thread Ralf Bokelberg
Hi Amy

Afaik this is not possible in Flashplayer. A block of code is always
running through without any interuption. Colin Moock has a good
chapter of how all this works in his nice AS3 book.

Cheers
Ralf.



On Tue, Dec 9, 2008 at 3:44 PM, Amy [EMAIL PROTECTED] wrote:

 I actually had this very thing happen in my code a couple of weeks
 ago. I normally expect that the code in a function will all run as a
 block unless, of course, I'm calling out to another function. But in
 one case, one of the statements I was using (addEventListener, I
 think), opened up enough of a timing hole in my code that some
 other code (not the function that was being added in the event
 listener, which might have been partially understandable) ran
 unexpectedly at that point. The only solution I found was to make
 sure I put all of the other code that _had_ to run in that block
 before anything else happened above the addEventListener code.

 -Amy


[flexcoders] How to make Flex exchange data with Flash SWF file?

2008-12-09 Thread markflex2007
Please give me a general idea or some urls.

Thanks a lot

Mark 



[flexcoders] Digest Authentification in Flex

2008-12-09 Thread Christoph Pingel

Hello,

I'm trying to wrap my head around digest authentification in Flex.

The point is, using a proxy is not an option. Using the HTTPService  
object, Base authentification is straightforward,

I just add the required headers.

Now, in the case of Digest auth, the problem is that the Server first  
sends an 401 unauthorized message, together with some initial values  
(nonce, qop) that have to be used later on in negotiating.


The big question: how do I access these values? There are Flash/Flex  
classes that support digest authentification (although via proxy), so  
that shouldn't be a fundamental problem. However, I don't know how,  
and some posts on the web seem to imply that the Flash player *can't*  
access HTTP headers - but I can't believe this, since digest auth (by  
any flash or mx class) simply requires access to the nonce and qop  
values in the HTTP headers.


May someone please shed some light on this issue.

TIA,
best regards,
Christoph




[flexcoders] WebDAV and Flex - Any sample code or opensource widgets available . . ?

2008-12-09 Thread marty_martian
I have searched through the archives for this user group but see very
little discussion on WebDAV with Flex. It looks like some folks have
been trying to do it as far back as 2006 but no samples or pointers to
samples or open source widgets have been posted.

Related to this, can anyone share:

  - samples 
  - pointers to samples 
  - open source widgets 

Most Grateful,

Christopher 



[flexcoders] Cannot Tab to MovieClips from Flash SWF Loaded with SWFLoader

2008-12-09 Thread aut0poietic
Title pretty much says it all:

I have a Flex 3 application which can basically be summed up as a SWF
player which loads SWF's created in Flash CS3. 

When the SWF's are loaded, I can interact with them using the mouse
(click/mouseover, etc). However, these items cannot be tabbed to. 

I've been hacking around on this all morning, without much luck. I've
ensured that every item in the application either has a tabIndex and
is .tabEnabled or has tabEnabled=false and tabChildren=true. 

I've even resorted to enumerating over the child MovieClips in the swf
(using swfLoaderInstance.content.getChildAt()) and setting tabEnabled
and focusRect are both true, and confirming that the tabIndex on these
mc's was preserved. 

I'm at a serious loss as to what to do next -- I can't have
controls/interactions that the user can't tab to. Am I missing
something simple? A setting on the SWFLoader? The Application?

Hope someone's had to deal with this before and knows a solution.

Jer



[flexcoders] Re: How to make Flex exchange data with Flash SWF file?

2008-12-09 Thread aut0poietic
--- In flexcoders@yahoogroups.com, markflex2007 [EMAIL PROTECTED]
wrote:

 Please give me a general idea or some urls.
 
 Thanks a lot
 
 Mark


Doing this now: If you're using a Flash 9/10 file in Flex 3 and in the
same domain, you can load the SWF into a SWFLoader control, and once
loaded, the SWF is in the .content property of the SWFLoader. 

So say you wanted to call the setMyText(text) method of your swf,
once the swf is loaded, you can simply call
MovieClip(swfLoaderInstance.content).setMyText(hello from Flex) ;

Google livedocs for SWFLoader for more information. 





[flexcoders] Re: errorTip fontSize break the tooltip? Possible bug?

2008-12-09 Thread valdhor
How about a work around:

 private function init():void
 {
 var toolTipString:String = You need to save your
changes!;
 saveTip =
ToolTipManager.createToolTip(toolTipString,50,50) as ToolTip;
 saveTip.setStyle(styleName, errorTipGreen);
 var TLM:TextLineMetrics =
saveTip.measureText(saveTip.text);
 var paddingLeftPx:int = saveTip.getStyle(paddingLeft)
as int;
 var paddingRightPx:int =
saveTip.getStyle(paddingRight) as int;
 saveTip.width = TLM.width + 2 * paddingLeftPx + 2 *
paddingRightPx;
 }

HTH


Steve

--- In flexcoders@yahoogroups.com, Fotis Chatzinikos
[EMAIL PROTECTED] wrote:

 Here you are: (And a screenshot - via mail - have not tried before so
do not
 know if attachment work here...)

 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute
 creationComplete=init()
 mx:Script
 ![CDATA[
 import mx.managers.ToolTipManager;
 import mx.controls.ToolTip;

 private var saveTip:ToolTip = null ;

 private function init():void
 {
 saveTip = ToolTipManager.createToolTip(You need to
save
 your changes!,50,50) as ToolTip;
 saveTip.setStyle(styleName, errorTipGreen);
 }
 ]]
 /mx:Script
 mx:Style
 .errorTipGreen
 {
 color: #FF;
 fontSize: 11;
 fontWeight: bold;
 shadowColor: #00;
 borderColor: #00FF00;
 borderStyle: errorTipAbove;
 paddingBottom: 4;
 paddingLeft: 4;
 paddingRight: 4;
 paddingTop: 4;
 }

 /mx:Style
 /mx:Application


 On Mon, Dec 8, 2008 at 8:25 PM, Alex Harui [EMAIL PROTECTED] wrote:

 Can you post an entire test case that is as small as possible?
 
 
 
  *From:* flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] *On
  Behalf Of *Fotis Chatzinikos
  *Sent:* Monday, December 08, 2008 9:44 AM
  *To:* flexcoders@yahoogroups.com
  *Subject:* Re: [flexcoders] errorTip fontSize break the tooltip?
Possible
  bug?
 
 
 
  bump :-)
 
  Sorry did not get a reply on this... Could somebody test? Alex?
 
  On Thu, Dec 4, 2008 at 1:01 PM, fotis.chatzinikos 
  [EMAIL PROTECTED] wrote:
 
  Hi, the following works:
 
  .errorTip
  {
  color: #FF;
  /*fontSize: 11;*/
  fontWeight: bold;
  shadowColor: #00;
  borderColor: #FF;
  borderStyle: errorTipAbove;
  paddingBottom: 4;
  paddingLeft: 4;
  paddingRight: 4;
  paddingTop: 4;
  }
 
  If I un-comment fontSize, the font gets bigger but the tooltip text
  gets outside of the tooltips 'area'. Ie text length is 200 pixels
and
  tooltips area 150 pixels... Is the tooltip's area calculations
  hardcoded to font size 9?
 
  Fotis
 
 
 
 
  --
  Fotis Chatzinikos, Ph.D.
  Founder,
  Phinnovation
  [EMAIL PROTECTED],
 
 
 



 --
 Fotis Chatzinikos, Ph.D.
 Founder,
 Phinnovation
 [EMAIL PROTECTED],




Re: [flexcoders] How to wite a javascript that calls to ActionScript

2008-12-09 Thread Fidel Viegas
On Tue, Dec 9, 2008 at 2:07 PM, wkolcz [EMAIL PROTECTED] wrote:
 Can someone show me how to write a javascript function that calls to a
 Flex/AS function before a browser window closes?

 In my AS contructor I have:
 if (ExternalInterface.available)
 ExternalInterface.addCallback(tagWithClosed,windowClosed);

 I tried something like this, but I don't know how to actually invoke the
 correct function name. The swf is FXVideo.swf, the swf id is FXVideo and the
 .as file is FXVideo.as:
 SCRIPT LANGUAGE=JavaScript
 window.onbeforeunload = closingWindow;
 function closingWindow()
 {
FXVideo.tagWithClosed();
 }
 /SCRIPT

 I would greatly appreciate it if someone could help me write this. Project
 due tomorrow.

Hi wkolcz,

try not to post the same message more than once. If people don't take
the time to answer it is because the information is easily available
on the net. What you are asking is easily found on google. Here is
what I found doing a search on flex + javascript:

http://blog.paranoidferret.com/?p=25

Good luck, and try to search on google before posting your question.
It is faster than waiting for someone to reply.

All the best,

Fidel.


[flexcoders] Problems with locale different to en_US when building an swf file using Ant

2008-12-09 Thread taze170171
Hello!

We have a problem when building the swf file with a locale different 
to en_US. We use the following ant code for building:

additional.compiler.arguments=-services .../services-config.xml -
locale=de_AT -source-path=./locale/{locale}

target name=releasecompile
 java jar=${mxmlc.jar} fork=true maxmemory=512m 
failonerror=true
arg line=${additional.compiler.arguments}/arg
arg value=+flexlib=${flex.sdk.dir}/frameworks/
arg value=+configname=air/
arg value=-context-root=''/
arg value=-file-specs=${main.application}/
  !--arg value=-load-config=${flex.config.xml}/--
arg value=-output=${main.application.out}/
arg value=-source-path=${src.dir}/

arg value=-library-path+=libs/
arg value=-library-path+=AirReport.swc/
arg value=-library-path+=${sdk.locale.path}/de_AT/
arg value=-library-path+=${sdk.locale.path}/en_US/
 /java

When using the locale en_US everything works fine. If we change the 
locale within the additional.compiler.arguments to de_AT no swf is 
created. But there is also no error message!

We are using SDK 3.2.0. Locale de_AT has been created by calling:
copylocale en_US de_AT

Within Flex Builder the build works with the de_AT locale!

Can anybody help?

Thanks in advance,
Taze



[flexcoders] Re: Bug: flash.display.Graphics being removed.

2008-12-09 Thread flexaustin
In Flex 3.1 framework import flash.display.Graphics isn't showing in
code hinting.



--- In flexcoders@yahoogroups.com, sunild99 [EMAIL PROTECTED] wrote:

 Usually, when code completion stops working in Flex Builder, it's
because the I'm editing 
 has an error/omission in it...
 
 Sunil
 
 
 --- In flexcoders@yahoogroups.com, li wenzhi lwz7512@ wrote:
 
  in my flex project using flexsdk3.1, while coding in flexbuilder,
the uicomponent 
 cannot auto hint the graphics attribute after .
  graphics missing in flexsdk3.1?
  
   --
  lwz7512
  Ultrapower Flex Team Leader
  OpenRIA -- A Window You Exploring RIA World
  http://www.rimeeting.cn
  
  
  
  
  
  From: flexaustin flexaustin@
  To: flexcoders@yahoogroups.com
  Sent: Saturday, December 6, 2008 5:56:11 AM
  Subject: [flexcoders] Bug: flash.display.Graphics being removed.
  
  
  Has anyone had this issue?  I do the following (using Flex Builder 3
  w/ sdk 3.1 and Flash Player 10).
  
  // BEGIN CODE  - - - - --
  import flash.display. Graphics;
  
  public function get drawGraphics( ):Graphics {
  if(_drawing) {
  return _drawing.graphics;
  } else {
  return null;
  }
  }
  // END CODE  - - - - 
  
  Every 3rd or 4th time I save my file, Flex Builder removes my import
  statement then I get t1046 Type not found...
 





Re: [flexcoders] speed of the for each looping

2008-12-09 Thread Maciek Sakrejda
If you're trying to speed up your application, you should use the
profiler. Something like the difference between a manually indexed for
loop and a for-each loop is almost certain to be trivial.

If you don't have the profiler, run an ad-hoc perf test by doing
something like

// we need to construct something to iterate over:
var iterations:int = 100;
var arr:Array = [];
for (var i:int = 0; i  iterations; i++) arr.push(i);
var dummy:int = 0;

var forBeginning:Number = new Date().getTime();
for (var j:int = 0; j  iterations; j++)
{
// we need to do something in the loop so the whole thing
// is not just optimized out (not sure if FP does this, but
// it can), but we don't want to use trace() since I/O is
// relatively expensive compared to the cost of the loop itself
dummy = arr[j];
} 
trace(for loop took  + (new Date().getTime() - forBeginning) + 
milliseconds);

var forEachBeginning:Number = new Date().getTime();
for each (var k:int in arr)
{
dummy = k;
}
trace(for-each loop took  + (new Date().getTime() - forEachBeginning)
+  milliseconds);

That should give you an idea of the difference (but run this many times
and average it, and vary the order of the loops). Also, keep in mind
that most of the time, you won't be iterating over a million items.
Bottlenecks can occur in surprising places (though they're often found
in common places too, like Container layout code). Don't try to optimize
things that *seem like* they would be slow without actually confirming
not only that they *are* slow, but that they are affecting the overall
speed or responsiveness of your application. It makes no sense to make a
10x performance improvement in one part of your code that accounts
for .01% of your application's CPU usage.

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

-Original Message-
From: Cato Paus [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] speed of the for each looping
Date: Tue, 09 Dec 2008 13:28:23 -

Hi, all you experts :)

I'm tying to speed up my application and I use a lot of

exsample
for (var i:int = 0; i  5; i++)
{
trace(i);
} 

so is the for each looping faster ?




 




[flexcoders] Listening for both Mouse Down and Double Click events.

2008-12-09 Thread flexaustin
Is it possible to listen for both a mouse down and doubleclick events
without using some sort of timer?  On mouse down start timer to listen
for a another mouse down?

If you listen for a mouse down and in the mouse down handler add
another listener to listen for some other action is a possibility I
guess, but would it add the listener in time?

TIA



[flexcoders] Re: Item Renderer focus on subcomponent in List

2008-12-09 Thread boilerman1984
I took your example with the DataGrid and slightly modified it to
extend a List.  The example correctly shows a list and correctly tabs
into the first itemRenderer ( rendererIsEditor=true and the
MultiField editor is the Renderer).  The shift works to tab back out
of the first item as well.  The error comes when i reach the lastname
text box on the first editor and want to go to the second one.  It
throws a runtime error below.

---
 ReferenceError: Error #1069: Property text not found on
DataGridMultiFieldEditor and there is no default value.
at
mx.controls::List/itemEditorItemEditEndHandler()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\controls\List.as:2609]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at
mx.core::UIComponent/dispatchEvent()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\core\UIComponent.as:9156]
at
mx.controls::List/endEdit()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\controls\List.as:2181]
at
mx.controls::List/deactivateHandler()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\controls\List.as:2397]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at
mx.core::UIComponent/dispatchEvent()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\core\UIComponent.as:9156]
at
mx.controls::List/endEdit()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\controls\List.as:2181]
at
mx.controls::List/commitEditedItemPosition()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\controls\List.as:1893]
at
mx.controls::List/updateDisplayList()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\controls\List.as:1013]
at
mx.controls.listClasses::ListBase/validateDisplayList()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\controls\listClasses\ListBase.as:3279]
at
mx.managers::LayoutManager/validateDisplayList()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:605]
at
mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:678]
at Function/http://adobe.com/AS3/2006/builtin::apply()
at
mx.core::UIComponent/callLaterDispatcher2()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8565]
at
mx.core::UIComponent/callLaterDispatcher()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8508]




RE: [flexcoders] Error while accessing LCDS fill method

2008-12-09 Thread Seth Hodgson
If this hasn't been resolved, a snippet of your server log file with Message.* 
and Debug.* debug logging enabled, leading up to and through this error would 
be useful to see, as well as knowing what version of the LCDS you're running.

Best,
Seth

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
shruti.sheety
Sent: Tuesday, December 02, 2008 10:22 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Error while accessing LCDS fill method

Hi,

I have recently upgraded from Flex2 (FDS) to Flex3(LCDS and have my
application which runs on Flex sdk3.2 -LCDS with carringom MVC.
The problem i am having is when i refresh the page it is saying

AbstractAssembler.fill: Cannot find service class...
DataService.onFault: event=[FaultEvent fault=[RPC Fault
faultString=The fill method with parameters '[a,b,c]] (class:
java.util.Arrays$ArrayList)' and destination 'cp_ds' returned null.
faultCode=Server.Processing faultDetail=null]
messageId=32B99043-830F-956D-4897-38293069CDA1 type=fault
bubbles=false cancelable=true eventPhase=2]

It is only when i refresh the page i have this error. When i access
the page the first time its fine.Also i have made sure that the
service class is in place.
Please suggest.

Thanks,
Shruti


Re: [flexcoders] How to wite a javascript that calls to ActionScript

2008-12-09 Thread wkolcz
Sorry about that. Its not really my fault. Its the flexcoder list system.
Actually I emailed one at 5pm yesterdays, waited for it to show up but it 
didnt. 
So I sent another one about 8:30 pm, it didn't show up either. 
Then I sent one this morning and it didn't show up for an hour (when all 3 
showed up).


From: Fidel Viegas [EMAIL PROTECTED]
Sent: Tuesday, December 09, 2008 8:35 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] How to wite a javascript that calls to ActionScript 

On Tue, Dec 9, 2008 at 2:07 PM, wkolcz [EMAIL PROTECTED] wrote:

 Can someone show me how to write a javascript function that calls to a

 Flex/AS function before a browser window closes?



 In my AS contructor I have:

 if (ExternalInterface.available)

 ExternalInterface.addCallback(tagWithClosed,windowClosed);



 I tried something like this, but I don't know how to actually invoke the

 correct function name. The swf is FXVideo.swf, the swf id is FXVideo and the

 .as file is FXVideo.as:

 SCRIPT LANGUAGE=JavaScript

 window.onbeforeunload = closingWindow;

 function closingWindow()

 {

FXVideo.tagWithClosed();

 }

 /SCRIPT



 I would greatly appreciate it if someone could help me write this. Project

 due tomorrow.

Hi wkolcz,

try not to post the same message more than once. If people don't take

the time to answer it is because the information is easily available

on the net. What you are asking is easily found on google. Here is

what I found doing a search on flex + javascript:

http://blog.paranoidferret.com/?p=25

Good luck, and try to search on google before posting your question.

It is faster than waiting for someone to reply.

All the best,

Fidel.




RE: [flexcoders] Re: Deployment of Flex Application in IIS

2008-12-09 Thread Tracy Spratt
Yes, this symptom usually means a security a security problem.

 

Put a crossdomain.xml file in ..\inetpub\wwwroot.

 

This example below is wide open and you might want to tighten it down
once you get things working.

Tracy

 

?xml version=1.0?
!DOCTYPE cross-domain-policy SYSTEM
http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd;
cross-domain-policy
  site-control permitted-cross-domain-policies=all
allow-access-from domain=* ports=* /
allow-access-from domain=* to-ports=* secure=true /
allow-http-request-headers-from domain=* headers=* /
  /site-control
/cross-domain-policy



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of nathanpdaniel
Sent: Tuesday, December 09, 2008 9:42 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Deployment of Flex Application in IIS

 

That issue has more to do with how you load data than the fact that 
you're using IIS. You should look into the security issues involved 
with loading external data to start with.

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, srik_kanth_g [EMAIL PROTECTED] 
wrote:

 Hi, 
 
 I am trying to deploy a small Flex application in IIS, but I could 
not 
 succed. 
 
 I have installed Flex Bulider 3 in Server and deployed code into 
 WWWRoot under InetPub folder. when I tried to browse the .html 
page,it 
 did not fetch any data from the database, just displayed empty 
charts.
 
 Actually, I am new to flex so I am not able to fix this issues. 
 
 could anyone please let me know how to deploy the flex application?
 
 Thank you
 
 Srikanth


 



[flexcoders] Re: Invoking Flex fuction from Javascript for close.window

2008-12-09 Thread Anthony DeBonis
With ExternalInterface.call you can inject JavaScript into the wrapper 
document.

if ( ExternalInterface.available ) {
ExternalInterface.call('alert(TEST)'); 
}
A good example of what your talking about is here thanks to Greg Jessup

http://gregjessup.com/flex-3-catch-browser-exit-or-close-event-using-
javascript-and-externalinterface/




[flexcoders] RE: services-config.xml: compc or just mxmlc?

2008-12-09 Thread Seth Hodgson
Hi Maciek,

I don't have any practical experience with attempting to compile service config 
and associated classes into modules and I don't know whether compc would 
support it or not, but based on some informal discussions with Alex and Jeff I 
wouldn't recommend it.

The core issue is that AMF serialization mappings (client to server class 
aliases) within Flash Player aren't scoped per module or even app domain as 
loaded classes are - unfortunately they're scoped to a security domain (broader 
scope). This means that if the root swf loads two or more modules (each will be 
loaded in its own child ApplicationDomain by default), where these modules bake 
in overlapping sets of classes that use [RemoteClass] metadata things won't 
work. The modules will effectively trample each other's registered class 
aliases to point to their respective local classes. Say you have a class Foo 
([RemoteClass(alias=com.Foo)]), that you've compiled into both modules. You 
now have two separate class defs on the client (one per module/sub app domain), 
but only one alias registered (scoped to the security domain both of these app 
domains belong to). When the loosing module receives a Foo off the network it 
will fail to deserialize correctly because the alias mapping points to the 
class def in the other module, which this module doesn't have access to.

I think the best approach for now is to place your service config and all 
shared classes with [RemoteClass] metadata into your root swf, and then expose 
this to your modules through a controlled API - say a registry of network 
services or operations the modules can use. You may be able to get away with 
keeping non-shared classes with [RemoteClass] metadata in specific modules, but 
I haven't tried that.

Best,
Seth

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Maciek 
Sakrejda
Sent: Sunday, December 07, 2008 9:42 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] services-config.xml: compc or just mxmlc?

Does compc care about the contents of the services-config.xml file? If I 
compile a .swc component with compc with one set of services defined, but then 
change the services-config.xml file and build a .swf with mxmlc, are the mxmlc 
service definitions used for everything? Is it some weird combination? I know I 
can probably poke at this through experimentation, but the docs explicitly 
*don't* list service-config as an option that does not apply to compc, so I was 
curious.

-Maciek



RE: [flexcoders] Call Flex from JavaScript

2008-12-09 Thread Seth Hodgson
This page in the LCDS docset describes this specifically: 
http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/lcds/help.html?content=lcconnections_4.html#1074309

The scenario in the docs is dealing with notifying the server that the client 
is going away, in order to short-circuit the slower normal notification based 
on server session timeout. But you could use the same technique to achieve 
other things as well.

Best,
Seth


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of wkolcz
Sent: Monday, December 08, 2008 6:28 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Call Flex from JavaScript

Using a set up in my ActionScript of:
ExternalInterface.addCallback(tagWithClosed,windowClosed);

How can I write a JavaScript function that calls 'tagWithClosed' to Flex when 
the user closes the window (window.close() ) or when they leave for another 
page?



[flexcoders] Re: How to make Flex exchange data with Flash SWF file?

2008-12-09 Thread markflex2007
Thank.

How to get data from the swf.

Thanks

Mark



Re: [flexcoders] Re: Parsley MVC :: some thoughts

2008-12-09 Thread Paul Andrews

- Original Message - 
From: Ralf Bokelberg [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Tuesday, December 09, 2008 3:00 PM
Subject: Re: [flexcoders] Re: Parsley MVC :: some thoughts


 Hi Amy

 Afaik this is not possible in Flashplayer. A block of code is always
 running through without any interuption.

I think this has been part of the discussion in the thread. While it is what 
I would expect, if dispatching events causes all listening event handlers to 
be called synchronously, it means that any block of code dispatching an 
event is going to be interrupted and potentially unknown event listeners 
called during the execution of that code block.

Here's an interesting scenario:

If I have a block of code building a data structure and it has an object 
reference to some model. It could be that it encounters some situation and 
dispatches an event. The event handler may then interrogate the model, 
modify the model and control then returns to the executing block which is 
then unaware of the model change and still iterating through the model.

My expectation would be that dispatch event would add the event to a queue 
of events ready to be handled, but those would not be handled until the code 
block had completed.

In other systems/languages my code blocks would include semaphore handling 
to protect such data structures, but there's no option for me to do that in 
actionscript.

You may argue that the developer should 'know' what may potentially happen 
when  writing code and despatching events, but in practice who knows who may 
add a new event handler to the application in future and may introduce a 
problem.

I don't have a problem with all event handlers being called when an event is 
fully despatched, but that's potentially dangerous if it's done in the 
middle of a code block. Anyway it's just a thing to keep in mind. I would 
agree that it's a marginal and unlikely scenario.

Paul


Colin Moock has a good
 chapter of how all this works in his nice AS3 book.

 Cheers
 Ralf.



 On Tue, Dec 9, 2008 at 3:44 PM, Amy [EMAIL PROTECTED] wrote:

 I actually had this very thing happen in my code a couple of weeks
 ago. I normally expect that the code in a function will all run as a
 block unless, of course, I'm calling out to another function. But in
 one case, one of the statements I was using (addEventListener, I
 think), opened up enough of a timing hole in my code that some
 other code (not the function that was being added in the event
 listener, which might have been partially understandable) ran
 unexpectedly at that point. The only solution I found was to make
 sure I put all of the other code that _had_ to run in that block
 before anything else happened above the addEventListener code.

 -Amy

 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location: 
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives: 
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups 
 Links






[flexcoders] Automating Flex Modules

2008-12-09 Thread Denis
Hi everyone,

We have a Flex app that generates various charts that also need to 
find their way into printed reports. While we offer on-line 
functionality to export displayed charts and convert them into 
bitmaps, we also need to allow users to generate the preconfigured 
charts without displaying the flash component that generates them in 
the browser. In other words, we need to be able to generate the charts 
on the server.

Are there components that allow to open a flash file from the server 
and interact with it? Would AIR be helpful with this?

Any kind of guidance or direction would be greatly appreciated.

Regard,
Denis



RE: [flexcoders] Call Flex from JavaScript

2008-12-09 Thread wkolcz
Based on that and other examples, I tried this:

script language=JavaScript type=text/javascript
window.onunload = trackClosing;
function trackClosing(){
document.getElementById(FXVideo).tagWithClosed();
}

/script

In my constructor I have:
if (ExternalInterface.available){ 
ExternalInterface.addCallback(tagWithClosed,windowClosed);
}

It doesn't seem to work. Any ideas on what I am doing wrong?


From: Seth Hodgson [EMAIL PROTECTED]
Sent: Tuesday, December 09, 2008 9:50 AM
To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Call Flex from JavaScript 

This page in the LCDS docset describes this specifically: 
http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/lcds/help.html?content=lcconnections_4.html#1074309

The scenario in the docs is dealing with notifying the server that the client 
is going away, in order to short-circuit the slower normal notification based 
on server session timeout. But you could use the same technique to achieve 
other things as well.

Best,

Seth

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of wkolcz

Sent: Monday, December 08, 2008 6:28 PM

To: flexcoders@yahoogroups.com

Subject: [flexcoders] Call Flex from JavaScript

Using a set up in my ActionScript of:

ExternalInterface.addCallback(tagWithClosed,windowClosed);

How can I write a JavaScript function that calls 'tagWithClosed' to Flex when 
the user closes the window (window.close() ) or when they leave for another 
page?





[flexcoders] Re: Item Renderer focus on subcomponent in List

2008-12-09 Thread boilerman1984
I believe I found the problem.  I need to rewrite an event to return
multiple values from the item editor instead of the default 'text'
value.  I'll work on this and the tab should work I'm guessing. If it
does not I will report back.  Thanks for the help again.



RE: [flexcoders] Call Flex from JavaScript

2008-12-09 Thread Seth Hodgson
You need to pop a Javascript alert in your trackClosing() method to keep the 
browser from closing until the user clicks the OK button.

This technique is a hack, but an alert generally leads to a long enough delay 
in user interaction (say a second or two) to finish making your call into the 
Player before the browser process exits.

Best,
Seth

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of wkolcz
Sent: Tuesday, December 09, 2008 10:26 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Call Flex from JavaScript

Based on that and other examples, I tried this:

script language=JavaScript type=text/javascript
window.onunload = trackClosing;
function trackClosing(){
document.getElementById(FXVideo).tagWithClosed();
}

/script

In my constructor I have:
if (ExternalInterface.available){
ExternalInterface.addCallback(tagWithClosed,windowClosed);
}

It doesn't seem to work. Any ideas on what I am doing wrong?



From: Seth Hodgson [EMAIL PROTECTED]
Sent: Tuesday, December 09, 2008 9:50 AM
To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Call Flex from JavaScript
This page in the LCDS docset describes this specifically: 
http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/lcds/help.html?content=lcconnections_4.html#1074309

The scenario in the docs is dealing with notifying the server that the client 
is going away, in order to short-circuit the slower normal notification based 
on server session timeout. But you could use the same technique to achieve 
other things as well.

Best,
Seth

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of wkolcz
Sent: Monday, December 08, 2008 6:28 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Call Flex from JavaScript

Using a set up in my ActionScript of:
ExternalInterface.addCallback(tagWithClosed,windowClosed);

How can I write a JavaScript function that calls 'tagWithClosed' to Flex when 
the user closes the window (window.close() ) or when they leave for another 
page?






RE: [flexcoders] Call Flex from JavaScript

2008-12-09 Thread wkolcz
Unfortunately that is not an option. This is a video player tracking system on 
a very public landing page. 

Would onbeforeunload work better? Is there a way to just delay the closing of a 
page before it happens (behind the scenes)?

Any other javascript events that would work better?


From: Seth Hodgson [EMAIL PROTECTED]
Sent: Tuesday, December 09, 2008 10:32 AM
To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Call Flex from JavaScript 

You need to pop a Javascript alert in your trackClosing() method to keep the 
browser from closing until the user clicks the OK button.

This technique is a hack, but an alert generally leads to a long enough delay 
in user interaction (say a second or two) to finish making your call into the 
Player before the browser process exits.

Best,

Seth

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of wkolcz

Sent: Tuesday, December 09, 2008 10:26 AM

To: flexcoders@yahoogroups.com

Subject: RE: [flexcoders] Call Flex from JavaScript

Based on that and other examples, I tried this:

script language=JavaScript type=text/javascript

window.onunload = trackClosing;

function trackClosing(){

document.getElementById(FXVideo).tagWithClosed();

}

/script

In my constructor I have:

if (ExternalInterface.available){

ExternalInterface.addCallback(tagWithClosed,windowClosed);

}

It doesn't seem to work. Any ideas on what I am doing wrong?



From: Seth Hodgson [EMAIL PROTECTED]

Sent: Tuesday, December 09, 2008 9:50 AM

To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com

Subject: RE: [flexcoders] Call Flex from JavaScript

This page in the LCDS docset describes this specifically: 
http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/lcds/help.html?content=lcconnections_4.html#1074309

The scenario in the docs is dealing with notifying the server that the client 
is going away, in order to short-circuit the slower normal notification based 
on server session timeout. But you could use the same technique to achieve 
other things as well.

Best,

Seth

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of wkolcz

Sent: Monday, December 08, 2008 6:28 PM

To: flexcoders@yahoogroups.com

Subject: [flexcoders] Call Flex from JavaScript

Using a set up in my ActionScript of:

ExternalInterface.addCallback(tagWithClosed,windowClosed);

How can I write a JavaScript function that calls 'tagWithClosed' to Flex when 
the user closes the window (window.close() ) or when they leave for another 
page?





RE: [flexcoders] Call Flex from JavaScript

2008-12-09 Thread Seth Hodgson
Not that I'm aware of. Javascript alert is the only way to block a page close, 
and even then only until the user clicks OK. The various close-related events 
in Javascript exhibit subtle differences across browsers/versions and allowing 
a script to force a page to remain open (for any length of time 
programmatically including potentially indefinitely) would be a serious 
security and usability issue.

Best,
Seth

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of wkolcz
Sent: Tuesday, December 09, 2008 10:40 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Call Flex from JavaScript

Unfortunately that is not an option. This is a video player tracking system on 
a very public landing page.

Would onbeforeunload work better? Is there a way to just delay the closing of a 
page before it happens (behind the scenes)?

Any other javascript events that would work better?

From: Seth Hodgson [EMAIL PROTECTED]
Sent: Tuesday, December 09, 2008 10:32 AM
To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Call Flex from JavaScript
You need to pop a Javascript alert in your trackClosing() method to keep the 
browser from closing until the user clicks the OK button.

This technique is a hack, but an alert generally leads to a long enough delay 
in user interaction (say a second or two) to finish making your call into the 
Player before the browser process exits.

Best,
Seth

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of wkolcz
Sent: Tuesday, December 09, 2008 10:26 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Call Flex from JavaScript

Based on that and other examples, I tried this:

script language=JavaScript type=text/javascript
window.onunload = trackClosing;
function trackClosing(){
document.getElementById(FXVideo).tagWithClosed();
}

/script

In my constructor I have:
if (ExternalInterface.available){
ExternalInterface.addCallback(tagWithClosed,windowClosed);
}

It doesn't seem to work. Any ideas on what I am doing wrong?


From: Seth Hodgson [EMAIL PROTECTED]
Sent: Tuesday, December 09, 2008 9:50 AM
To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Call Flex from JavaScript
This page in the LCDS docset describes this specifically: 
http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/lcds/help.html?content=lcconnections_4.html#1074309

The scenario in the docs is dealing with notifying the server that the client 
is going away, in order to short-circuit the slower normal notification based 
on server session timeout. But you could use the same technique to achieve 
other things as well.

Best,
Seth

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of wkolcz
Sent: Monday, December 08, 2008 6:28 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Call Flex from JavaScript

Using a set up in my ActionScript of:
ExternalInterface.addCallback(tagWithClosed,windowClosed);

How can I write a JavaScript function that calls 'tagWithClosed' to Flex when 
the user closes the window (window.close() ) or when they leave for another 
page?






RE: [flexcoders] WebDAV and Flex - Any sample code or opensource widgets available . . ?

2008-12-09 Thread Seth Hodgson
Unfortunately, the Player currently limits the set of allowed HTTP methods to 
just GET and POST.

This means that PUT, DELETE, HEAD, etc. as well as all the WebDAV extension 
methods are not allowed.

Anyone who cares about this area should vote for this bug: 
https://bugs.adobe.com/jira/browse/SDK-12200
And perhaps add a new bug specifically regarding WebDAV, although support for 
that would definitely be lower priority.

As a workaround for core HTTP methods, you could use the proxy service in 
BlazeDS or LCDS which does supports all the core methods (mod PUT apparently - 
not sure why that one's not included, possibly a doc error). We use HTTPClient 
internally in the proxy service, and this library doesn't support WebDAV 
extension methods so you'd still be out of luck with WebDAV integration there 
as well.

Best,
Seth

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
marty_martian
Sent: Tuesday, December 09, 2008 7:35 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] WebDAV and Flex - Any sample code or opensource widgets 
available . . ?

I have searched through the archives for this user group but see very
little discussion on WebDAV with Flex. It looks like some folks have
been trying to do it as far back as 2006 but no samples or pointers to
samples or open source widgets have been posted.

Related to this, can anyone share:

- samples
- pointers to samples
- open source widgets

Most Grateful,

Christopher


RE: [flexcoders] JSP taglib FLEX 3

2008-12-09 Thread Seth Hodgson
You need to merge the entire web tier compiler WAR with your existing WAR. If 
you just move random jars over chances are good you'll miss some dependencies.

Best,
Seth

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of virchete
Sent: Tuesday, December 02, 2008 6:21 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] JSP taglib FLEX 3

I am trying to use the jsp tag library into a very simple jsp:

%@ taglib uri=FlexTagLib prefix=mm %
htmlbody
h3Introduction/h3
pThis is an example of writing MXML in a JSP./p
h3My App/h3
mm:mxml 
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
mx:Accordion width=500 height=300
mx:VBox label=panel1 width=500 height=200 /
/mx:Accordion
/mx:Application
/mm:mxml
/body/html

I have a Java project that uses STRUTS to redirect. Well the problem
is that, although I have included the flex-bootstrap.jar,
flex-bootstrap-jsp.jar, flex-webtier.jar and flex-webtier-jsp.jar I
always receive the same exception in the explorer or mozilla navigator:

java.lang.NullPointerException
flex.bootstrap.BootstrapTag.init(BootstrapTag.java:24)
flex.bootstrap.BootstrapBodyTag.init(BootstrapBodyTag.java:14)
flex.webtier.server.j2ee.jsp.MxmlTagImpl.init(MxmlTagImpl.java:2)

I am using Tomcat 6 server and I receive always the following trace:

EVERE: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: Unable to read TLD
META-INF/taglib.tld from JAR file
file:/C:/google2/MapasOpodo/build/web/WEB-INF/lib/flex-bootstrap.jar: 
java.lang.NullPointerException
at
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)
at
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
at
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:181)
at
org.apache.jasper.compiler.TagLibraryInfoImpl.init(TagLibraryInfoImpl.java:182)
at
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:420)
...
...
...

SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException
at flex.bootstrap.BootstrapTag.init(BootstrapTag.java:24)
at
flex.bootstrap.BootstrapBodyTag.init(BootstrapBodyTag.java:14)

Well If you need something more (the source code) don't doubt to ask
me. I am so sorry for having to find help, but I have lost all the day
of work today, and if you could help me...

Many Thanks
David Virgil.



Re: [flexcoders] WebDAV and Flex - Any sample code or opensource widgets available . . ?

2008-12-09 Thread Stephen More
How exactly do you envision WebDAV being used with flash ?

Couldn't one use flash.net.Socket to connect to port 80 and
communicate using the WebDAV protocol ?


On Tue, Dec 9, 2008 at 2:10 PM, Seth Hodgson shodg. wrote:
 Unfortunately, the Player currently limits the set of allowed HTTP methods
 to just GET and POST.

 This means that PUT, DELETE, HEAD, etc. as well as all the WebDAV extension
 methods are not allowed.

 Anyone who cares about this area should vote for this bug:
 https://bugs.adobe.com/jira/browse/SDK-12200
 And perhaps add a new bug specifically regarding WebDAV, although support
 for that would definitely be lower priority.

 As a workaround for core HTTP methods, you could use the proxy service in
 BlazeDS or LCDS which does supports all the core methods (mod PUT apparently
 - not sure why that one's not included, possibly a doc error). We use
 HTTPClient internally in the proxy service, and this library doesn't support
 WebDAV extension methods so you'd still be out of luck with WebDAV
 integration there as well.

 Best,
 Seth

 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of marty_martian
 Sent: Tuesday, December 09, 2008 7:35 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] WebDAV and Flex - Any sample code or opensource
 widgets available . . ?

 I have searched through the archives for this user group but see very
 little discussion on WebDAV with Flex. It looks like some folks have
 been trying to do it as far back as 2006 but no samples or pointers to
 samples or open source widgets have been posted.

 Related to this, can anyone share:

 - samples
 - pointers to samples
 - open source widgets

 Most Grateful,

 Christopher
 


Re: [flexcoders] XML Decoding

2008-12-09 Thread Richard Rodseth
This is unfortunate.
I got tired of custom XML decoding and wanted to use SimpleXMLDecoder +
Darron Schall's ObjectTranslator.
But SimpleXMLDecoder expects an XMLNode not an XML or XMLList

The technique described here is a possibility (perhaps my best option),
except I don't wish to decode the entire XML returned at once:

http://booleanbetrayal.com/2007/05/18/httpservice-xmldecode-objecttranslator-and-rabidsquirrels/

Converting an XML  to an XMLDocument via a string seems like a really bad
example to show people:

http://blog.flexexamples.com/2007/09/19/converting-xml-to-objects-using-the-flex-simplexmldecoder-class/

Any good new solutions out there?


On Fri, Aug 15, 2008 at 7:35 PM, Alex Harui [EMAIL PROTECTED] wrote:

I recommend custom conversion whether with static factory methods or
 something more brute force, although it might depend a bit on whether you're
 round-tripping the xml.  If you're not, and are going to be hitting
 attributes in the nodes frequently, it will probably pay to convert the node
 from xml to class instance, especially if you don't need all of the
 attributes.  Some webservices return a lot of data per-item that I'm just
 going to ignore and a generic XML walker iterates all the nodes and
 attributes while a custom one can pick and choose the few things it might
 need.


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Richard Rodseth
 *Sent:* Friday, August 15, 2008 5:07 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] XML Decoding



 Not yet, though I saw a reference to that in my Googling. I think I'm just
 going to hold my nose gently and make static factory methods that take an
 XML argument. I've been experimenting with the XML-backed idea and that's
 not too bad either.

 Harder to switch between XML and AMF I guess, but KISS applies too. Unless
 there's a good library out there yet to be revealed.

 On Fri, Aug 15, 2008 at 5:03 PM, Tracy Spratt [EMAIL PROTECTED]
 wrote:

 Have you looked at the Flex 3 functionality that reads the webservice wsdl
 and generates code for strongly typed access?



 It was way too complicated for my needs but might help answer your
 questions.

 Tracy


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Richard Rodseth
 *Sent:* Friday, August 15, 2008 5:12 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] XML Decoding



 What's the latest and greatest on XML Decoding?

 Reading the blogs and docs, it looks as though SimpleXMLDecoder +
 ObjectTranslator is one approach, but seems to rely on (deprecated?)
 XMLDocument and is not schema-aware.

 I've also considered defining some interfaces and providing XML-backed
 implementations that would point back to the nodes in the original DOM,
 perhaps with binding support and caching of the typed objects. But I think
 I'd just prefer a nice clean way to convert the whole structure to typed
 objects, and then throw the XML away.

 Any recommendations?



  



[flexcoders] clearing out mx:DateField

2008-12-09 Thread Stephen More
Within flex I have:
 mx:DateField id=effective /

Once a user selects a date, I can not clear it out using actionscript.

I have tried:
 effective.selectedDate = null;
 effective.selectedDate = undefined;
neither one has worked.

How can one clear out the mx:DateField ?

-Thanks


RE: [flexcoders] huge AMF messages

2008-12-09 Thread Seth Hodgson
If you sent these in a RemoteObject call, that 10MB worth of data would go to 
the server in the body of a single HTTP POST. No progress events, and depending 
on the receiving server it may enforce size limits on body content of HTTP 
requests but they'd likely be higher than 10MB.

Best,
Seth

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Robin 
Burrer
Sent: Tuesday, December 09, 2008 4:22 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] huge AMF messages

Hi all,

I planning to build an  AIR application. In this application the user can 
create libraries that consist of multiple value Entry objects.

Each EntryVO should look like this (there will be more properties of course) :

package vo
{
[RemoteClass(alias=vo.EntryVO)]

import flash.net.registerClassAlias;
import flash.utils.ByteArray;

public class EntryVO
{
[Bindable]
public var image_data:ByteArray;

[Bindable]
public var image_name:String;


public static  function register():void
{
registerClassAlias(vo.EntryVO, EntryVO);
}

}

}


To simplify the uploading and downloading process I want to transfer images as 
ByteArrays to a .NetBackend.
My question: What are my limitations here file size wise?  Let's say I have 10 
EntryVO. An each of these
has an 1 MB byte array embedded.

That
means that my libraryVO (10 x 1 MB EntryVO)  would have a file size of 10 MB.

Will this work at all? Is there a progress event for remote operations? I guess 
it will take a while to transfer
a 10 MB AMF message.


Thanks for any input!


Cheers

Robin



[flexcoders] getBitmapData from a scaled display object

2008-12-09 Thread Kyle

I'm trying to figure out the easiest way to get bitmapdata from a
displayobject that has had its scalex/scaley altered. In the test
example I have listed below, I have a canvas container that has 3
children (swfLoader components). I set the scalex/scaley of the canvas
container to 2 and its' children are scaled up proportionally;
however, when I try to get bitmapdata from the canvas, it does not
recognize the scaled size of the canvas container and as such when I
create a new bitmap using the data it is still at the original size.
Any ideas on how I can get bitmapdata that will match the width/height
of the scaled canvas would be greatly appreciated!





?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute creationComplete=createImage()

mx:Script
![CDATA[
import mx.controls.SWFLoader;
import mx.utils.ObjectUtil;
import mx.graphics.codec.PNGEncoder;

var displayObject2:Canvas;

private function createImage():void
{   
displayObject2 = new Canvas();
displayObject2.setStyle(backgroundColor,0xc0c0c0);
displayObject2.width = myCanvas.width;
displayObject2.height = myCanvas.height;
for( var x=0; xmyCanvas.numChildren; x++ )
{
var curChild:SWFLoader = myCanvas.getChildAt( x 
) as SWFLoader;
var newChild:SWFLoader = new SWFLoader();
newChild.source = curChild.source;
newChild.x = curChild.x;
newChild.y = curChild.y;

displayObject2.addChild( newChild );
}

displayObject2.scaleX = displayObject2.scaleY = 2;
displayObject2.y = 300;
addChild( displayObject2 );
}

private function scaleChild( e:Event ):void
{
e.target.width = e.target.contentWidth * 2;
e.target.height = e.target.contentHeight * 2;
}

private function createBitmap( e:Event ):void
{
var w = displayObject2.width;
var h = displayObject2.height;
var bitmapdata:BitmapData = new BitmapData( w, h, true, 
0x00C0C0C0 );
bitmapdata.draw( displayObject2 );

var bytearray:ByteArray;
var encoder:PNGEncoder = new PNGEncoder();
bytearray = encoder.encode( bitmapdata );
myImage.source = bytearray;
}
]]
/mx:Script
mx:Canvas x=10 y=10 width=200 height=200
backgroundColor=#FF id=myCanvas
mx:SWFLoader x=10 y=30

mx:sourcehttp://media.dev.freakatars.com.s3.amazonaws.com/2/0/2d78ad53630bb25563ab28da6c9a3968.swf/mx:source
/mx:SWFLoader
mx:SWFLoader x=60 y=53

mx:sourcehttp://media.dev.freakatars.com.s3.amazonaws.com/2/0/5a97b1888731df7c766a4e274d766b20.swf/mx:source
/mx:SWFLoader
mx:SWFLoader x=122 y=76

mx:sourcehttp://media.dev.freakatars.com.s3.amazonaws.com/2/0/605299b92bc3993319ceb9490eb52b0f.swf/mx:source
/mx:SWFLoader
/mx:Canvas
mx:Button x=119 y=218 label=Create PNG
click=createBitmap(event);/
mx:Image x=460 y=10 id=myImage/
/mx:Application





RE: [flexcoders] WebDAV and Flex - Any sample code or opensource widgets available . . ?

2008-12-09 Thread Seth Hodgson
Agreed, but one caution: Implementing things from scratch on top of 
flash.net.Socket may be an option for some limited use cases, but without the 
direct browser integration it doesn't make for a great general solution (in the 
case of WebDAV, or for general HTTP)

You lose integrated auth (NTLM for instance), security (SSL/certificate 
truststore and UI to manage it), state (cookies - whether you love them or hate 
them), etc. that the Player gets for free when it uses the browser's HTTP 
stack. This stuff turns out to be pretty valuable in practice.

Best,
Seth

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Stephen 
More
Sent: Tuesday, December 09, 2008 11:15 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] WebDAV and Flex - Any sample code or opensource 
widgets available . . ?

How exactly do you envision WebDAV being used with flash ?

Couldn't one use flash.net.Socket to connect to port 80 and
communicate using the WebDAV protocol ?

On Tue, Dec 9, 2008 at 2:10 PM, Seth Hodgson shodg. wrote:
 Unfortunately, the Player currently limits the set of allowed HTTP methods
 to just GET and POST.

 This means that PUT, DELETE, HEAD, etc. as well as all the WebDAV extension
 methods are not allowed.

 Anyone who cares about this area should vote for this bug:
 https://bugs.adobe.com/jira/browse/SDK-12200
 And perhaps add a new bug specifically regarding WebDAV, although support
 for that would definitely be lower priority.

 As a workaround for core HTTP methods, you could use the proxy service in
 BlazeDS or LCDS which does supports all the core methods (mod PUT apparently
 - not sure why that one's not included, possibly a doc error). We use
 HTTPClient internally in the proxy service, and this library doesn't support
 WebDAV extension methods so you'd still be out of luck with WebDAV
 integration there as well.

 Best,
 Seth

 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of marty_martian
 Sent: Tuesday, December 09, 2008 7:35 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] WebDAV and Flex - Any sample code or opensource
 widgets available . . ?

 I have searched through the archives for this user group but see very
 little discussion on WebDAV with Flex. It looks like some folks have
 been trying to do it as far back as 2006 but no samples or pointers to
 samples or open source widgets have been posted.

 Related to this, can anyone share:

 - samples
 - pointers to samples
 - open source widgets

 Most Grateful,

 Christopher




Re: [flexcoders] Listening for both Mouse Down and Double Click events.

2008-12-09 Thread Brendan Meutzner
There is a double click event you can listen for on UIComponent... just make
sure that doubleClickEnabled is set to true on the instance you're setting
the listener on.

Brendan



On Tue, Dec 9, 2008 at 11:04 AM, flexaustin [EMAIL PROTECTED] wrote:

   Is it possible to listen for both a mouse down and doubleclick events
 without using some sort of timer? On mouse down start timer to listen
 for a another mouse down?

 If you listen for a mouse down and in the mouse down handler add
 another listener to listen for some other action is a possibility I
 guess, but would it add the listener in time?

 TIA

  




-- 
Brendan Meutzner
http://www.meutzner.com/blog/


[flexcoders] Re: clearing out mx:DateField

2008-12-09 Thread jim.abbott45
Hmm . . . I would think that should work, I've used the
foo.selectedDate = null technique before.

Here's how my technique for clearing out a DateField looks (in this
example: it is filtering a data provider, and 'tomorrowOn' is an
instance of an Object which has a rangeStart property):

startDateField.selectedDate = null; 
startDateField.disabledRanges = new Array();
startDateField.disabledRanges.push(tomorrowOn);
openingDataProvider.refresh();


--- In flexcoders@yahoogroups.com, Stephen More [EMAIL PROTECTED]
wrote:

 Within flex I have:
  mx:DateField id=effective /
 
 Once a user selects a date, I can not clear it out using actionscript.
 
 I have tried:
  effective.selectedDate = null;
  effective.selectedDate = undefined;
 neither one has worked.
 
 How can one clear out the mx:DateField ?
 
 -Thanks





RE: [flexcoders] clearing out mx:DateField

2008-12-09 Thread Ryan Graham

 effective.selectedDate = null;

 

This should clear it.  Perhaps the actionscript function containing this
code isn't getting called.

 

HTH,

Ryan

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Stephen More
Sent: Tuesday, December 09, 2008 12:18 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] clearing out mx:DateField

 

Within flex I have:
mx:DateField id=effective /

Once a user selects a date, I can not clear it out using actionscript.

I have tried:
effective.selectedDate = null;
effective.selectedDate = undefined;
neither one has worked.

How can one clear out the mx:DateField ?

-Thanks

 



This message is private and confidential. If you have received it in error, 
please notify the sender and remove it from your system.

Re: [flexcoders] Re: Bug: flash.display.Graphics being removed.

2008-12-09 Thread Nate Beck
It is showing up in the 3.x branch.

On Tue, Dec 9, 2008 at 9:01 AM, flexaustin [EMAIL PROTECTED] wrote:

   In Flex 3.1 framework import flash.display.Graphics isn't showing in
 code hinting.


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 sunild99 [EMAIL PROTECTED] wrote:
 
  Usually, when code completion stops working in Flex Builder, it's
 because the I'm editing
  has an error/omission in it...
 
  Sunil
 
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, li
 wenzhi lwz7512@ wrote:
  
   in my flex project using flexsdk3.1, while coding in flexbuilder,
 the uicomponent
  cannot auto hint the graphics attribute after .
   graphics missing in flexsdk3.1?
  
   --
   lwz7512
   Ultrapower Flex Team Leader
   OpenRIA -- A Window You Exploring RIA World
   http://www.rimeeting.cn
  
  
  
  
   
   From: flexaustin flexaustin@
   To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
   Sent: Saturday, December 6, 2008 5:56:11 AM
   Subject: [flexcoders] Bug: flash.display.Graphics being removed.
  
  
   Has anyone had this issue? I do the following (using Flex Builder 3
   w/ sdk 3.1 and Flash Player 10).
  
   // BEGIN CODE  - - - - --
   import flash.display. Graphics;
  
   public function get drawGraphics( ):Graphics {
   if(_drawing) {
   return _drawing.graphics;
   } else {
   return null;
   }
   }
   // END CODE  - - - - 
  
   Every 3rd or 4th time I save my file, Flex Builder removes my import
   statement then I get t1046 Type not found...
  
 

  



RE: [flexcoders] AIR Application - Positioning.

2008-12-09 Thread Wildbore, Brendon
You could find the resolution,subtract the initial width of you app then set 
this to your apps (x,y) coordinates?

Would so something like (pseudo-code):
this.x = Capabilities.screenResolutionX - this.width;
this.x = Capabilities.screenResolutionY - this.height;

I'm not sure this would be the 'best' way of doing so but I struggled to find 
anyway on the web as well




From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Daniel
Sent: Tuesday, 9 December 2008 11:04 p.m.
To: flexcoders@yahoogroups.com
Subject: [flexcoders] AIR Application - Positioning.


Hi,

I have a requirement for an application, it provides extensions based
on a name entry box.

The client would like it to appear as a system tray icon, and when you
click it, the application opens above it. When you find results the
application window stretches upwards to show the results.

My google powers have failed me and I'm unsure on the best way to
tackle this. Two possibilities, I assume, are to make a 100% screen
size transparent application with an area visible in the bottom right
OR just resize the application in the bottom right.

I'm unsure on either at the moment.

Thanks, Dan



Re: [flexcoders] clearing out mx:DateField

2008-12-09 Thread Stephen More
On Tue, Dec 9, 2008 at 2:44 PM, Ryan Graham Ryan. wrote:
 effective.selectedDate = null;
 This should clear it.  Perhaps the actionscript function containing this
 code isn't getting called.

Sort of.

My flex also has a mx:List with a dataProvider.

I try to clear the List with:
 myitems.selectedItems = null;

This is actually clearing the List, but every line of code after this
not executing.

So I guess the real question is what is the right way to clear a mx:List ?


 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Stephen More
 Sent: Tuesday, December 09, 2008 12:18 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] clearing out mx:DateField



 Within flex I have:
 mx:DateField id=effective /

 Once a user selects a date, I can not clear it out using actionscript.

 I have tried:
 effective.selectedDate = null;
 effective.selectedDate = undefined;
 neither one has worked.

 How can one clear out the mx:DateField ?

 -Thanks

 This message is private and confidential. If you have received it in error,
 please notify the sender and remove it from your system.
 


RE: [flexcoders] errorTip fontSize break the tooltip? Possible bug?

2008-12-09 Thread Alex Harui
I'd say that's a bug.  Tooltip doesn't re-measure correctly.  Note that it 
would never auto-resize once it did measure correctly since parents size their 
children in Flex so you'd have to size the Tooltip later.

ToolTip basically expects its styles to be set in the errorTip style 
declaration and should evaluate that properly within createToolTip.  You can 
provide an alternative ToolTipClass that handles your situation.


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Fotis 
Chatzinikos
Sent: Monday, December 08, 2008 5:24 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] errorTip fontSize break the tooltip? Possible bug?


Here you are: (And a screenshot - via mail - have not tried before so do not 
know if attachment work here...)

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute 
creationComplete=init()
mx:Script
![CDATA[
import mx.managers.ToolTipManager;
import mx.controls.ToolTip;

private var saveTip:ToolTip = null ;

private function init():void
{
saveTip = ToolTipManager.createToolTip(You need to save your 
changes!,50,50) as ToolTip;
saveTip.setStyle(styleName, errorTipGreen);
}
]]
/mx:Script
mx:Style
.errorTipGreen
{
color: #FF;
fontSize: 11;
fontWeight: bold;
shadowColor: #00;
borderColor: #00FF00;
borderStyle: errorTipAbove;
paddingBottom: 4;
paddingLeft: 4;
paddingRight: 4;
paddingTop: 4;
}

/mx:Style
/mx:Application

On Mon, Dec 8, 2008 at 8:25 PM, Alex Harui [EMAIL PROTECTED]mailto:[EMAIL 
PROTECTED] wrote:

Can you post an entire test case that is as small as possible?



From: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com] On 
Behalf Of Fotis Chatzinikos
Sent: Monday, December 08, 2008 9:44 AM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: Re: [flexcoders] errorTip fontSize break the tooltip? Possible bug?



bump :-)

Sorry did not get a reply on this... Could somebody test? Alex?

On Thu, Dec 4, 2008 at 1:01 PM, fotis.chatzinikos [EMAIL 
PROTECTED]mailto:[EMAIL PROTECTED] wrote:

Hi, the following works:

.errorTip
{
color: #FF;
/*fontSize: 11;*/
fontWeight: bold;
shadowColor: #00;
borderColor: #FF;
borderStyle: errorTipAbove;
paddingBottom: 4;
paddingLeft: 4;
paddingRight: 4;
paddingTop: 4;
}

If I un-comment fontSize, the font gets bigger but the tooltip text
gets outside of the tooltips 'area'. Ie text length is 200 pixels and
tooltips area 150 pixels... Is the tooltip's area calculations
hardcoded to font size 9?

Fotis



--
Fotis Chatzinikos, Ph.D.
Founder,
Phinnovation
[EMAIL PROTECTED]mailto:[EMAIL PROTECTED],



--
Fotis Chatzinikos, Ph.D.
Founder,
Phinnovation
[EMAIL PROTECTED]mailto:[EMAIL PROTECTED],



[flexcoders] Re: speed of the for each looping

2008-12-09 Thread Cato Paus
Hi and thanks for your deep explanation :) and yes I run the profiler,
and are doing some improvement here and there, the real question is
how the for each is working. I have been browsing the internet and
all the bibels on ActionScript 3, but did not found any good
explanation on the matter.


--- In flexcoders@yahoogroups.com, Maciek Sakrejda [EMAIL PROTECTED] wrote:

 If you're trying to speed up your application, you should use the
 profiler. Something like the difference between a manually indexed for
 loop and a for-each loop is almost certain to be trivial.
 
 If you don't have the profiler, run an ad-hoc perf test by doing
 something like
 
 // we need to construct something to iterate over:
 var iterations:int = 100;
 var arr:Array = [];
 for (var i:int = 0; i  iterations; i++) arr.push(i);
 var dummy:int = 0;
 
 var forBeginning:Number = new Date().getTime();
 for (var j:int = 0; j  iterations; j++)
 {
 // we need to do something in the loop so the whole thing
 // is not just optimized out (not sure if FP does this, but
 // it can), but we don't want to use trace() since I/O is
 // relatively expensive compared to the cost of the loop itself
 dummy = arr[j];
 } 
 trace(for loop took  + (new Date().getTime() - forBeginning) + 
 milliseconds);
 
 var forEachBeginning:Number = new Date().getTime();
 for each (var k:int in arr)
 {
 dummy = k;
 }
 trace(for-each loop took  + (new Date().getTime() - forEachBeginning)
 +  milliseconds);
 
 That should give you an idea of the difference (but run this many times
 and average it, and vary the order of the loops). Also, keep in mind
 that most of the time, you won't be iterating over a million items.
 Bottlenecks can occur in surprising places (though they're often found
 in common places too, like Container layout code). Don't try to optimize
 things that *seem like* they would be slow without actually confirming
 not only that they *are* slow, but that they are affecting the overall
 speed or responsiveness of your application. It makes no sense to make a
 10x performance improvement in one part of your code that accounts
 for .01% of your application's CPU usage.
 
 -- 
 Maciek Sakrejda
 Truviso, Inc.
 http://www.truviso.com
 
 -Original Message-
 From: Cato Paus [EMAIL PROTECTED]
 Reply-To: flexcoders@yahoogroups.com
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] speed of the for each looping
 Date: Tue, 09 Dec 2008 13:28:23 -
 
 Hi, all you experts :)
 
 I'm tying to speed up my application and I use a lot of
 
 exsample
 for (var i:int = 0; i  5; i++)
 {
 trace(i);
 } 
 
 so is the for each looping faster ?





[flexcoders] Re: Item Renderer focus on subcomponent in List

2008-12-09 Thread boilerman1984
I fixed the run time error by writing a function to pass the two text
box variables back to the data provider.  (ItemEditEnd=func(event);)
Fixed it.  So now I can tab into the List's first component but once
focus is on the first renderer I can only tab and shift between the
two boxes in the first renderer.  It's like the focus is stuck there.
Any ideas.  

Here is the code I added for the ItemEditEnd function.  Not sure if
that messes up tabbing and focus.

---
public function endEditRenderer(event:ListEvent):void { 
event.preventDefault();
   
list.editedItemRenderer.data.first=   
Renderer(event.currentTarget.itemEditorInstance).firstName.text);

list.editedItemRenderer.data.last=  
Renderer(event.currentTarget.itemEditorInstance).lastName.text;

list.destroyItemEditor();

list.dataProvider.itemUpdated(list.editedItemRenderer);
  
}



RE: [flexcoders] clearing out mx:DateField

2008-12-09 Thread Alex Harui
To clear selection from a list, set selectedIndex = -1

Setting selectedDate = null worked for me.

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Stephen 
More
Sent: Tuesday, December 09, 2008 12:00 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] clearing out mx:DateField


On Tue, Dec 9, 2008 at 2:44 PM, Ryan Graham Ryan. wrote:
 effective.selectedDate = null;
 This should clear it. Perhaps the actionscript function containing this
 code isn't getting called.

Sort of.

My flex also has a mx:List with a dataProvider.

I try to clear the List with:
myitems.selectedItems = null;

This is actually clearing the List, but every line of code after this
not executing.

So I guess the real question is what is the right way to clear a mx:List ?

 From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com 
 [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On
 Behalf Of Stephen More
 Sent: Tuesday, December 09, 2008 12:18 PM
 To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
 Subject: [flexcoders] clearing out mx:DateField



 Within flex I have:
 mx:DateField id=effective /

 Once a user selects a date, I can not clear it out using actionscript.

 I have tried:
 effective.selectedDate = null;
 effective.selectedDate = undefined;
 neither one has worked.

 How can one clear out the mx:DateField ?

 -Thanks

 This message is private and confidential. If you have received it in error,
 please notify the sender and remove it from your system.




RE: [flexcoders] Cannot Tab to MovieClips from Flash SWF Loaded with SWFLoader

2008-12-09 Thread Alex Harui
The CS3 entities need to implement IFocusManagerComponent.  You might be able 
to use the Flash Component Kit to do that

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
aut0poietic
Sent: Tuesday, December 09, 2008 7:47 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Cannot Tab to MovieClips from Flash SWF Loaded with 
SWFLoader


Title pretty much says it all:

I have a Flex 3 application which can basically be summed up as a SWF
player which loads SWF's created in Flash CS3.

When the SWF's are loaded, I can interact with them using the mouse
(click/mouseover, etc). However, these items cannot be tabbed to.

I've been hacking around on this all morning, without much luck. I've
ensured that every item in the application either has a tabIndex and
is .tabEnabled or has tabEnabled=false and tabChildren=true.

I've even resorted to enumerating over the child MovieClips in the swf
(using swfLoaderInstance.content.getChildAt()) and setting tabEnabled
and focusRect are both true, and confirming that the tabIndex on these
mc's was preserved.

I'm at a serious loss as to what to do next -- I can't have
controls/interactions that the user can't tab to. Am I missing
something simple? A setting on the SWFLoader? The Application?

Hope someone's had to deal with this before and knows a solution.

Jer



RE: [flexcoders] Defining, but not adding to parent in MXML

2008-12-09 Thread Alex Harui
If it doesn't need to truly float, consider using states and 
addChild/removeChild

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Michael 
Prescott
Sent: Tuesday, December 09, 2008 5:59 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Defining, but not adding to parent in MXML


That's it exactly.  Basically, we have a number of situations where we need to 
add pop-up details to elements in our application, so I thought I'm trying to 
make reusable non-visual component that orchestrates that, like this:

mx:Whatever id=summary/

mx:Canvas id=myPopUp
  mx:Label text=All sorts of useful information/
/mx:Canvas

my:PopUpDetail
target={summary}
popUp={myPopUp}
popUpOnRollover=true
popUpOnFocus=true /

So I've dug around in PopUpButton to see how it manages its pop-up, and that 
looks simple enough.  But PopUpButton uses the existence of popUp.parent to 
determine whether it is managing the pop up yet (no parent, and it assumes that 
it isn't) - so it seemed that, along with my not knowing about 
includeInLayout=false, creating the popup control in some sort of parentless 
way was important.

Michael

On Tue, Dec 9, 2008 at 1:33 AM, Josh McDonald [EMAIL PROTECTED]mailto:[EMAIL 
PROTECTED] wrote:

I think he's intending to use PopupManager, but wants to define it in the same 
file as its container?

On Tue, Dec 9, 2008 at 4:30 PM, Alex Harui [EMAIL PROTECTED]mailto:[EMAIL 
PROTECTED] wrote:

Why not use tooltip or popup manager to float that thing?  Then it won't be 
clipped and what not



From: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com] On 
Behalf Of Josh McDonald
Sent: Monday, December 08, 2008 5:04 PM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Defining, but not adding to parent in MXML



That's not exactly what you're after, in this case the object will be added to 
the list of children, it's just not positioned on parent.updateDisplayList() or 
counted during parent.measure().

The only way I can think of off the top of my head to do what you're after is 
wrap it in mx:Array. Here's a quick example:

http://pastie.textmate.org/private/hjd33kkztkuojpzltd2ylw

You can use mx:component to do thins kind of like this, but mx:component 
defines classes,  not interfaces, and IIRC, mxmlc is kinda picky as to where 
it'll let you do it.

-Josh

On Tue, Dec 9, 2008 at 10:53 AM, Michael Prescott [EMAIL 
PROTECTED]mailto:[EMAIL PROTECTED] wrote:

Sweet!  Nice that there's an easy answer.



On Mon, Dec 8, 2008 at 4:47 PM, Tracy Spratt [EMAIL PROTECTED]mailto:[EMAIL 
PROTECTED] wrote:

includeInLayout=false (also visible=false, of course)



Tracy





From: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com] On 
Behalf Of Michael Prescott
Sent: Monday, December 08, 2008 4:28 PM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: [flexcoders] Defining, but not adding to parent in MXML



Is it possible to define a component but somehow cause it to be omitted from 
the enclosing component's list of children?  Essentially:

mx:VBox
  mx:Label text=This is added as a child of the vbox, as normal./
  mx:Label visible=false text=This is invisible.. but is there some way to 
not have it be a child of the vbox at all?/
/mx:VBox

An obvious question is, Why are you defining the component there if it's not 
supposed to be a child?

I've got a datagrid inline item renderer that always shows a (summary) piece of 
information, but I want a pop-up to appear on rollover of the summary.  The 
problem I'm having is that the detail is (of course) added to the container 
that holds the summary, which causes the datagrid cell to blow open too big.

mx:itemRenderer
  mx:Component
mx:Box
  !-- This always shows up, which is fine and dandy --
  mx:MySummary data={data}  popUp={detail} /

  !-- It would be nice if this was never added to the parent box, so that 
it's free to be used as a popup --
  mx:MyDetail id=detail data={data}/
/mx:Box
  /mx:Component
/mx:itemRenderer

Defining the detail outside the itemrenderer entirely seems one way to go, 
except that this would mean there's only one pop up for all of the rows of the 
data grid.

Can you do this sort of thing with a nested component?

mx:itemRenderer
  mx:Component
mx:Box
  !-- This always shows up, which is fine and dandy --
  mx:MySummary data={data}
mx:popUp
  mx:Component
mx:MyDetail id=detail data={data}/
  /mx:Component
/mx:popUp
  /mx:MySummary
/mx:Box
  /mx:Component
/mx:itemRenderer

Any tips would be appreciated!

Michael





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

Like the cut of my jib? Check out my Flex blog!

:: Josh 'G-Funk' 

RE: [flexcoders] speed of the for each looping

2008-12-09 Thread Alex Harui
For each should be much slower than a basic iterator as it has to walk the 
object's properties.

For each (var p:* in someObject)

And

For (var p:String in SomeObject)

Probably run at the same rate.

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Cato 
Paus
Sent: Tuesday, December 09, 2008 5:28 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] speed of the for each looping


Hi, all you experts :)

I'm tying to speed up my application and I use a lot of

exsample
for (var i:int = 0; i  5; i++)
{
trace(i);
}

so is the for each looping faster ?



RE: [flexcoders] Please Help: Shift data Up|Down in array/datagrid

2008-12-09 Thread Alex Harui
What do your datastructures look like before and after?

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
cox.blair
Sent: Tuesday, December 09, 2008 4:44 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Please Help: Shift data Up|Down in array/datagrid


Hi everyone, hope someone can offer a suggestion to solve this, or at
least let me know if it possible within Flex/ActionScript.

Here is my sample data:

Date Var1 Var2
-
Mon 34 45
Tues 67 87
Wed 83 12
Thurs 89 23
Fri 12 98
... ... ...

Lets say there is more data, but this is what is visible at the moment.

Question: How could I adjust the Var2 column by essentially moving it
up or down within its column? So if I moved it down (perhaps adding a
null reference to the first row) 45 would appear in the Tues row,
however Var1 would not be changed. If we were to move it up, the 45
would be removed and the 98 in the Fri row would move to Thurs.

At best, it would be good to be able to do this with a slider control
and have it return to normal without destroying the original data
loaded in the array. I was thinking of a custom filter function,
however could not find any references that indicated it could be used
in this manner. Would IViewCursor be capable of doing this? As long as
the datagrid showed the changes, I would be able to perform the
necessary calculations on the adjusted data - correlation.

Any thoughts whatsoever would be greatly appreciated.

--
Blair



RE: [flexcoders] Re: Item Renderer focus on subcomponent in List

2008-12-09 Thread Alex Harui
That sounds like you're still calling preventDefault on the keyFocusChange 
event.

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
boilerman1984
Sent: Tuesday, December 09, 2008 12:16 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Item Renderer focus on subcomponent in List


I fixed the run time error by writing a function to pass the two text
box variables back to the data provider. (ItemEditEnd=func(event);)
Fixed it. So now I can tab into the List's first component but once
focus is on the first renderer I can only tab and shift between the
two boxes in the first renderer. It's like the focus is stuck there.
Any ideas.

Here is the code I added for the ItemEditEnd function. Not sure if
that messes up tabbing and focus.

---
public function endEditRenderer(event:ListEvent):void {
event.preventDefault();

list.editedItemRenderer.data.first=
Renderer(event.currentTarget.itemEditorInstance).firstName.text);

list.editedItemRenderer.data.last=
Renderer(event.currentTarget.itemEditorInstance).lastName.text;

list.destroyItemEditor();

list.dataProvider.itemUpdated(list.editedItemRenderer);

}



RE: [flexcoders] getBitmapData from a scaled display object

2008-12-09 Thread Ryan Graham

You may have to play with some of the positioning, but use the second
parameter of the bitmapData.draw() function to pass in the object's
transform matrix as a start. This should get you closer...

 

bitmapdata.draw( displayObject2, displayObject2.transform.matrix );

 

HTH,

Ryan

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Kyle
Sent: Tuesday, December 09, 2008 12:21 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] getBitmapData from a scaled display object

 


I'm trying to figure out the easiest way to get bitmapdata from a
displayobject that has had its scalex/scaley altered. In the test
example I have listed below, I have a canvas container that has 3
children (swfLoader components). I set the scalex/scaley of the canvas
container to 2 and its' children are scaled up proportionally;
however, when I try to get bitmapdata from the canvas, it does not
recognize the scaled size of the canvas container and as such when I
create a new bitmap using the data it is still at the original size.
Any ideas on how I can get bitmapdata that will match the width/height
of the scaled canvas would be greatly appreciated!

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute creationComplete=createImage()

mx:Script
![CDATA[
import mx.controls.SWFLoader;
import mx.utils.ObjectUtil;
import mx.graphics.codec.PNGEncoder;

var displayObject2:Canvas;

private function createImage():void
{ 
displayObject2 = new Canvas();
displayObject2.setStyle(backgroundColor,0xc0c0c0);
displayObject2.width = myCanvas.width;
displayObject2.height = myCanvas.height;
for( var x=0; xmyCanvas.numChildren; x++ )
{
var curChild:SWFLoader = myCanvas.getChildAt( x ) as SWFLoader;
var newChild:SWFLoader = new SWFLoader();
newChild.source = curChild.source;
newChild.x = curChild.x;
newChild.y = curChild.y;

displayObject2.addChild( newChild );
}

displayObject2.scaleX = displayObject2.scaleY = 2;
displayObject2.y = 300;
addChild( displayObject2 );
}

private function scaleChild( e:Event ):void
{
e.target.width = e.target.contentWidth * 2;
e.target.height = e.target.contentHeight * 2;
}

private function createBitmap( e:Event ):void
{
var w = displayObject2.width;
var h = displayObject2.height;
var bitmapdata:BitmapData = new BitmapData( w, h, true, 0x00C0C0C0 );
bitmapdata.draw( displayObject2 );

var bytearray:ByteArray;
var encoder:PNGEncoder = new PNGEncoder();
bytearray = encoder.encode( bitmapdata );
myImage.source = bytearray;
}
]]
/mx:Script
mx:Canvas x=10 y=10 width=200 height=200
backgroundColor=#FF id=myCanvas
mx:SWFLoader x=10 y=30

mx:sourcehttp://media.dev.freakatars.com.s3.amazonaws.com/2/0/2d78ad53
630bb25563ab28da6c9a3968.swf/mx:source
/mx:SWFLoader
mx:SWFLoader x=60 y=53

mx:sourcehttp://media.dev.freakatars.com.s3.amazonaws.com/2/0/5a97b188
8731df7c766a4e274d766b20.swf/mx:source
/mx:SWFLoader
mx:SWFLoader x=122 y=76

mx:sourcehttp://media.dev.freakatars.com.s3.amazonaws.com/2/0/605299b9
2bc3993319ceb9490eb52b0f.swf/mx:source
/mx:SWFLoader
/mx:Canvas
mx:Button x=119 y=218 label=Create PNG
click=createBitmap(event);/
mx:Image x=460 y=10 id=myImage/
/mx:Application

 



This message is private and confidential. If you have received it in error, 
please notify the sender and remove it from your system.

RE: [flexcoders] Re: How to make Flex exchange data with Flash SWF file?

2008-12-09 Thread Tracy Spratt
SWFLoader.content.myPublicMember

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of markflex2007
Sent: Tuesday, December 09, 2008 12:51 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: How to make Flex exchange data with Flash SWF
file?

 

Thank.

How to get data from the swf.

Thanks

Mark

 



[flexcoders] Failed to load policy file from http://localhost:8881/crossdomain.xml

2008-12-09 Thread luvfotography
I'm getting this error when I run my program from my FLEX Builder.

Failed to load policy file from http://localhost:8881/crossdomain.xml

Warning: Failed to load policy file from http://localhost:8881/crossdomain.xml
Error: Request for resource at http://localhost:8881 by requestor from 
http://s.ytimg.com/yt/swf/cps-vfl67854.swf is denied due to lack of policy file 
permissions.


My program is loading a video from youtube, and results in this error.

Where do I put my crossdomain file?? 

thanks, 



[flexcoders] Locally generated Flex content not working with IE7

2008-12-09 Thread walveranta
I'm having difficulty with locally generated Flex content not showing
up in IE7. When attempting to view Flex-generated content from a local
dev server in IE7 I get the message: Alternate HTML content should be
placed here. This content requires the Adobe Flash Player. Get Flash

The same content works fine in FF3. I've uninstalled the Flash players
using uninstall_flash_player.exe, reinstalled Flex 3.0.2, installed
the included debug versions Flash players
(http://www.mediacollege.com/adobe/flash/player/version/show.html
shows version 9,0,124,0 installed on both IE7 and FF3). Tried also to
uninstall Flash players and to install the latest version (10,0,12,36)
for both browsers. The problem doesn't go away.

Flex content from elsewhere (on the web) works fine in IE7 - just not
locally generated content. The -use-network switch should not be
applicable because the development server is separate from my
workstation (but I've tried it with true/false values and it made no
difference).

Any thoughts as to what could be causing the problem, and how I might
be able to resolve it? 

Thanks!

Ville




RE: [flexcoders] Locally generated Flex content not working with IE7

2008-12-09 Thread Wildbore, Brendon
Sounds like an issue with the javascript in the html template you are using 
rather than an issue with the generated flex swf file.

Check your ie browser javascript settings...


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
walveranta
Sent: Wednesday, 10 December 2008 10:10 a.m.
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Locally generated Flex content not working with IE7


I'm having difficulty with locally generated Flex content not showing
up in IE7. When attempting to view Flex-generated content from a local
dev server in IE7 I get the message: Alternate HTML content should be
placed here. This content requires the Adobe Flash Player. Get Flash

The same content works fine in FF3. I've uninstalled the Flash players
using uninstall_flash_player.exe, reinstalled Flex 3.0.2, installed
the included debug versions Flash players
(http://www.mediacollege.com/adobe/flash/player/version/show.html
shows version 9,0,124,0 installed on both IE7 and FF3). Tried also to
uninstall Flash players and to install the latest version (10,0,12,36)
for both browsers. The problem doesn't go away.

Flex content from elsewhere (on the web) works fine in IE7 - just not
locally generated content. The -use-network switch should not be
applicable because the development server is separate from my
workstation (but I've tried it with true/false values and it made no
difference).

Any thoughts as to what could be causing the problem, and how I might
be able to resolve it?

Thanks!

Ville



  1   2   >