Re: [flexcoders] Binding using as3

2013-01-31 Thread claudiu ursica
look at BindingUtils.bindProperty()

C





 From: aceoohay pa...@compuace.com
To: flexcoders@yahoogroups.com 
Sent: Wednesday, January 30, 2013 11:17 PM
Subject: [flexcoders] Binding using as3
 

  
I have customized textinput control with a property of x. In my program I 
instntiate the control as vtiA. My program has a bindable variable called _y.

I would like everytime that _y is changed by my program that the property x of 
the control vtiA reflects the new values.

What I have done that does not work is

[Bindable] private var _y;

private function whocares():void
{
var vtiA:MyTextInput = new MyTextInput;
vtiA.x = _y
}

If this were mxml I would just say 



What is the equivalent in as3?

Paul


 

[flexcoders] FWD:

2012-09-25 Thread claudiu ursica

wow this is crazy you should look into it 
http://www.business7newson.net/jobs/?alert=15824



Re: [flexcoders] Resetting Chart scale on LineAxis

2012-07-09 Thread claudiu ursica
Hi Karl,
Can you share some basic example? I don't know how your chart and data looks 
like, and how you add/discard new data.

I see you already ran into this and did not work...
https://userflex.wordpress.com/2011/04/21/update-linear-axis/

C




 From: k.sigiscar k.sigis...@yahoo.com
To: flexcoders@yahoogroups.com 
Sent: Monday, July 9, 2012 10:24 AM
Subject: [flexcoders] Resetting Chart scale on LineAxis
 

  
Hi,

I have a chart with dynamic series on a LinearAxis (Y) and a DateTimeAxis (X).

The series visibility can be set to true / false by the user.

When a series with a very high value is displayed, the rest of the chart is 
scaled down.

When the series with the high values is then discarded (visibility set to 
false), the chart doesn't scale down again.

Is there a way to force the chart to reset its scale (min/max) values ?

Best regards,
Karl Sigiscar.


 

Re: [flexcoders] Re: Resetting Chart scale on LineAxis

2012-07-09 Thread claudiu ursica
Hi Karl,
I am not an expert on the charts, I only played with an example from the docs 
which updates nicely. Hence the request about some 
basic example to see if it can be narrowed down. Unless you already try it, you 
can debug the bindings via the 
BindingManager.debugBinding() or wrap the min/max inside functions and add 
temporary log/checks support inside those functions 
to see if calls/updates are happenin. If it is a binding issue you are in 
luck... 

On the other hand, you may also have to byte the bullet and replace the 
bindings with hand written code. That way you get a better control of what code 
is executing...
If it is a bug in the charts than you will need to fix/monkey patch it...

Either way it helps if you can narrow it down to a simple example where you can 
add/remove data from a button. If you can have that I can also 
try to have a look at it.

HTH,
C




 From: k.sigiscar k.sigis...@yahoo.com
To: flexcoders@yahoogroups.com 
Sent: Monday, July 9, 2012 3:19 PM
Subject: [flexcoders] Re: Resetting Chart scale on LineAxis
 

  

Hi Claudiu,

Yes, I saw that one. But he's using a CategoryAxis and not a DateTimeAxis (we 
bind the minimum and maximum properties of the DateTimeAxis to the values of 
our timeline component).

Therefore, we cannot do the same thing as he does to reset the chart scale.

Best regards,
Karl.

--- In flexcoders@yahoogroups.com, claudiu ursica the_braniak@... wrote:

 Hi Karl,
 Can you share some basic example? I don't know how your chart and data looks 
 like, and how you add/discard new data.
 
 I see you already ran into this and did not work...
 https://userflex.wordpress.com/2011/04/21/update-linear-axis/
 
 C
 
 
 
 
  From: k.sigiscar k.sigiscar@...
 To: flexcoders@yahoogroups.com 
 Sent: Monday, July 9, 2012 10:24 AM
 Subject: [flexcoders] Resetting Chart scale on LineAxis
 
 
   
 Hi,
 
 I have a chart with dynamic series on a LinearAxis (Y) and a DateTimeAxis (X).
 
 The series visibility can be set to true / false by the user.
 
 When a series with a very high value is displayed, the rest of the chart is 
 scaled down.
 
 When the series with the high values is then discarded (visibility set to 
 false), the chart doesn't scale down again.
 
 Is there a way to force the chart to reset its scale (min/max) values ?
 
 Best regards,
 Karl Sigiscar.



 

Re: [flexcoders] Tempermental URLLoader.load()

2012-03-25 Thread claudiu ursica
Can you paste the whole class?
I did experience issues with Sound.load() this week , so I went and load the 
sounds via URLLoader. I found it odd at least sound load failed to provide any 
feedback sometimes. Yet wit URLLoader I always got something whether complete 
or error. 


C




 From: Alex Harui aha...@adobe.com
To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com 
Sent: Sunday, March 25, 2012 5:32 AM
Subject: Re: [flexcoders] Tempermental URLLoader.load()
 

  
Maybe you are adding listeners to the wrong thing?  Because you should get 
those events when it does work.


On 3/24/12 4:00 PM, nagaofthesea nagaofthe...@yahoo.com wrote:



 
 
   

Howdy All-

PROBLEM:
Strange URLLoader.load() behavior: sometimes it works; sometimes it doesn't.  
Can't step through airglobal.swc to see what's wrong.

DETAILS:
I am using the latest SDK in several versions of an AIR project.  The core 
code is identical across versions of the project.  Most changes are just in 
the presentation of the data.

I am a Cairngorm nut and I have extended it to suit my coding style.  I have a 
master AbstractCommand that addresses everything including listener 
add/remove, SQLite management, remote services, and File reading/writing.  I 
just override certain functions as needed.

In this project I read RSS beginning with the following:

override public function execute(event:CairngormEvent):void
{
 trace(LoadFeedCommand.execute() called);

 var rsso:RSSObject = LoadFeedEvent(event).feedObject;
 var urlRequest:URLRequest = new URLRequest(rsso.url);

 loader = new URLLoader();
 addListeners(loader);

 try
 {
 loader.load(urlRequest);
 trace(loader.load() called);
 }
 catch(error:Error)
 {
 trace(problem with loader.load());
 }
 
 tModelLocator.displayModel.selectedRSSObject = rsso;
}

In some of the projects URLLoader.load() works as expected.  In others with 
IDENTICAL code it does not. URLLoader.load() fails into nothingness.  The 
catch clause does not throw an Error.

I have added the following listneres in overrided .addListeners() and nothing 
gets called!

override public function addListeners(target:Object):void
{
 target.addEventListener(Event.COMPLETE, onComplete, false, 0, true);
 target.addEventListener(HTTPStatusEvent.HTTP_RESPONSE_STATUS, onHTTPStatus, 
false,0, true);
 target.addEventListener(IOErrorEvent.IO_ERROR, onIOError, false, 0, true);
 target.addEventListener(Event.OPEN, onOpen, false, 0, true);
 target.addEventListener(ProgressEvent.PROGRESS, onProgress, false, 0, true);
 target.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onSecurityError, 
false, 0, true);
}

Any insight on this would be wonderful.

Thanks,
-Naga

 
   



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

Re: [flexcoders] ControlBar not visible in Flex 4.6

2012-03-12 Thread claudiu ursica
You need to put your stuff inside controlBarContent array.

C




 From: Dave Glasser dglas...@pobox.com
To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com 
Sent: Monday, March 12, 2012 5:28 PM
Subject: [flexcoders] ControlBar not visible in Flex 4.6
 

  
I have an app originally developed in Flex 3.3, which I'm in the process of 
migrating to Flex 4.6. I don't want to have to rewrite everything using Spark 
components and containers.

I have a mx.containers.TitleWindow with a mx.containers.ControlBar added as the 
last child. It shows up as expected in Flex 3.3, but it's not there in Flex 
4.6. Does anyone know what I need to do to get it to show up in Flex 4.6, 
without rewriting everything using Spark components?

I tried compiling with the halo theme, but that didn't work.

 

Re: [flexcoders] Webcam recording without flash/flex?

2012-03-12 Thread claudiu ursica
As far as I know JS does not have support of capturing camera. If somebody else 
knows different I would be happy to be proven wrong. Probably you can do the 
same with silverlight as with flash.

C




 From: mulchand12345 mulchand12...@yahoo.in
To: flexcoders@yahoogroups.com 
Sent: Monday, March 12, 2012 5:44 PM
Subject: [flexcoders] Webcam recording without flash/flex?
 

  
Hi
I would like to know, without flash involved, whether any web application can 
record video / capture images using the webcam. (HTML5/ JavaScript/ any other 
script)

Thanks in advance

Regards,
MulC


 

Re: [flexcoders] Adding a button in VideoPlayer

2012-02-23 Thread claudiu ursica
Can you show code, I assume you marked the button as skinPart.

C




 From: grimmwerks gr...@grimmwerks.com
To: flexcoders@yahoogroups.com 
Sent: Thursday, February 23, 2012 8:41 PM
Subject: [flexcoders] Adding a button in VideoPlayer
 

  
Ok I don't know if I'm going absolutely crazy  -- I'm trying to add a button to 
the VideoPlayer -- not the stopButton which is already written in the spark 
VideoPlayer, but a new button to do something I want and will listen for 
outside of the class.

I create a VideoPlayer skin and add my button. I create a new class and extend 
VideoPlayer.as.  I add a public myButton (say) and override static partAdded -- 
I trace out the partName / instance and myButton is always null, never added.  
Hmm.

I duplicate the VideoPlayer classes into my own, add the same public myButton 
and this time my button is being traced out.

Now I could do it this way but it's 10k difference in the swf - from 253 to 
264.  Ok 11.  


What's the deal?

Garry Schafer
grimmwerks
gr...@grimmwerks.com
portfolio: www.grimmwerks.com/




 

Re: [flexcoders] privacy settings popup

2012-02-08 Thread claudiu ursica
You can't, FP does not provide a close event for that panel. There was a 
request in Jira but I am not sure what the status of this is  You need to 
listen for camera events and guess. There is activity and status events. In 
addition what I do I start a timer and monitor for a couple of seconds the 
camera.currentFps. if that is 0, something is wrong, if is constant there is 
also a chance that the camera delivered frames but stopped, otherwise camera is 
fine.


HTH,
Claudiu




 From: Csomák Gábor csom...@gmail.com
To: flexcoders flexcoders@yahoogroups.com 
Sent: Wednesday, February 8, 2012 12:46 PM
Subject: [flexcoders] privacy settings popup
 

  
How to listen if a user already clicked accept, when the camera access popup 
showed up?

 

Re: [flexcoders] Timed Progress bar for 2 minutes.

2012-01-10 Thread claudiu ursica
Are you sure it is exactly 2 minutes?
DO you really need to show progress? A spinning animation might suit you 
better, keep it spinning until the load is done.

C




 From: Venkat M venkat_...@yahoo.com
To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com 
Sent: Tuesday, January 10, 2012 2:09 AM
Subject: [flexcoders] Timed Progress bar for 2 minutes.
 

  
Hi,
 
I have a scenario in my application.
 
I know that the wait time for the response is 2 minutes. 
Can someone let me know how we can run a progress bar for 2
minutes loading from 0% to 100% in the same 2 minutes?
 
Or
  
 
Is there a better way to indicate the wait for 2 minutes?
(This is a fixed wait time)
 
Cheers,
Venkat. 
 
 
 

Re: [flexcoders] Re: Using arraycollection as text for a flex TextArea Component.

2011-12-27 Thread claudiu ursica
Actually I should show the last one. 

try

txt += entry.OrderNumber +   + , +   + entry.Produ then the string 
will have all the entries added not replaced.

C




 From: ZIONIST stinas...@yahoo.com
To: flexcoders@yahoogroups.com 
Sent: Tuesday, December 27, 2011 6:04 AM
Subject: [flexcoders] Re: Using arraycollection as text for a flex TextArea 
Component.
 

  
This is what i have come up with some far... Problem is that it only outputs 
the first entry in the ArrayCollection. So if a client selects more than one
item to buy, when he/she previews their selection, they will only see the first 
entry. Could someone please help me modify this to show all the entries
in the ArrayCollection.

[Bindable]
private var orderColl:ArrayCollection=new ArrayCollection();

/*** Create an object to hold the data ***/
var obj:Object=new Object();

/*** Assign the variables to it ***/
obj.Product=product.text;
obj.Price=price.text;
obj.Qty=1;
obj.OrderNumber=label1.text;

/*** Add the object to the list ***/
orderColl.addItemAt(obj, 0);

Then i have a TextArea component (id=cart) and i try to assign the 
arraycollection to it as text like this

var txt:String;
var n:int=orderColl.length;
for (var i:int=0; i  n; i++)
{
var entry:Object=orderColl.getItemAt(i);
txt = entry.OrderNumber +   + , +   + entry.Product +   + , +   + 
entry.Qty +   + , +   + entry.Price;
}
cart.text = txt.toString();


 

Re: [flexcoders] Resize and Scale Window Content

2011-12-27 Thread claudiu ursica
Can you show some code?
C




 From: Isabelle Loyer Perso isa_lo...@yahoo.fr
To: flexcoders@yahoogroups.com 
Sent: Tuesday, December 27, 2011 3:51 PM
Subject: Re: [flexcoders] Resize and Scale Window Content
 

  
Hi,
I have the same problem.
I use groupe with percent height and width. But this doesn't work if
window is resize by as3 script during creationcomplete phase.
If someone has an idea?
thanks

Le 27/12/11 07:54, Asad Zaidi a écrit : 
  
you can acheive it using Grid control also. depends upon your requirement.
 
Zaidi


From: claudiu ursica the_bran...@yahoo.com
To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com 
Sent: Tuesday, December 27, 2011 3:28 AM
Subject: Re: [flexcoders] Resize and Scale Window Content


  
In theory yes, by using percent width and height for components, in practice 
how much works out of the box depeds on every particular case.


C



From: hkondylk kondy...@gmail.com
To: flexcoders@yahoogroups.com 
Sent: Monday, December 26, 2011 5:35 PM
Subject: [flexcoders] Resize and Scale Window Content


  
Hello, 

I want to be able to resize my
  Window and the content to scale as
  the window resizes. Is this
  possible or do you have an
  example?

THanks in advnace.






 

Re: [flexcoders] Re: Using arraycollection as text for a flex TextArea Component.

2011-12-27 Thread claudiu ursica
Either the whole entry is null or one of it's properties. Check which is null, 
and guard your code if null put empty string or whatever you seem fit for it.

C




 From: ZIONIST stinas...@yahoo.com
To: flexcoders@yahoogroups.com 
Sent: Tuesday, December 27, 2011 5:41 PM
Subject: [flexcoders] Re: Using arraycollection as text for a flex TextArea 
Component.
 

  
That works well. It actually outputs the contents of the arraycollection in the 
textarea component. One very small issue though, it outputs the word NULL 
before the last item in the arraycollection. How do i get rid of that?

Below is the update.

[Bindable]
private var orderColl:ArrayCollection=new ArrayCollection();

/*** Create an object to hold the data ***/
var obj:Object=new Object();

/*** Assign the variables to it ***/
obj.Product=product.text;
obj.Price=price.text;
obj.Qty=1;
obj.OrderNumber=label1.text;

/*** Add the object to the list ***/
orderColl.addItemAt(obj, 0);

Then i have a TextArea component (id=cart) and i try to assign the 
arraycollection to it as text like this

var txt:String;
var n:int=orderColl.length;
for (var i:int=0; i  n; i++)
{
var entry:Object=orderColl.getItemAt(i);
txt += entry.OrderNumber + , ++ entry.Product + , ++ entry.Qty 
++ Unit + ( + s + ) + , ++ $ + entry.Price ++ 
per unit + \n\n;
}
cart.text = txt;


 

Re: [flexcoders] Using arraycollection as text for a flex TextArea Component.

2011-12-26 Thread claudiu ursica
What do you want exactly in the text area? Do the formatting by hand:
Something like:


for all tiem in the collection
output:String = itmem.text  + item price + .. + /n;

Make sure to keep in sync with the collection.

C



 From: ZIONIST stinas...@yahoo.com
To: flexcoders@yahoogroups.com 
Sent: Monday, December 26, 2011 12:43 PM
Subject: [flexcoders] Using arraycollection as text for a flex TextArea 
Component.
 

  
Hello Guys i have an arraycollection that is populated dynamically and would 
like to use the same arraycollection as text for a TextArea component. Below is 
my array collection
  collec
[Bindable]
private var orderColl:ArrayCollection=new ArrayCollection();

/*** Create an object to hold the data ***/
var obj:Object=new Object();

/*** Assign the variables to it ***/
obj.Product=product.text;
obj.Price=price.text;
obj.Qty=1;
obj.OrderNumber=label1.text;

/*** Add the object to the list ***/
orderColl.addItemAt(obj, 0);

Then i have a TextArea component (id=cart) and i try to assign the 
arraycollection to it as text like this

var str:String = orderColl.source.join(\n);
cart.text = str;

The result in the textarea is [object object]. Any help guys?


 

Re: [flexcoders] Resize and Scale Window Content

2011-12-26 Thread claudiu ursica
In theory yes, by using percent width and height for components, in practice 
how much works out of the box depeds on every particular case.

C




 From: hkondylk kondy...@gmail.com
To: flexcoders@yahoogroups.com 
Sent: Monday, December 26, 2011 5:35 PM
Subject: [flexcoders] Resize and Scale Window Content
 

  
Hello, 

I want to be able to resize my Window and the content to scale as the window 
resizes. Is this possible or do you have an example?

THanks in advnace.


 

Re: [flexcoders] Re: getting the total of values of an array collection that is updated manually

2011-12-09 Thread claudiu ursica
You know there is an working example in this book pretty close to your, is flex 
4 though but you will get the picture.


http://www.amazon.com/Adobe-Flex-Training-Michael-Labriola/dp/0321660501


C




 From: ZIONIST stinas...@yahoo.com
To: flexcoders@yahoogroups.com 
Sent: Friday, December 9, 2011 4:52 PM
Subject: [flexcoders] Re: getting the total of values of an array collection 
that is updated manually
 

  
Hi Guys, i have finally got the total to update when new items are added to the 
cart. One thing that i have failed to do is to get the total to update when 
quantity is changed and when a product is removed from the cart(list 
component). Any help on this? Here is the latest code that only gets the total 
to update when a new product is added.

App

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=horizontal
xmlns:ns1=*
xmlns:ns2=as_logic.*
mx:states
mx:State name=dark
mx:SetProperty target={product}
name=text
value=Dark Chocolate/
mx:SetProperty target={price}
name=text
value=50/
/mx:State
mx:State name=spread
mx:SetProperty target={product}
name=text
value=Drinking Chocolate/
mx:SetProperty target={price}
name=text
value=100/
/mx:State
/mx:states

mx:Script
![CDATA[
import mx.controls.listClasses.ListData;
import mx.collections.ArrayCollection;

[Bindable]
private var orderColl:ArrayCollection=new ArrayCollection();

private function addProduct():void
{

//Create an object to hold the data
var obj:Object=new Object();
//Assign the variables to it
obj.Product=product.text;
obj.Price=price.text;
//Add the object to the list
orderColl.addItemAt(obj, 0);

}

public function deleteOrder():void
{

//Remove the item from the array collection
orderColl.removeItemAt(products.selectedIndex);

} 

public function init():void
{
var total:Number=0;
for (var i:String in orderColl)
{
total+=Number(orderColl[i].Price);
}
sum.text=usdFormatter.format(total.toString());
}
]]
/mx:Script

mx:DefaultTileListEffect id=dtle0
fadeOutDuration=300
fadeInDuration=300
moveDuration=650
color=0xff/

mx:CurrencyFormatter id=usdFormatter
precision=0
currencySymbol=$
alignSymbol=left/

mx:Canvas width=500
height=300
mx:Label x=10
y=10
text=Milk Chocolate
id=product/
mx:Label x=10
y=36
text=10
id=price/
mx:Button x=10
y=62
label=submit
click=addProduct();init()/
mx:Button x=10
y=92
label=Change State
click=currentState='dark'/
mx:Button x=10
y=122
label=Drinking Chocolate
click=currentState='spread'/
/mx:Canvas

mx:VBox width=340
height=340
horizontalAlign=center
verticalAlign=middle

ns2:transparentList id=products
width=300
height=300
dataProvider={orderColl}
borderStyle=none
itemsChangeEffect={dtle0}
ns2:itemRenderer
mx:Component
mx:HBox width=100%
height=100%
horizontalAlign=center
verticalAlign=middle
horizontalGap=0
mx:Image source=assets/trashcan.gif
click=outerDocument.deleteOrder()/
mx:Label text={data.Product}
styleName=orderLabel/
mx:Spacer width=100%/
mx:Label id=price
text=${Number(qty.text)* Number(oldPrice.text)}
styleName=orderLabel/
mx:TextInput id=qty
width=30
height=20
text=1
styleName=qtyInput/

mx:Label id=oldPrice
text={data.Price}
visible=false
includeInLayout=false/
/mx:HBox
/mx:Component
/ns2:itemRenderer
/ns2:transparentList
mx:HBox
mx:Label text=Total:
color=#FF
fontWeight=bold/
mx:Label id=sum/
/mx:HBox
/mx:VBox

/mx:Application


 

Re: [flexcoders] Pb with List

2011-11-20 Thread claudiu ursica
Images load asynchronously, so it obviously take time and don't load all at 
once. What class are you using to display the images?

C



 From: cjacquel73 chjacque...@gmail.com
To: flexcoders@yahoogroups.com 
Sent: Sunday, November 20, 2011 3:44 PM
Subject: [flexcoders] Pb with List
 

  
Hello, 

I have a s:List with images inside. There is a combo to change the images in 
the List. The images are on the server (not embedded).

But I have problems when I change the images'List with the combo. They are not 
immediately uploaded and the rest of the application in not working correctly. 

Thank you for your help.
Christophe, 


 

Re: [flexcoders] Re: Pb with List

2011-11-20 Thread claudiu ursica
Image extends SWFLoader which means it dispatches a complete event, When the 
complete event is dispatched your image finished loading. 

you can use some sort of preloader/animation to make things look better. Or you 
can queue the images lading and only display them after all of them are loaded.

Also depending on the number of images maybe load all of them upfront and only 
display after that.

Check also for ContentCache in fx4.

C




 From: cjacquel73 chjacque...@gmail.com
To: flexcoders@yahoogroups.com 
Sent: Sunday, November 20, 2011 7:25 PM
Subject: [flexcoders] Re: Pb with List
 

  
I use an ItemRenderer with mx:Image

Thx, 
CJ

--- In flexcoders@yahoogroups.com, claudiu ursica the_braniak@... wrote:

 Images load asynchronously, so it obviously take time and don't load all at 
 once. What class are you using to display the images?
 
 C
 


 

Re: [flexcoders] HTTPService post to return an image?

2011-11-01 Thread claudiu ursica
HTTPService cannot handle binary data and images fall under this category. U 
have top go URLLoader.

C 




From: method_air loudj...@hotmail.com
To: flexcoders@yahoogroups.com
Sent: Tuesday, November 1, 2011 7:03 PM
Subject: [flexcoders] HTTPService post to return an image?


  
Is it possible to return an image object using HTTPService?

The fault method executes when I attempt to do this:

var http:HTTPService = new HTTPService();
http.url = myScript.ashx;
http.method = POST;
http.resultFormat = object;

Should URLLoader be used instead?

Cheers,

Philip


 

Re: [flexcoders] pass String with socket

2011-10-25 Thread claudiu ursica
First time when you read the buffer is consumed.
Comment the trace and it should work.

C




From: markflex2007 markflex2...@yahoo.com
To: flexcoders@yahoogroups.com
Sent: Tuesday, October 25, 2011 6:39 PM
Subject: [flexcoders] pass String with socket


  

Hi,

I pass string with socket in Flex

I can see the data with
trace(socket.readUTF());

but I can not do (otherwise I get #2030 error)
var s:String= socket.readUTF();

I try to do 
var s:String=socket.readUTFBytes(socket.bytesAvailable);

but socket.bytesAvailable = 0 why? I can see a string with 
trace(socket.readUTF());

how to save the socket data to a string variable?

Thanks

Mark


 

Re: [flexcoders] Flash Builder not tracing, breakpoint functionality lost, no compiler errors

2011-10-19 Thread claudiu ursica
There is some setting that gets overridden, you need to Google for it though I 
forgot since it happen. I found the answer on a blog. Once you find it is 
pretty easy to fix.

Sorry for not being more precise, i just forgot to bookmark the link.

C




From: method_air loudj...@hotmail.com
To: flexcoders@yahoogroups.com
Sent: Wednesday, October 19, 2011 6:58 PM
Subject: [flexcoders] Flash Builder not tracing, breakpoint functionality lost, 
no compiler errors


  
We have a Flashbuilder 4.5 project with a number of library projects.

This project has suddenly stopped showing trace statements, breakpoint 
functionality such as 'step into' is lost, and it is not building the workspace 
in an expected manner (ie the compiler is not showing errors in the 'Problems' 
tab).

This is 15+ team member project, and we have not run into this problem in two 
years of developing it.

Has anyone else encountered this issue, and we would appreciate ideas on how to 
fix it asap.

Thanks,

Philip


 

Re: [flexcoders] PayPal integration - ready made component?

2011-10-01 Thread claudiu ursica
This might help:
http://miti.pricope.com/2009/07/30/integrating-paypal-express-checkout-with-air-and-flex/
Dig into the blog there might be other articles on the same topic.
C





From: mulchand12345 mulchand12...@yahoo.in
To: flexcoders@yahoogroups.com
Sent: Friday, September 30, 2011 8:44 AM
Subject: [flexcoders] PayPal integration - ready made component?


  
Hi,

I have to integrate PayPal transaction facility in my Flash web
application. I know all the basic things regarding the transaction
like what parameters to pass to PayPal and what to expect from it. But
I not feeling quite comfortable with it as its related to the
payments. Is there any ready made transaction component available
which will take care of the transaction and other issues like
security/ transaction verification etc?

Thanks in advance

Regards,
MulC


 

Re: [flexcoders] Restrict access to an API to only allowed applications

2011-09-26 Thread claudiu ursica
You can embed the keys instead of keeping them in plain site. 

check this session I think you will find some useful stuff:
http://tv.adobe.com/watch/360flex-conference/encrypting-flex-protecting-revenue-by-andrew-westberg/

C




From: Haykel BEN JEMIA hayke...@gmail.com
To: flexcoders flexcoders@yahoogroups.com
Sent: Monday, September 26, 2011 12:00 PM
Subject: [flexcoders] Restrict access to an API to only allowed applications


  
Hi,

I'm looking for the best and most secure way to restrict access to a web
 API to only allowed applications. The best option I found is to use 
2-Legged OAuth where applications would get a consumer key and a secret 
key. The problem here is that SWF files can be easily decompiled and the
 keys extracted. My questions here are:

* Does anybody know a way to protect the keys?
* Is there another authorization mechanism that is better suited for such 
client applications in general (Flash, JavaScript ...)

Thanks.

Haykel Ben Jemia

Allmas
Web  RIA Development
http://www.allmas-tn.com



 

Re: [flexcoders] tv.adobe.com hacked??

2011-09-26 Thread claudiu ursica
I do get the same trailer and then the streaming just freezes...
Weird.



 

Re: [flexcoders] Restrict access to an API to only allowed applications

2011-09-26 Thread claudiu ursica
The thing is that most client side apps implement security by obscurity which 
pretty much means that you will never be safe 100%, the only thing you do is 
not putting it in plain sight. So as you continue is add more level of 
obscurity, but as said that will only make it harder still not impossible to 
crack. You can double/triple that by server side checks e.g. trusted ips, 
domains, user etc. Whenever server feels like there is not enough trust should 
deny the connection. 


Obviously the topic is large enough to tackle in just a couple of lines, hopes 
this gives you a start ...
C  




From: Haykel BEN JEMIA hayke...@gmail.com
To: flexcoders@yahoogroups.com
Sent: Monday, September 26, 2011 1:40 PM
Subject: Re: [flexcoders] Restrict access to an API to only allowed applications


  
Thanks Claudiu,

I have found a PDF of the presentation and on page 4 it says the following 
about protecting sensitive data through embedding:

* Most decompilers don’t look at embedded data.
* Given that SWF is an open file format, nothing is really stopping them from 
doing this in the future.
* Useful for quick/dirty storage of WebService credentials.

So this is definitly better than storing the keys in plain text format, but 
still easy to crack.

Any other suggestions.

Thanks,

Haykel Ben Jemia

Allmas
Web  RIA Development
http://www.allmas-tn.com





On Mon, Sep 26, 2011 at 11:33 AM, claudiu ursica the_bran...@yahoo.com wrote:

 
  
You can embed the keys instead of keeping them in plain site. 


check this session I think you will find some useful stuff:
http://tv.adobe.com/watch/360flex-conference/encrypting-flex-protecting-revenue-by-andrew-westberg/


C





From: Haykel BEN JEMIA hayke...@gmail.com
To: flexcoders flexcoders@yahoogroups.com
Sent: Monday, September 26, 2011 12:00 PM
Subject: [flexcoders] Restrict access to an API to only allowed applications



  
Hi,

I'm looking for the best and most secure way to restrict access to a web
 API to only allowed applications. The best option I found is to use 
2-Legged OAuth where applications would get a consumer key and a secret 
key. The problem here is that SWF files can be easily decompiled and the
 keys extracted. My questions here are:

* Does anybody know a way to protect the keys?
* Is there another authorization mechanism that is better suited for such 
client applications in general (Flash, JavaScript ...)

Thanks.

Haykel Ben Jemia

Allmas
Web  RIA Development
http://www.allmas-tn.com






 

Re: [flexcoders] Which is fast use left righ or width height

2011-09-05 Thread claudiu ursica
If you have value which are constant for with and height use width and height, 
it will avoid remeasuring.

C




From: j2me_soul j2me_s...@163.com
To: flexcoders flexcoders@yahoogroups.com
Sent: Monday, September 5, 2011 2:20 PM
Subject: [flexcoders] Which is fast use left righ or width height


  
Which is fast use left righ or width height?

 
 

Re: [flexcoders] ItemRenderer issue

2011-08-29 Thread claudiu ursica
You should override the data setter and try to figure out from there what state 
the renderer should be in based on the incomming data. The renderers are 
created by the listbased control that parents them. Depending if you are using 
visualization or not the control will create renderes for each element or not. 


C




From: j2me_soul j2me_s...@163.com
To: flexcoders flexcoders@yahoogroups.com
Sent: Monday, August 29, 2011 2:20 PM
Subject: [flexcoders] ItemRenderer issue


  
I use the spark list component.I want to set the itemrenderer to the default 
state when the new data is coming.
I try to write the code in the createComplete handler but it only excute one 
time !
And I try to write the same code in the addedToStage and added event handlers
but the result is same ~~
 
Which is event should I listen to init the itemrenderer ? Or how to recreate 
itemrenderer when new data is coming ?

 
 

Re: Re: [flexcoders] ItemRenderer issue

2011-08-29 Thread claudiu ursica
What do you mean by  set the visualization to the parent listbase component?




From: j2me_soul j2me_s...@163.com
To: flexcoders@yahoogroups.com
Sent: Monday, August 29, 2011 2:34 PM
Subject: Re:Re: [flexcoders] ItemRenderer issue


  
Thanks for the reply.
If I override the data setter in order to reinit my itemrenderer and set the 
visualization to the parent listbase component
can impove the performance of my code right ?

At 2011-08-29 20:28:55,claudiu ursica the_bran...@yahoo.com wrote:

  
You should override the data setter and try to figure out from there what 
state the renderer should be in based on the incomming data. The renderers are 
created by the listbased control that parents them. Depending if you are using 
visualization or not the control will create renderes for each element or not. 



C





From: j2me_soul j2me_s...@163.com
To: flexcoders flexcoders@yahoogroups.com
Sent: Monday, August 29, 2011 2:20 PM
Subject: [flexcoders] ItemRenderer issue


  
I use the spark list component.I want to set the itemrenderer to the default 
state when the new data is coming.
I try to write the code in the createComplete handler but it only excute one 
time !
And I try to write the same code in the addedToStage and added event handlers
but the result is same ~~
 
Which is event should I listen to init the itemrenderer ? Or how to recreate 
itemrenderer when new data is coming ?

 



 
 

Re: Re: Re: [flexcoders] ItemRenderer issue

2011-08-29 Thread claudiu ursica
As far as I am aware list has the visualization turn on by default ...
C




From: j2me_soul j2me_s...@163.com
To: flexcoders@yahoogroups.com
Sent: Monday, August 29, 2011 2:50 PM
Subject: Re:Re: Re: [flexcoders] ItemRenderer issue


  
I mean set the useVIrtualLayout to true
s:List useVirtualLayout=true /
At 2011-08-29 20:42:50,claudiu ursica the_bran...@yahoo.com wrote:

  
What do you mean by  set the visualization to the parent listbase component?




From: j2me_soul j2me_s...@163.com
To: flexcoders@yahoogroups.com
Sent: Monday, August 29, 2011 2:34 PM
Subject: Re:Re: [flexcoders] ItemRenderer issue


  
Thanks for the reply.
If I override the data setter in order to reinit my itemrenderer and set the 
visualization to the parent listbase component
can impove the performance of my code right ?

At 2011-08-29 20:28:55,claudiu ursica the_bran...@yahoo.com wrote:

  
You should override the data setter and try to figure out from there what 
state the renderer should be in based on the incomming data. The renderers 
are created by the listbased control that parents them. Depending if you are 
using visualization or not the control will create renderes for each element 
or not. 



C





From: j2me_soul j2me_s...@163.com
To: flexcoders flexcoders@yahoogroups.com
Sent: Monday, August 29, 2011 2:20 PM
Subject: [flexcoders] ItemRenderer issue


  
I use the spark list component.I want to set the itemrenderer to the default 
state when the new data is coming.
I try to write the code in the createComplete handler but it only excute one 
time !
And I try to write the same code in the addedToStage and added event handlers
but the result is same ~~
 
Which is event should I listen to init the itemrenderer ? Or how to recreate 
itemrenderer when new data is coming ?

 



 



 
 

Re: [flexcoders] Re: I don't know if I need Flex (please help me to decide)

2010-09-08 Thread claudiu ursica
Same here, I don't do php on regular basis but whenever I needed to do 
something 
I was able to pull it through. And at least where I come from, php hosting is 
really cheap. I only saw a presentaion by Ben Forta regarding Cold Fusion. It 
did not seem rocket science but I don't know how hard it is ti get up to speed 
with that. It also depends on your php knowledge.

C






From: valdhor valdhorli...@embarqmail.com
To: flexcoders@yahoogroups.com
Sent: Wed, September 8, 2010 2:36:58 PM
Subject: [flexcoders] Re: I don't know if I need Flex (please help me to decide)

   
I can't talk to how easy ColdFusion is as I have not used it very much but 
WebORB for PHP is very robust. My application is used by tens of thousands of 
people every day. I do know that for me, at least, PHP is very easy.

--- In flexcoders@yahoogroups.com, Bill Brutzman bill.brutz...@... wrote:

 Consider also Adobe's ColdFusion.  I have found ColdFusion to be easier to
 use and more robust than PHP.
 
 
 
 --Bill
 
 
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of enridp
 Sent: Tuesday, September 07, 2010 11:10 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: I don't know if I need Flex (please help me to
 decide)
 
 
 
 
 
 Yes, there's a lot of data.
 But I was thinking in AMFPHP for that.
 I think the alternatives are:
 1) Adapting the Flex code that I need to a pure AS3 project (I'm not sure if
 this is possible in all the casses)
 2) Using RSL's
 
 Because I can't start my project with 200Kb, the size is a really big
 problem.
 Can you (or someone) help me with some of the 2 options?
 I have not experience in it, so I can't think in possible problems with
 those solutions (Flex-AS3 and RSL's), can you see the problems?
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ,
 Bill Brutzman bill.brutzman@ wrote:
 
  My rule of thumb is that if there is data. like a database. then yes. Flex
  is the way to go.
  
  
  
  --Bill
 



 


  

Re: [flexcoders] Re: I don't know if I need Flex (please help me to decide)

2010-09-07 Thread claudiu ursica
AMFPHP works with flash also. You need to update the data yourself within 
controls since no bindings are available, but it will be working. 

C



From: enridp enr...@yahoo.com.ar
To: flexcoders@yahoogroups.com
Sent: Tue, September 7, 2010 5:09:34 PM
Subject: [flexcoders] Re: I don't know if I need Flex (please help me to decide)

   
Yes, there's a lot of data.
But I was thinking in AMFPHP for that.
I think the alternatives are:
1) Adapting the Flex code that I need to a pure AS3 project (I'm not sure if 
this is possible in all the casses)
2) Using RSL's

Because I can't start my project with 200Kb, the size is a really big problem.
Can you (or someone) help me with some of the 2 options?
I have not experience in it, so I can't think in possible problems with those 
solutions (Flex-AS3 and RSL's), can you see the problems?

--- In flexcoders@yahoogroups.com, Bill Brutzman bill.brutz...@... wrote:

 My rule of thumb is that if there is data. like a database. then yes. Flex
 is the way to go.
 
 
 
 --Bill
 


 


  

Re: [flexcoders] Find in Files in Flash Builder 4

2010-09-06 Thread claudiu ursica
ctrl + shift + f or under eclipse ctrl + h

C





From: markflex2007 markflex2...@yahoo.com
To: flexcoders@yahoogroups.com
Sent: Mon, September 6, 2010 6:39:20 AM
Subject: [flexcoders] Find in Files in Flash Builder 4

   
Hi

I use Flex Builder 3 before . I can search string cross my files by using 

Find in Files (under Edit menu),but I can not do this with FB4.

Please help me how to search my files by a string.

Thanks

Mark


 


  

Re: [flexcoders] I don't know if I need Flex (please help me to decide)

2010-09-06 Thread claudiu ursica
You know that RemoteObject is built on top of NetConnection. What you 
ultimately 
do is make remote procedure calls. You don't need flex but then you need to do 
the work yourself. Serialization and de-serialization on the server side. On 
the 
other hand flex is open source so If you don't need something visual you just 
take the source code from flex compile it with your flash app and you should be 
good to go. I deed that with the base 64 encoder/decoders and except for a 
resource manager reference which I did not need after all it was ok. Depending 
on your needs you can take that source code and play with it.

HTH in some way,
C


hink could be a lot some problems:
1) the first download will be very slow
2) if my RSL is not cached for any reason then nobody will be visiting the site 
again
3) what happens if I need to protect some project? I've read an article about 
Nitro-LM with RSL's (I don't know if it's the best option, for the moment I 
have 
never protected any code...), but if our RSL is encrypted, will be cached then?
4) I don't know, is there any other problem with RSL's? what do you think?

I was reading about using Flex without the Flex Framework, and I like that 
idea, 
but what happens if I need a component? just one? I need to include again 
+200KB 
of code?

I was thinking in working purely in AS3 and reusing some classes from Flex 
without embedding all the framework (my first goal is to make a really light 
version).
I want to use Flex because there are some classes and components that I don't 
have in Flash, and I need them, like RemoteObject.

So, I need some of the Flex Classes but I need a very light SWF.
Is possible to achieve that with Flex?

Thanks!
Enrique.


 


  

Re: [flexcoders] Cairngorm 2.2.1 with Flex 4

2010-09-05 Thread claudiu ursica
Cairngorm 2.x is not officially supported anymore by Adobe. You'd be better of 
trying to move towards the Parsley framework (w/o) Cairngorm 3 libs. Or you can 
try a relatively new kid on the block Robotlegs.

C




From: pritesh_mics pbhaw...@deloitte.com
To: flexcoders@yahoogroups.com
Sent: Sun, September 5, 2010 12:30:56 PM
Subject: [flexcoders] Cairngorm 2.2.1 with Flex 4

   
Hi All,

I am using Cairngorm 2.2.1 with Flax-4, m getting an runtime error:

TypeError: Error #1006: getResourceBundle is not a function.
at com.adobe.cairngorm::CairngormError$cinit() 
at global$init()
[C:\dev\swat\projects\ac_emea
\Cairngorm\com\adobe\cairngorm\CairngormError.as:41]
at  RemoteObjects/getService()
[C:\dev\swat\projects\ac_emea\\
Cairngorm\com\adobe\cairngorm\business\RemoteObjects.as:79]

On some investigation I came to know that Cairngorm 2.2.1 not supports Flex-4, 
Can any one help me ?

Furthermore, I am a beginner in Flex and selected Cairngorm 2.x as a Framework 
for my project, Is it a good idea to go with ? 


Regards,
Pritesh


 


  

Re: [flexcoders] External CSS file in Flex 4

2010-09-03 Thread claudiu ursica
Even when loaded run-time the css file comes compiled as a .swf. So what you 
are 
trying to achieve there is kind of impossible unless you can somehow compile 
the 
swf with PHP. Which I have not heard to be possible yet but maybe I'm mistaking.

C





From: Ghost Hack ghoxth...@yahoo.com.br
To: flexcoders@yahoogroups.com
Sent: Fri, September 3, 2010 2:54:38 PM
Subject: [flexcoders] External CSS file in Flex 4

   
Hi people,

i'm having some trouble while using the tag  fx:Style 
source=assets/mycss.css 
/. When I generate a release  of my project, Flex 4 embed my CSS file into 
compiled application, while  i want to use PHP to generate dynamic CSS based on 
the user  configuration in database.

Is there any workaround i'm missing?


Thanks in advance,
Marco Lacava. 
 


  

Re: [flexcoders] couple questions about android / air

2010-09-02 Thread claudiu ursica
1. You need to install the air and then your application in order to work on 
the 
phone. Air you can download from the market If i remember correctly.
2. I developed and deployed used Flash CS5. Check the adobe labs there are lots 
of air for android stuff there. It probably tell you how to do it step by step.
3. Have no idea never used Java on Android, but again check the labs there is 
documentation there.

HTH,
C



From: grimmwerks gr...@grimmwerks.com
To: flexcoders@yahoogroups.com  
Sent: Thu, September 2, 2010 8:4at3:48 PM
Subject: [flexcoders] couple questions about android / air

   
I have been trying to code an android app in java and decided to take a look at 
air; I've read some things and need to be clarified about a few items:

1) does the android phone need to have some sort of 'air' installed on it?  It 
seems as if compiling makes a regular .apk but I've also read that there was 
something necessary on a phone...

2) Flex 4 can or can't create the necessary projects? Awhile back it was 
necessary to start with a flash project but unsure where that stands now.

3) does an android / air app have all the same framework intents that a java 
app 
would? For example, I'm dealing specifically with something that works with 
Alarm Manager; I'd normally set up an intent that would repond to my 
Alarmmanager setup, and it would respond when fired; air projects work the same 
way?

Appreciate any quick answers; as these things sometimes go am under the gun 
with 
multiple projects.

Thanks!


Garry Schafer
grimmwerks
gr...@grimmwerks.com
portfolio: www.grimmwerks.com/




 


  

Re: [flexcoders] Re: Flashbuilder 4.0.1 debugger issue?

2010-09-01 Thread claudiu ursica
Hi,
Happened to me and still happens from time to time, just pops out of the blue 
at 
57%. There are some solutions if you google for them, but none of them seemed 
to 
work for me. In the end I fixed it all the time by creating a new project and 
taking from there the contents of the html-template dir and overwrite the ones 
from my project. Sometimes restart was needed also. 



HTH,
Claudiu



From: Patricia Han flex...@yahoo.com
To: flexcoders@yahoogroups.com
Sent: Wed, September 1, 2010 10:46:21 PM
Subject: Re: [flexcoders] Re: Flashbuilder 4.0.1 debugger issue?

   
Can I ask you how you created the splash screen?  Currently I am trying to add 
a 
splash screen or image right after logging in and before the main screens 
appears. But I have no idea how to do that.
Can you help?
Thanks,
Pat






From: Richard Rodseth rrods...@gmail.com
To: flexcoders@yahoogroups.com
Sent: Mon, July 12, 2010 2:51:32  PM
Subject: [flexcoders] Re: Flashbuilder 4.0.1 debugger issue?

  
He's also on Flash Player 10.1 and after deleting shared objects used by our 
splash screen, the app is locking up earlier (i.e. before dismissing the splash 
screen. Are there some changes I should know about relating to 10.1, security 
sandboxes, Shared Objects and the 4.0.1 debugger?


On Mon, Jul 12, 2010 at 2:41 PM, Richard Rodseth rrods...@gmail. com wrote:

A colleague is experiencing a problem where our app hangs the browser when run 
in the debugger, but not when launched in non-debug mode (from Flashbuilder) . 
He's the only one on the team who started Flex work since the release of 4.0.1 
so I'm wondering if there are any known problems that could explain this. 






 


  

Re: [flexcoders] Re: 3D Carousel in Flex 4?

2010-08-29 Thread claudiu ursica
HTH
http://blog.onebyonedesign.com/actionscript/3d-carousel-as3-style-bop-secrets-turns-10/


Claudiu





From: hdave_123 hdave_...@yahoo.com
To: flexcoders@yahoogroups.com
Sent: Sat, August 28, 2010 11:32:49 PM
Subject: [flexcoders] Re: 3D Carousel in Flex 4?

   
Thanks -- got their coverflow working, but am stuck trying to create a carousel 
layout!

--- In flexcoders@yahoogroups.com, claudiu ursica the_bran...@... wrote:

 You'll get that by implementing a custom coverflow layout class. 
 
 
http://www.rialvalue.com/blog/2010/04/14/carroflow-another-3d-layout-for-flex4/
 
 http://www.flexstuff.co.uk/2009/12/23/flex-4-coverflow-layout/
 
 This should get you started...
 
 Cheers,
 Claudiu
 
 
 
 
 
 From: hdave_123 hdave_...@...
 To: flexcoders@yahoogroups.com
 Sent: Tue, August 24, 2010 7:18:38 AM
 Subject: [flexcoders] 3D Carousel in Flex 4?
 
 
 I am desperate to get a 3D Carousel in my Flex 4 web app.  I found this 
example:
 
http://dougmccune.com/blog/2007/11/19/flex-coverflow-performance-improvement-flex-carousel-component-and-vertical-coverflow/
/
 
 
 It has been last updated in 2008.  Does anyone where know of where I can get 
 a 

 component I can use in a Flex 4 project?  Has it been updated?



 


  

Re: [flexcoders] Overriding Item Background In ItemRenderer Problem.

2010-08-29 Thread claudiu ursica
Working alternating 2 color renderer. Should give you a headstart:
oddColor and evenColor are defined in css file. You can justg hardcode them in 
here. In took out data code and labels, left the skeleton ...

?xml version=1.0 encoding=utf-8?

xmlns:s=library://ns.adobe.com/flex/spark 
xmlns:mx=library://ns.adobe.com/flex/mx
width=100%
height=40
autoDrawBackground=true
useHandCursor=true
buttonMode=true
click=onItemClick(event)

fx:Script
![CDATA[
/**
 * Override the data setter to get the alert description 
 * and set the proper background color for the renderer
 * 
 * @override
 * @param value Object the incoming message data
 * @return none
 */
override public function set data(value:Object):void 
{
super.data = value;
invalidateProperties();
invalidateDisplayList();
}

/**
 * Override the commit properties 
 * to be able to display it on many lines
 * 
 * @param none
 * @return none
 */
override protected function commitProperties():void
{
super.commitProperties();
/* if (data)
{
//perform work on the data if any
}
 */}

/**
 * Override the update display lis to displat correct background 
and 
splitted text
 * 
 * @override
 * @unscaledWidth Number
 * unscaledHeight Number
 * @return none
 */
override protected function updateDisplayList(unscaledWidth:Number, 
unscaledHeight:Number):void
{
super.updateDisplayList(unscaledWidth, unscaledHeight);

//set background color
if ((itemIndex % 2) == 0) 
{
odd.visible = false;
even.visible = true;
}
else
{
odd.visible = true;
even.visible = false;
}

//put data into the view controls
}

private function onItemClick(event:MouseEvent):void
{
//dispatch event if necessary

}

]]
/fx:Script

s:Rect id=odd left=0 right=0 top=0 bottom=0
s:fill
s:SolidColor color={getStyle('oddColor')}/s:SolidColor
/s:fill
/s:Rect

s:Rect id=even left=0 right=0 top=0 bottom=0
s:fill
s:SolidColor color={getStyle('evenColor')}/s:SolidColor
/s:fill
/s:Rect

--drop your data here
/s:ItemRenderer


C



From: Stephen sd_br...@ntlworld.com
To: flexcoders@yahoogroups.com
Sent: Sun, August 29, 2010 3:34:23 PM
Subject: [flexcoders] Overriding Item Background In ItemRenderer Problem.

   
I can change the Label color but cant change the background color, its anying. 
Can anybody suggest a solution.


xmlns:s=library://ns.adobe.com/flex/spark 
xmlns:mx=library://ns.adobe.com/flex/mx 
autoDrawBackground=true

fx:Script
![CDATA[

override public function set data(value:Object):void
{
trace(value);

if (value == Option 7)
{
labelDisplay.setStyle(color,#FF);
//bgRect.left = 10;
}
else
{
labelDisplay.setStyle(color,#00);
//bgRect.left = 0;
}
}

]]
/fx:Script

s:states
s:State name=normal /
s:State name=hovered /
s:State name=selected /
/s:states

s:Rect id=bgRect
includeIn=normal,hovered,selected
left=0 right=0 top=0 bottom=0
s:fill
s:SolidColor
color = #8080FF
color.selected=#404080
color.hovered=#5050A0/
/s:fill
/s:Rect

s:Label id=labelDisplay
color=black
color.hovered=red
color.selected=white
left=3 right=3 top=4 bottom=3/

/s:ItemRenderer


 


  

Re: [flexcoders] Flex PHP Service with Date Parameters Help

2010-08-27 Thread claudiu ursica
I am not sure where your problem is in the php code. However if you think the 
date is the issue use timestamps which are basically numbers. I did that 
successfully in the past. On the flex side you can write an utility for 
translating that into a date for display purposes. 

Which line is 61 in your code anyway ?

C





From: Stephen sd_br...@ntlworld.com
To: flexcoders@yahoogroups.com
Sent: Fri, August 27, 2010 12:27:57 AM
Subject: [flexcoders] Flex PHP Service with Date Parameters Help

   
I'm having some trouble using the Date as a Parameter does anybody know where 
I'm going wrong as I am currently getting the error: 

Reason: 
Fatal error: Call to a member function toString() on a non-object in 
C:\wamp\www\testing-debug\services\TestingService.php on line 61
mysqli_stmt_bind_param($stmt, 'ss', $from-toString('-MM-dd'), 
$to-toString('-MM-dd'));

public function getAllTestingByRange($from, $to) {

$stmt = mysqli_prepare($this-connection, SELECT name_no, SUM(amount) AS total 
FROM $this-tablename WHERE datefield BETWEEN ? AND ? GROUP BY name_no); 

$this-throwExceptionOnError();

mysqli_stmt_bind_param($stmt, 'ss', $from-toString('-MM-dd'), 
$to-toString('-MM-dd')); 

$this-throwExceptionOnError();

mysqli_stmt_execute($stmt);
$this-throwExceptionOnError();

$rows = array();

mysqli_stmt_bind_result($stmt, $row-name_no, $row-total);

while (mysqli_stmt_fetch($stmt)) {
$rows[] = $row;
$row = new stdClass();
mysqli_stmt_bind_result($stmt, $row-name_no, $row-total);
}

mysqli_stmt_free_result($stmt);
mysqli_close($this-connection);

return $rows;
}


 


  

Re: [flexcoders] Perplexed: An XML Love Story

2010-08-26 Thread claudiu ursica
I just tried your first scenario:

package {
import flash.display.Sprite;

public class Test extends Sprite
{

private var xml:XML = 
urlsset
url
http://www.nmh.org/nm/2-9991
lastmod2010-01-10T10:07:22-06:00/lastmod
changefreqmonthly/changefreq
priority.5/priority
/url
url
http://www.nmh.org/nm/2-9992
lastmod2010-01-10T10:07:24-06:00/lastmod
changefreqmonthly/changefreq
priority.5/priority
/url
url
http://www.nmh.org/nm/2-9998
lastmod2010-01-10T10:07:34-06:00/lastmod
changefreqmonthly/changefreq
priority.5/priority
/url
/urlsset;


public function Test()
{
trace(xml.url.loc.text());
}
}
}


outputs:

http://www.nmh.org/nm/2-9991
http://www.nmh.org/nm/2-9992
http://www.nmh.org/nm/2-9998

Am I missing something?
C






From: Wally Kolcz wko...@isavepets.com
To: flexcoders@yahoogroups.com
Sent: Thu, August 26, 2010 4:07:34 PM
Subject: [flexcoders] Perplexed: An XML Love Story

   
I am loading XML from a remote source. Then i am attempting to transverse it to 
get to the value of the 'loc' node. However, everything I am doing is coming up 
empty or an error. i am putting money its the namespace, but I dont know how to 
get around it.

I am using a pretty basic function to convert the result to an XML object.

list = new XML(e.target.data);

I tried list.url[0].loc, but it comes up blank.

When I trace (list.toXMLString()); I get this:
urlset
url
http://www.nmh.org/nm/2-9991
lastmod2010-01-10T10:07:22-06:00/lastmod
changefreqmonthly/changefreq
priority.5/priority
/url
url
http://www.nmh.org/nm/2-9992
lastmod2010-01-10T10:07:24-06:00/lastmod
changefreqmonthly/changefreq
priority.5/priority
/url
url
http://www.nmh.org/nm/2-9998
lastmod2010-01-10T10:07:34-06:00/lastmod
changefreqmonthly/changefreq
priority.5/priority
/url
/urlset

When I trace (list.*), I get this:

http://www.nmh.org/nm/2-9770
lastmod2010-01-10T09:58:32-06:00/lastmod
changefreqmonthly/changefreq
priority.5/priority
/url
url xmlns=http://www.sitemaps.org/schemas/sitemap/0.9;  
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
http://www.nmh.org/nm/2-9771
lastmod2010-01-10T09:58:35-06:00/lastmod
changefreqmonthly/changefreq
priority.5/priority
/url
url xmlns=http://www.sitemaps.org/schemas/sitemap/0.9;  
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
http://www.nmh.org/nm/2-9772
lastmod2010-01-10T09:58:38-06:00/lastmod
changefreqmonthly/changefreq
priority.5/priority
/url
url xmlns=http://www.sitemaps.org/schemas/sitemap/0.9;  
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
http://www.nmh.org/nm/2-9773
lastmod2010-01-10T09:58:39-06:00/lastmod
changefreqmonthly/changefreq
priority.5/priority
/url

How to I get to the values of loc?

Here is a sample of the raw XML:

urlset 
xsi:schemaLocation=http://www.sitemaps.org/schemas/sitemap/0.9http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd;

−
url
http://www.nmh.org/nm/location+centers
lastmod2010-06-10T02:13:31-06:00/lastmod
changefreqmonthly/changefreq
priority.9/priority
/url
−
url
−
http://www.nmh.org/nm/location+clinics+specialty+services
lastmod2010-06-10T02:27:03-06:00/lastmod
changefreqmonthly/changefreq
priority.9/priority
/url
−
url
−
http://www.nmh.org/nm/location+emergency+urgent+care
lastmod2010-06-10T03:03:30-06:00/lastmod
changefreqmonthly/changefreq
priority.9/priority
/url
−
url
http://www.nmh.org/nm/location+gift+shops+dining
lastmod2010-06-10T02:25:39-06:00/lastmod
changefreqmonthly/changefreq
priority.9/priority
/url
/urlset


 


  

Re: [flexcoders] Perplexed: An XML Love Story

2010-08-26 Thread claudiu ursica
Ok had a look into the raw xml also. You need to define a namespace for the 
schemaLocation to be bound to. 




Here is the code that works on my machine ...

package {
import flash.display.Sprite;

public class Test extends Sprite
{

private var xml:XML = 
urlsset
url
http://www.nmh.org/nm/2-9991
lastmod2010-01-10T10:07:22-06:00/lastmod
changefreqmonthly/changefreq
priority.5/priority
/url
url
http://www.nmh.org/nm/2-9992
lastmod2010-01-10T10:07:24-06:00/lastmod
changefreqmonthly/changefreq
priority.5/priority
/url
url
http://www.nmh.org/nm/2-9998
lastmod2010-01-10T10:07:34-06:00/lastmod
changefreqmonthly/changefreq
priority.5/priority
/url
/urlsset;

private var xml1:XML = 
url
http://www.nmh.org/nm/location+centers
lastmod2010-06-10T02:13:31-06:00/lastmod
changefreqmonthly/changefreq
priority.9/priority
/url
url
http://www.nmh.org/nm/location+clinics+specialty+services
lastmod2010-06-10T02:27:03-06:00/lastmod
changefreqmonthly/changefreq
priority.9/priority
/url
url
http://www.nmh.org/nm/location+emergency+urgent+care
lastmod2010-06-10T03:03:30-06:00/lastmod
changefreqmonthly/changefreq
priority.9/priority
/url
url
http://www.nmh.org/nm/location+gift+shops+dining
lastmod2010-06-10T02:25:39-06:00/lastmod
changefreqmonthly/changefreq
priority.9/priority
/url
/urlset;


public function Test()
{
trace(xml.url.loc.text());
trace(xml1.url.loc.text());
}
}
}

HTH,
C






From: Wally Kolcz wko...@isavepets.com
To: flexcoders@yahoogroups.com
Sent: Thu, August 26, 2010 4:07:34 PM
Subject: [flexcoders] Perplexed: An XML Love Story

   
I am loading XML from a remote source. Then i am attempting to transverse it to 
get to the value of the 'loc' node. However, everything I am doing is coming up 
empty or an error. i am putting money its the namespace, but I dont know how to 
get around it.

I am using a pretty basic function to convert the result to an XML object.

list = new XML(e.target.data);

I tried list.url[0].loc, but it comes up blank.

When I trace (list.toXMLString()); I get this:
urlset
url
http://www.nmh.org/nm/2-9991
lastmod2010-01-10T10:07:22-06:00/lastmod
changefreqmonthly/changefreq
priority.5/priority
/url
url
http://www.nmh.org/nm/2-9992
lastmod2010-01-10T10:07:24-06:00/lastmod
changefreqmonthly/changefreq
priority.5/priority
/url
url
http://www.nmh.org/nm/2-9998
lastmod2010-01-10T10:07:34-06:00/lastmod
changefreqmonthly/changefreq
priority.5/priority
/url
/urlset

When I trace (list.*), I get this:

http://www.nmh.org/nm/2-9770
lastmod2010-01-10T09:58:32-06:00/lastmod
changefreqmonthly/changefreq
priority.5/priority
/url
url xmlns=http://www.sitemaps.org/schemas/sitemap/0.9;  
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
http://www.nmh.org/nm/2-9771
lastmod2010-01-10T09:58:35-06:00/lastmod
changefreqmonthly/changefreq
priority.5/priority
/url
url xmlns=http://www.sitemaps.org/schemas/sitemap/0.9;  
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
http://www.nmh.org/nm/2-9772
lastmod2010-01-10T09:58:38-06:00/lastmod
changefreqmonthly/changefreq
priority.5/priority
/url
url xmlns=http://www.sitemaps.org/schemas/sitemap/0.9;  
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
http://www.nmh.org/nm/2-9773
lastmod2010-01-10T09:58:39-06:00/lastmod
changefreqmonthly/changefreq
priority.5/priority
/url

How to I get to the values of loc?

Here is a sample of the raw XML:

urlset 
xsi:schemaLocation=http://www.sitemaps.org/schemas/sitemap/0.9http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd;

−
url
http://www.nmh.org/nm/location+centers
lastmod2010-06-10T02:13:31-06:00/lastmod
changefreqmonthly/changefreq
priority.9/priority
/url
−
url
−
http://www.nmh.org/nm/location+clinics+specialty+services
lastmod2010-06-10T02:27:03-06:00/lastmod
changefreqmonthly/changefreq
priority.9/priority
/url
−
url
−
http://www.nmh.org/nm/location+emergency+urgent+care
lastmod2010-06-10T03:03:30-06:00/lastmod
changefreqmonthly/changefreq
priority.9/priority
/url
−
url
http://www.nmh.org/nm/location+gift+shops+dining

Re: [flexcoders] Perplexed: An XML Love Story

2010-08-26 Thread claudiu ursica
I don;t know why the copy paste did no work properly.

private var xml1:XML = 
url
http://www.nmh.org/nm/location+centers
lastmod2010-06-10T02:13:31-06:00/lastmod
changefreqmonthly/changefreq
priority.9/priority
/url
url
http://www.nmh.org/nm/location+clinics+specialty+services
lastmod2010-06-10T02:27:03-06:00/lastmod
changefreqmonthly/changefreq
priority.9/priority
/url
url
http://www.nmh.org/nm/location+emergency+urgent+care
lastmod2010-06-10T03:03:30-06:00/lastmod
changefreqmonthly/changefreq
priority.9/priority
/url
url
http://www.nmh.org/nm/location+gift+shops+dining
lastmod2010-06-10T02:25:39-06:00/lastmod
changefreqmonthly/changefreq
priority.9/priority
/url
/urlset;


You need to alter the class who produces your xml on the server to produce both 
the the namespace and the chema.
Iterating is simple e4x syntax.

trace(xml1.url.loc.text());

that produces a list of the loc nodes when queired ...
I'll try to connect on your endpoint later if have the time and post the code. 
Is As code enough or you are using HTTPService and flex?

C





From: Wally Kolcz wko...@isavepets.com
To: flexcoders@yahoogroups.com
Sent: Thu, August 26, 2010 4:55:28 PM
Subject: Re: [flexcoders] Perplexed: An XML Love Story

   
Ok, how do I do that? Also, in your example, how are you iterating over the 
url node value to get multiples?

On 8/26/2010 10:49 AM, claudiu ursica wrote:

  
Ok had a look into the raw xml also. You need to define a 
namespace for the schemaLocation to be bound to. 




Here is the code that works on my machine ...

package {
import flash.display.Sprite;

public class Test extends Sprite
{

private var xml:XML = 
urlsset
url
http://www.nmh.org/nm/2-9991

lastmod2010-01-10T10:07:22-06:00/lastmod
changefreqmonthly/changefreq
priority.5/priority
/url
url
http://www.nmh.org/nm/2-9992

lastmod2010-01-10T10:07:24-06:00/lastmod
changefreqmonthly/changefreq
priority.5/priority
/url
url
http://www.nmh.org/nm/2-9998

lastmod2010-01-10T10:07:34-06:00/lastmod
changefreqmonthly/changefreq
priority.5/priority
/url
/urlsset;

private var xml1:XML = 
url
http://www.nmh.org/nm/location+centers

lastmod2010-06-10T02:13:31-06:00/lastmod
changefreqmonthly/changefreq
priority.9/priority
/url
url
http://www.nmh.org/nm/location+clinics+specialty+services

lastmod2010-06-10T02:27:03-06:00/lastmod
changefreqmonthly/changefreq
priority.9/priority
/url
url
http://www.nmh.org/nm/location+emergency+urgent+care

lastmod2010-06-10T03:03:30-06:00/lastmod
changefreqmonthly/changefreq
priority.9/priority
/url
url
http://www.nmh.org/nm/location+gift+shops+dining

lastmod2010-06-10T02:25:39-06:00/lastmod
changefreqmonthly/changefreq
priority.9/priority
/url
/urlset;


public function Test()
{
trace(xml.url.loc.text());
trace(xml1.url.loc.text());
}
}
}

HTH,
C






From: Wally Kolcz wko...@isavepets.com
To: flexcoders@yahoogroups.com
Sent: Thu, August 26, 2010 4:07:34 PM
Subject: [flexcoders] Perplexed: An XML Love Story

  
I am loading XML from a remote source. Then i am   
attempting to transverse it to get to the value of   the 
'loc' node. However, everything I am doing is   coming up 
empty or an error. i am putting money   its the namespace, 
but I dont

Re: [flexcoders] Perplexed: An XML Love Story

2010-08-26 Thread claudiu ursica
package {
import flash.display.Sprite;
import flash.events.Event;
import flash.net.URLLoader;
import flash.net.URLRequest;

public class Test extends Sprite
{

private var loader:URLLoader;
private var list:XML;

public namespace test = http://www.sitemaps.org/schemas/sitemap/0.9;;
use namespace test;

private function loadXML():void 
{
loader = new URLLoader(new 
URLRequest(http://www.nmh.org/sitemap.xml;));
loader.addEventListener(Event.COMPLETE, fileLoadedHandler);
}

private function fileLoadedHandler(e:Event):void 
{

list = XML(e.target.data);
trace(list.url.loc.text());
}

public function Test()
{
loadXML();
}
}
}

this works just fine on my machine...

Cheers,
Claduiu





From: Wally Kolcz wko...@isavepets.com
To: flexcoders@yahoogroups.com
Sent: Thu, August 26, 2010 5:27:27 PM
Subject: Re: [flexcoders] Perplexed: An XML Love Story

   
I am using Flex and a URLLoader. I call the loadXML in the 
CreationComplete event

private var loader:URLLoader;
private var list:XML;

private function loadXML():void {
loader = new URLLoader(new URLRequest(http://www.nmh.org/sitemap.xml;);
loader.addEventListener(Event.COMPLETE, fileLoadedHandler);
}

private function fileLoadedHandler(e:Event):void {
list = new XML(e.target,data);
}


 


  

Re: [flexcoders] 3D Carousel in Flex 4?

2010-08-25 Thread claudiu ursica
You'll get that by implementing a custom coverflow layout class. 

http://www.rialvalue.com/blog/2010/04/14/carroflow-another-3d-layout-for-flex4/

http://www.flexstuff.co.uk/2009/12/23/flex-4-coverflow-layout/

This should get you started...

Cheers,
Claudiu





From: hdave_123 hdave_...@yahoo.com
To: flexcoders@yahoogroups.com
Sent: Tue, August 24, 2010 7:18:38 AM
Subject: [flexcoders] 3D Carousel in Flex 4?

   
I am desperate to get a 3D Carousel in my Flex 4 web app.  I found this example:

http://dougmccune.com/blog/2007/11/19/flex-coverflow-performance-improvement-flex-carousel-component-and-vertical-coverflow/


It has been last updated in 2008.  Does anyone where know of where I can get a 
component I can use in a Flex 4 project?  Has it been updated?


 


  

Re: [flexcoders] Re: FB4: Looping thru itemrenderers

2010-08-25 Thread claudiu ursica
Normally you should have a list and an underlying as a model dataprovider for 
your list. You could also keep a currentSelectedItem property in the model and 
bind the list selectedItem to that. You work with the underlying data and the 
list updates itself accordingly.
Hopefully :).

HTH,
C






From: sdl1326 azsl1326-em...@yahoo.com
To: flexcoders@yahoogroups.com
Sent: Wed, August 25, 2010 2:49:53 AM
Subject: [flexcoders] Re: FB4: Looping thru itemrenderers

   
Here's some additional insight into what I am trying to do. 

The user can click on one of the thumbnails(itemrenderer) which changes the 
background color and launches a larger version of the image. Within that larger 
image is a next and previous button which will navigate to the next/previous 
image(itemrenderer). I need to be able to change the background color of the 
next/previous thumbnail/itemrenderer. So, in essence, I need to determine the 
next/previous itemrenderer and call the function that will change the 
background 
color.

Thanks.
--- In flexcoders@yahoogroups.com, Amy amyblankens...@... wrote:

 You should never do this.  What is the end goal?
 
 --- In flexcoders@yahoogroups.com, sdl1326 azsl1326-email@ wrote:
 
  
  I have a scrollable SkinnableDataContainer which contains thumbnail
  images (in an itemrenderer). While there can be several hundred
  thumbnail images, only 10 itemrenderers are viewable on the screen at a
  time. If I need to loop through the 10 viewable itemrenderers, what's
  the best way to do it?
  
  
  
  
  Thanks, in advance.
 



 


  

Re: [flexcoders] retrieve row # from XMLList w/ Namespaces for combo selectedIndex?

2010-08-25 Thread claudiu ursica
Parse the xml into a custom class/collection, and upon insertion you can assign 
a custom id e.g. the number of the row.

C





From: MicC chigwel...@yahoo.com
To: flexcoders@yahoogroups.com
Sent: Wed, August 25, 2010 8:58:40 AM
Subject: [flexcoders] retrieve row # from XMLList  w/ Namespaces for combo 
selectedIndex?

   
comboBox dataProvider named responseRows = XMLList with Namespace so row data 
looks like:


Central
/MEMBER_CAPTION
MEMBER_CAPTION xmlns=urn:schemas-microsoft-com:xml-analysis:rowset 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xmlns:xsd=http://www.w3.org/2001/XMLSchema; 
xmlns:ddl2=http://schemas.microsoft.com/analysisservices/2003/engine/2; 
xmlns:ddl2_2=http://schemas.microsoft.com/analysisservices/2003/engine/2/2; 
xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
Northwest
/MEMBER_CAPTION etc.

I need to set the combo to a default preference e.g. Northwest by searching 
its dataProvider for that value and then setting selectedIndex. The code

var msRS:Namespace= new Namespace( 
urn:schemas-microsoft-com:xml-analysis:rowset);
var temp1:Object = responseRows.(msRS::MEMBER_CAPTION == Northwest)

finds the Northwest row but I do not have the row number to use to set 
selectedIndex of combo. As always, TIA,

Mic


 


  

Re: [flexcoders] Automatic Calculation of TextInput Bounded Variables

2010-08-25 Thread claudiu ursica
If you pass to the function a bindable variable or more it will execute every 
time the input parameters change their values.
C





From: Angelo Anolin angelo_ano...@yahoo.com
To: flexcoders@yahoogroups.com
Sent: Wed, August 25, 2010 5:03:45 PM
Subject: [flexcoders] Automatic Calculation of TextInput Bounded Variables

   
Dear FlexCoders,

For brevity, I would give an example of what I want to achieve.

I have three textinput, namely t1, t2 and t3.

t3 is the sum of t1 and t2.

I have declared three number variables that are bound to the text input.

Is it possible that instead of coding for a change event in each textinput, i 
would simply declare a function that would automatically calculate the values 
bound to the textinput through the variables?

Appreciate your inputs. Thanks.

 


  

Re: [flexcoders] textInput modification

2010-08-12 Thread claudiu ursica
http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/fl/controls/TextInput.html



Events:

changeDispatched when user input changes text in the TextInput component.


http://www.adobe.com/livedocs/flex/2/langref/mx/controls/TextInput.html
change
Dispatched when text in the TextInput control changes through user input or 
data binding.TextInput
 Inherited
  
dataChange
Dispatched when the data property changes.





 
 
 
 
 
 
 
 
 
 
 
 
 
 






From: Christophe christophe_jacque...@yahoo.fr
To: flexcoders@yahoogroups.com
Sent: Thu, August 12, 2010 1:23:31 PM
Subject: [flexcoders] textInput modification

  
Hello, 

How to know when a textInput has been modified ? 

Thank you,
Christophe, 


 


  

Re: [flexcoders] flex 4 TabBar skinning...

2010-08-11 Thread claudiu ursica
I only skinned a ButtonBar in FX4 i was using it as a language bar, I still 
have 
the code somewhere if you think it would help...
C





From: grimmwerks gr...@grimmwerks.com
To: flexcoders@yahoogroups.com
Sent: Wed, August 11, 2010 6:37:53 AM
Subject: [flexcoders] flex 4 TabBar skinning...

   
Trying to find a few examples for skinning the Buttons in a Tab bar, but the 
ones I've found don't seem to do it...


Anyone have an idea?


Garry Schafer
grimmwerks
gr...@grimmwerks. com
portfolio: www.grimmwerks. com/





 


  

Re: [flexcoders] Flex 4: addEventListener in loop

2010-08-10 Thread claudiu ursica


Why are you calling java can't you just validate on client?
Presumably not... can't you just pass the whole datagrid data once to java and 
perform once there the validation?

How do you populate the datagrid in the first place? If you get data from the 
server you should already have it valid ...

Share more info on this if you can,
C




From: Adnan ad...@green.ba
To: flexcoders@yahoogroups.com
Sent: Tue, August 10, 2010 3:58:35 PM
Subject: [flexcoders] Flex 4: addEventListener in loop

   
Hello,

I have a for loop like (pseudocode);

for (var i:int=0; i  10; i++) 
{
callJava.method(i);
callJava.addEventListener(result, finalMethod);

if (finallMethod) == VAL: 1; //validation failled, break the loop
}

private function finalMethod(e:ResultEvent):String
{
return VAL:  + e.currentTarget.lastResult;
}

The loop is called to validate rows in a datagrid. I am fetching each row and 
the performing a check using a Java method, if the test passes, I need to 
continue to take the next row and so on. There is no point to waste time on 
looping thru 10 rows if the validation falls on the first row and so on. 


How can I handle this case in flex, as my call/result is asynchronous and I 
will 
get it few milliseconds later, by the time I get the result for the first value 
my loop will already have completed.

All help is appropriated.
Thanx,
Adnan


 


  

Re: [flexcoders] Re: Flex 4: addEventListener in loop

2010-08-10 Thread claudiu ursica
Ok I see your point. However it is really a bad idea to make a service call for 
each row. You need to perform validation on client side if possible. Having 
server calls for each row will be a performance penalty for your app if you'll 
have many rows to validate. (You can still keep data validation o server client 
code can be de-compiled and read by anyone). If the validation logic is too 
complex and all stored into db (as I gather from here I take information from 
the row and do some complex queries from about 20+tables with PL/SQL), then 
send a batch of rows to the java method and validate them all at once as I said 
earlier. It really depends on your architecture ... I kind of always was able 
to 
have enough business logic on the client to avoid unnecessary calls to the 
server. In your case It might be impossible if java needs to talk to db for 
validation. Normally you should have a java layer to handle that business logic 
and only commit to db if data is valid. If so it would be easy to have that 
logic duplicated on client side, and you'll be happy cause you avoid calls and 
will cal java/lcds only on save button click. Otherwise probably sending the 
whole datagrid at once will solve your issue... 


Still if you allow user to input directly into rows is like filling a form 
you'll need to perform at least some basic validation on the cell's focus 
out

HTH,
C





From: Adnan ad...@green.ba
To: flexcoders@yahoogroups.com
Sent: Tue, August 10, 2010 4:35:28 PM
Subject: [flexcoders] Re: Flex 4: addEventListener in loop

   
The datagrid is editable and populated directly, once I hit the save button I 
need to validate the data, I take information from the row and do some complex 
queries from about 20+tables with PL/SQL, comparing some values and so on, so 
if 
the values are correct I save that row using a service from LCDS.

hope this helps?

Sending the whole datagrid data once to java? hm, seems to be a good idea

--- In flexcoders@yahoogroups.com, claudiu ursica the_bran...@... wrote:

 
 
 Why are you calling java can't you just validate on client?
 Presumably not... can't you just pass the whole datagrid data once to java 
 and 

 perform once there the validation?
 
 How do you populate the datagrid in the first place? If you get data from the 
 server you should already have it valid ...
 
 Share more info on this if you can,
 C
 
 
 
 
 From: Adnan ad...@...
 To: flexcoders@yahoogroups.com
 Sent: Tue, August 10, 2010 3:58:35 PM
 Subject: [flexcoders] Flex 4: addEventListener in loop
 
 
 Hello,
 
 I have a for loop like (pseudocode);
 
 for (var i:int=0; i  10; i++) 
 {
 callJava.method(i);
 callJava.addEventListener(result, finalMethod);
 
 if (finallMethod) == VAL: 1; //validation failled, break the loop
 }
 
 private function finalMethod(e:ResultEvent):String
 {
 return VAL:  + e.currentTarget.lastResult;
 }
 
 The loop is called to validate rows in a datagrid. I am fetching each row and 
 the performing a check using a Java method, if the test passes, I need to 
 continue to take the next row and so on. There is no point to waste time on 
 looping thru 10 rows if the validation falls on the first row and so on. 
 
 
 How can I handle this case in flex, as my call/result is asynchronous and I 
will 

 get it few milliseconds later, by the time I get the result for the first 
 value 

 my loop will already have completed.
 
 All help is appropriated.
 Thanx,
 Adnan



 


  

Re: [flexcoders] Re: Flex 4: addEventListener in loop

2010-08-10 Thread claudiu ursica
NP,
Make sure you have a way of identifying which rows are not valid, when server 
replies with the errors list, you may need to be able to show feedback to the 
user on specific invalid row...

Cheers,
C





From: Adnan ad...@green.ba
To: flexcoders@yahoogroups.com
Sent: Tue, August 10, 2010 5:10:55 PM
Subject: [flexcoders] Re: Flex 4: addEventListener in loop

   
Thanx a lot,

I have some basic validation on the datagrid itself. I allow the user to only 
enter 5 rows at once, and I am preparing a method to send all of those 5 rows 
at 
once to Java, validate them and return only errors.

Thanx again Claudiu for your help.
Regards,
Adnan

--- In flexcoders@yahoogroups.com, claudiu ursica the_bran...@... wrote:

 Ok I see your point. However it is really a bad idea to make a service call 
 for 

 each row. You need to perform validation on client side if possible. Having 
 server calls for each row will be a performance penalty for your app if 
 you'll 

 have many rows to validate. (You can still keep data validation o server 
 client 

 code can be de-compiled and read by anyone). If the validation logic is too 
 complex and all stored into db (as I gather from here I take information 
 from 

 the row and do some complex queries from about 20+tables with PL/SQL), then 
 send a batch of rows to the java method and validate them all at once as I 
 said 

 earlier. It really depends on your architecture ... I kind of always was able 
to 

 have enough business logic on the client to avoid unnecessary calls to the 
 server. In your case It might be impossible if java needs to talk to db for 
 validation. Normally you should have a java layer to handle that business 
 logic 

 and only commit to db if data is valid. If so it would be easy to have that 
 logic duplicated on client side, and you'll be happy cause you avoid calls 
 and 

 will cal java/lcds only on save button click. Otherwise probably sending the 
 whole datagrid at once will solve your issue... 
 
 
 Still if you allow user to input directly into rows is like filling a form 
 you'll need to perform at least some basic validation on the cell's focus 
 out
 
 HTH,
 C
 
 
 
 
 
 From: Adnan ad...@...
 To: flexcoders@yahoogroups.com
 Sent: Tue, August 10, 2010 4:35:28 PM
 Subject: [flexcoders] Re: Flex 4: addEventListener in loop
 
 
 The datagrid is editable and populated directly, once I hit the save button I 
 need to validate the data, I take information from the row and do some 
 complex 

 queries from about 20+tables with PL/SQL, comparing some values and so on, so 
if 

 the values are correct I save that row using a service from LCDS.
 
 hope this helps?
 
 Sending the whole datagrid data once to java? hm, seems to be a good idea
 
 --- In flexcoders@yahoogroups.com, claudiu ursica the_braniak@ wrote:
 
  
  
  Why are you calling java can't you just validate on client?
  Presumably not... can't you just pass the whole datagrid data once to java 
and 

 
  perform once there the validation?
  
  How do you populate the datagrid in the first place? If you get data from 
  the 

  server you should already have it valid ...
  
  Share more info on this if you can,
  C
  
  
  
  
  From: Adnan adnan@
  To: flexcoders@yahoogroups.com
  Sent: Tue, August 10, 2010 3:58:35 PM
  Subject: [flexcoders] Flex 4: addEventListener in loop
  
  
  Hello,
  
  I have a for loop like (pseudocode);
  
  for (var i:int=0; i  10; i++) 
  {
  callJava.method(i);
  callJava.addEventListener(result, finalMethod);
  
  if (finallMethod) == VAL: 1; //validation failled, break the loop
  }
  
  private function finalMethod(e:ResultEvent):String
  {
  return VAL:  + e.currentTarget.lastResult;
  }
  
  The loop is called to validate rows in a datagrid. I am fetching each row 
  and 

  the performing a check using a Java method, if the test passes, I need to 
  continue to take the next row and so on. There is no point to waste time on 
  looping thru 10 rows if the validation falls on the first row and so on. 
  
  
  How can I handle this case in flex, as my call/result is asynchronous and I 
 will 
 
  get it few milliseconds later, by the time I get the result for the first 
value 

 
  my loop will already have completed.
  
  All help is appropriated.
  Thanx,
  Adnan
 



 


  

Re: [flexcoders] link button from a rss

2010-08-10 Thread claudiu ursica
Put the code inside a click event handler that should do it. 
C





From: Gustavo Duenas gdue...@leftandrightsolutions.com
To: flexcoders@yahoogroups.com
Sent: Tue, August 10, 2010 9:58:16 PM
Subject: Re: [flexcoders] link button from a rss

   
nope, I tried your way and it doesn't work, any other ideas, It seems like the 
data is not passing to the new urlrequest

Gus



On Aug 10, 2010, at 2:21 PM, Oleg Sivokon wrote:



Remove the single quotes and put the brackets around the entire expression. 
You 
cannot bind to function arguments, not in that way for sure.
Better yet, don't use binding:


mx:LinkButton label=more enabled=true  themeColor=#FF2A00 
mx:click
navigateToURL(new URLRequest(data.link));
mx:click/
mx:LinkButton/

Something like this.



 


  

Re: [flexcoders] How to declare a Complex Type : String + int-

2010-08-09 Thread claudiu ursica
Unless I am reading you wrong:

package com.whatever
{
public class Compex
{
public var stringval:String;
public var intval:int;
}
}

C





From: Nini7016 Nini7016 nahloulaha...@hotmail.com
To: flexcoders@yahoogroups.com
Sent: Mon, August 9, 2010 2:32:50 PM
Subject: [flexcoders] How to declare a Complex Type :  String + int-

   
Hello :)

I would like to create a type complex which contains one STRING and One INteger 
..
How can i declare this type please ??

Any idea please ?

Thanks :)


 


  

Re: [flexcoders] Browse And Image File

2010-08-08 Thread claudiu ursica
http://blog.flexexamples.com/2008/08/25/previewing-an-image-before-uploading-it-using-the-filereference-class-in-flash-player-10/


Should be what you are after, as long as you are ok with losing the image after 
you close the application.
C



From: Christophe christophe_jacque...@yahoo.fr
To: flexcoders@yahoogroups.com
Sent: Sun, August 8, 2010 11:36:13 AM
Subject: [flexcoders] Browse And Image File

  
Hello, 

How to get an image from the local desktop and display it in the flex 
application (without moving the image file to the server) ?

Thank you,
Christophe, 


 


  

Re: [flexcoders] Flex 4 data management - how do I approach this?

2010-08-08 Thread claudiu ursica
 Hi, There is a very good chance I don't understand exactly what the issue is here. I never bind to generated services directly. I use a domain model, in the client and also in the business layer. If you do that you only create data on the client when the user, you, whoever clicks the button call the service and persist the data into the database. The order should only matter if it actually send to the DB, otherwise clients can create as many of them and cancel without the db or even php layer to be aware of that. If you have a good domain model it very easy to attach a view to that, one/2 grids whatever suits the needs. So you can have your service call usually inside a command w/o delegate attached to it, get the data process it the way you want update your model/s and the view should listen to them and update accordingly. The UI triggers changes you cache them in vo's or in the models and only persist upon request
 (btn click). HTH,ClaudiuFrom: henrik.hedberg hen...@hedberg.bizTo: flexcoders@yahoogroups.comSent: Fri, August 6, 2010 3:30:43 PMSubject: [flexcoders] Flex 4 data management - how do I approach this?












  
  
  
Hi guys, quite an explanation here, hope someone has the patience to read it through

I'm building an application in Flex 4 that handles an ordering 
system. I have a small mySql database and I've written a few services in
 php to handle the database.

Basically the logic goes like this:

I have tables for customers, products, productGroups, orders, and orderContent

I have no problem with the CRUD management of the products, orders 
and customers, it is the order submission that the customer will fill in
 that is giving me headaches:

What I want is to display the products in dataGrids, ordered by 
group, which will be populated with Flex datamanagement via the 
php-services, and that per se is no problem. But I also want an extra 
column in the datagrid that the user can fill in with the amount he 
wishes to order of that product. This column would in theory then bind 
to the db table "orderContent" via the php services.

The problem is that you would need to create a new order in the 
database first that the data could bind to (orderContent is linked to an
 order in the db).

I do not want to create a new order every time a user enters the page
 to look at the products, rather I would like to create the order when a
 button is pressed and then take everything from the datagrids on the 
page and submit it into the database.

My idea has been to create a separate one-column datagrid, line it up
 next to the datagrid that contains the products and in that datagrid 
the user would be able to enter the amount of that product he'd like to 
order.

I've created a valueObject that contains the data I would need for an order:

Code:

package valueObjects{ public class OrderAmount {  public var productId:int;  public var productAmount:int;  public
 var productPrice:Number;  public function orderAmount()  {  } }}

My idea was to use a service to get all products from a certain 
group, populate an ArrayCollection with the data, then transfer each 
object in that ArrayCollection to an instance of the Value Object above,
 add the value object to another ArrayCollection that would the be used 
as a dataProvider for the one-column datagrid (I would only display 
amount which would be set to zero at first, but use the other data upon 
transfering it to the db)

I've tried to use the results from the automatically generated 
serviceResults that retrieve the products for the datagrid and put in a 
resultHandler that transfers the valueobjects, however this does not 
seem to work.

Basically my question is this: Am I approaching this thing completely
 wrong, is there a better solution?

Would I need to create a completely new service request to get the product id:s, and price to populate the one-column datagrid.

I'll post some code if that would help.

Thank you if you read this far. 





 





   







  

Re: [flexcoders] Heavy Data load

2010-08-02 Thread claudiu ursica
What do you donwload there? 100MB is huge. You could use FileReference if we're 
talking about files, images etc cause you can benefit from the progress events 
being fired 
C





From: fayaz140284 fayaz.r...@gmail.com
To: flexcoders@yahoogroups.com
Sent: Mon, August 2, 2010 12:48:36 PM
Subject: [flexcoders] Heavy Data load

   
I am developing an application that would require to download a huge amount of 
data from server going above 100 MB at a time. Could anyone please suggest me, 
which service (HTTPService, Remoting etc. or anything else) is best suitable 
for 
such a heavy data load. Please, give me answer with pros and cons. 


Thanks in advance
Fayaz


 


  

Re: [flexcoders] Reload an application

2010-07-23 Thread claudiu ursica
Make a javascript call through external innterface telling the browser to 
reload 
the whole html page.
That will include reloading the flex app also.

C






From: Christophe christophe_jacque...@yahoo.fr
To: flexcoders@yahoogroups.com
Sent: Fri, July 23, 2010 10:27:45 AM
Subject: [flexcoders] Reload an application

  
Hello,

How to reload a flex application from a click on a button on the application 
interface ? 


Thank you,
Christophe, 


 


  

Re: [flexcoders] Web Services and ObjectProxy question for the Flex Gurus

2010-07-22 Thread claudiu ursica
Are you generating the VO's on the client side?
C






From: flexcodemonkey michael_reg...@dell.com
To: flexcoders@yahoogroups.com
Sent: Thu, July 22, 2010 2:39:24 AM
Subject: [flexcoders] Web Services and ObjectProxy question for the Flex Gurus

   
It seems like a common problem, I'm seeing tons of posts on the web, but no 
solid solution.  I'm making a web service call which will return a complex data 
type, say Car.  The Car has internal complex data types like Wheel, Door, etc.

I'm using Flex 4 and I set the returntype for the webservice to return an array 
of Cars - Cars[].  If the web service returns more than 1, it successfully 
deserialized the data and returns an array of Car objects.  BUT, if only one is 
returned, it returns an ObjectProxy, obviously because it cannot convert it to 
an array. 


Most solutions on the web show how to add this one item to an array.  What I 
want is the actual object to be of type Car.  If I change the returntype for 
the 
web service to return a single Car object, then when it returns one, it works, 
but more than one, it returns an array of ObjectProxy objects.

I could check if the returned object is a single object, then spin through each 
attribute and convert it to a car, but because the car has other objects within 
it, they too show up as ObjectProxy objects, so I'd hve to spin through the 
tires, the doors, etc. which in my case is a lot of attributes, just to 
deserialize the object.

Is there a solution for a web service to either a) always return an array, even 
if it is an array of 1, or b) a way for the Flex code to correctly deserialize 
both an array of Cars and 1 Car?

Thanks!


 


  

Re: [flexcoders] Upload component

2010-07-08 Thread claudiu ursica
What do you use as back end service? 
Takes tops 1day to write 1 from scratch though...
C







From: Christophe christophe_jacque...@yahoo.fr
To: flexcoders@yahoogroups.com
Sent: Thu, July 8, 2010 10:36:14 AM
Subject: [flexcoders] Upload component

  
Hello, 

I am searching a reliable component to upload images from a FlashBuilder 4 
application. 


Thank you,
Christophe,


 


  

Re: [flexcoders] Data Import Web Service... Where has it gonein FB4?

2010-06-25 Thread claudiu ursica
Data Services Tab, usually near Problems one or Data Button /Connect to Web 
Service

C






From: Nick Middleweek n...@middleweek.co.uk
To: flexcoders@yahoogroups.com
Sent: Fri, June 25, 2010 4:11:51 PM
Subject: [flexcoders] Data  Import Web Service... Where has it gonein FB4?

  
Hi,

Does anyone know where I can get FB3's Import Web Service feature in FB4?

I just want to import all the Value Objects from my WSDL but the FB4 Connect to 
Web Service feature seems to create a load of bloated code. Perhaps I'm just 
used to the FB3 version and I need to adjust my thinking but what are other 
peoples thoughts on this?

It was quite easier previously, import the WSDL, copy the value objects and 
plumb in the SchemeType declarations. ..


Cheers,
Nick

 


  

Re: [flexcoders] Android Hero denies XMLSocket or Socket connection? ....errors #2031, #2048

2010-06-16 Thread claudiu ursica
I am not using the FP 10, I tried running code I AS2 instead of AS3 I was able 
to talk to the server from the Android emulator when compiled with air. Bu that 
runs only on Foryo (Android 2.2) I still have 2.1 on these phones and a version 
of flash lite. The thing is I cannot find anywhere something like Flash lite on 
android does not supports XMLSockets.

C






From: Gregor Kiddie gregor.kid...@channeladvisor.com
To: flexcoders@yahoogroups.com
Sent: Wed, June 16, 2010 2:20:55 PM
Subject: RE: [flexcoders] Android Hero denies XMLSocket or Socket connection? 
errors #2031, #2048

   
Isn’t FP only for Android 2.2?
 
And there are pre-release forums you’d be better posting this in!
 
Gk.
 


  

Re: [flexcoders] How to upload a file with FileReference ?? Any help please :( :(

2010-06-03 Thread claudiu ursica
I might be reading this the wrong way but in FILE_UPLOAD_ URL you should put 
the path to the server script that will save your file on the server.
C






From: Nini7016 Nini7016 nahloulaha...@hotmail.com
To: flexcoders@yahoogroups.com
Sent: Thu, June 3, 2010 10:29:17 AM
Subject: [flexcoders] How to upload a file with FileReference ?? Any help 
please :( :(

   
Hello 

In my application, i have to upload a local file and send it to a server.

There is my code : 

   private const FILE_UPLOAD_ URL:String = http://www. 
YOUR-WEBSITE- HERE.com/ fileref/uploader .cfm;
 
   private function init():void 
{
fileRef = new FileReference( );
var textTypes:FileFilte r = new FileFilter( WSDL file, 
*.pdf ; *.wsdl);
xmlTypes= new Array(textTypes) ;


//the upload
fileRef.addEventLis tener(Event. SELECT,fileRef_select);
fileRef.addEventLis tener(Event. COMPLETE, 
fileRef_complete) ;

}

   mx:Button label=Upload file id=btn_upload click=browseAndUpload();  
x=384 y=59 enabled=true /
  
private function browseAndUpload():void 
{

 
 fileRef.browse(xmlTypes);
 
 
  
}

private function fileRef_select(evt:Event): void {
try {
fileRef.upload( new URLRequest(FILE_ UPLOAD_URL) );
 //  fileRef.load 
//fileRef.save( );
//display the name of the file in the AreaText
forChange.text = fileRef.name;

//fill in the file in the List
myCB.dataProvider = fileRef.name;

} catch (err:Error) {
//message.text = ERROR: zero-byte file;
Alert.show( ERROR to upload the file);
}
}

When i add fileRef.load in the code that provides ERROR :( :( 
However i don't understand what should i put in the variable FILE_UPLOAD_ URL ??

Any idea please :( 

Thanks for your help 

;)




Votre vie privée l'est-elle vraiment ? Internet Explorer 8 vous protège 
gratuitement ! 
 


  

Re: [flexcoders] How to store information in Cookies ???

2010-05-27 Thread claudiu ursica
You use a flash SharedObject. Google for example there are plenty of them like 
this one 
http://livedocs.adobe.com/flex/3/html/help.html?content=lsos_5.html

C





From: Nini7016 Nini7016 nahloulaha...@hotmail.com
To: flexcoders@yahoogroups.com
Sent: Thu, May 27, 2010 11:14:44 AM
Subject: [flexcoders] How to store information in Cookies ???

   
Hello :)

I have a menu item et i would like to store these information in CookiesI 
didn't work with Cookies before :( :( ...Do you have any example please please 
...
  there is a code for the menu item : 
 menuitem label=Option icon={newproject} 
menuitem label=View icon={newproject}  
menuitem label=Proprities icon= id=18 type=check 
toggled=false /
menuitem label=Macroimage icon= id=19 type=check 
toggled=false /
menuitem label=UDDI  Navigator icon= id=20 
type=check toggled=true /
/menuitem
/menuitem

   And when the user modifie these infomation by checking an option, i would 
like to store these information .

  Any idea please ...??? 

  Thank you very much :):):)







Vous voulez protéger votre numéro de CB ? Utilisez Internet Explorer 8 
 


  

Re: [flexcoders] Error #2063: Error attempting to execute IME command anyone?

2010-05-12 Thread claudiu ursica


It seems that the error is generated when I use the Alert.show(); Removed all 
the aAlert and it doesn't show anymore.

The weird thing is that on the development machine I don't get this error. I 
use win7 with flex 4. However when deployed it is happening. The strage thing 
is that when deployed I cannot get the data-s from the server anymore on any 
machine except mine. SO on My machine everything is fine, even when I look on 
the app from the url from server. But on other machines is not working. I used 
a generated webservice., make a call and get the data. On my machine everything 
is fine, but on others (win xp or win vista or win7) the code does not react 
the servvice for some reasons.

Now I got read of the error by removing the Alert.show but cannot get the 
data...

C





From: Alex Harui aha...@adobe.com
To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com
Sent: Wed, May 12, 2010 12:08:02 AM
Subject: Re: [flexcoders] Error #2063: Error attempting to execute IME command 
anyone?

   
This seems to be for an unexpected error in the IME OS library.  Which version 
of Windows?  Which IME is installed?  Which Browser and Player Version?  Is it 
only one one system or everywhere you try it?

Anything else unusual?  Are you running an automated test where the app is not 
the active window?  Is there some other app that might be fighting for control 
of the IME?


On 5/11/10 2:40 PM, claudiu the_braniak@ yahoo.com wrote:



 
 
   

Hi,
I am getting this error and I cannot seem to find why. I googled for it but 
couldn't find anything useful to get rid of it. Has anyone encountered this?

Error #2063: Error attempting to execute IME command.
 at flash.system: :IME$/set enabled()
 at mx.managers: :FocusManager/ focusInHandler( )[E:\dev\ 4.0.0\frameworks 
 \projects\ framework\ src\mx\managers\ FocusManager. as:642]
 at flash.display: :Stage/set focus()

Running flex 4, windows.

i run this code

if (Capabilities. hasIME)
{
if (IME.enabled)
{
Alert.show(IME is installed and enabled.);
}
else
{
Alert.show(IME is installed but not enabled. Please enable your IME and try 
again.);
}
}
else
{
Alert.show(IME is not installed. Please install an IME and try again.);
}

and it tells me that IME is installed but not enabled. If I try to set 
enabled to true I get another error.

Error: Error #2063: Error attempting to execute IME command.
 at flash.system: :IME$/set enabled() 

on the line that sets enabled to true

Any input is appreciated;
10x,
C

 
   



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


  

Re: [flexcoders] thunderbolt

2010-05-04 Thread claudiu ursica
I have used it a while ago, basically it is the same as logger, but you need to 
define a different debug target. 
Google a little bit I was able to make it run in under an hour, don't remember 
by heart what needs to be done but is really trivial.

C






From: cholid cholid cholid_rid...@yahoo.com
To: flexcoders@yahoogroups.com
Sent: Tue, May 4, 2010 12:01:44 PM
Subject: [flexcoders] thunderbolt

   
Hi all
anyone use thunderbolt for debuging?
can tell me detail how to use it?
thanks


 


  

Re: [flexcoders] Loading FXG files at runtime

2010-04-19 Thread claudiu ursica
Count me in :),
C






From: Mark Lapasa ma...@hitgrab.com
To: flexcoders@yahoogroups.com
Sent: Mon, April 19, 2010 4:36:29 PM
Subject: Re: [flexcoders] Loading FXG files at runtime

   
This is an interesting question. I would like to know the answer too.



On Thu, Apr 15, 2010 at 4:53 AM, Pradeek pra...@yahoo. com wrote:














  


 
  
 
Hi is it possible to load FXG files at runtime and render them? Thanks.



 


  

Re: [flexcoders] Question about the flash detection kit script

2010-04-01 Thread claudiu ursica
Embed the swf with swfobject javascript library.
C






From: Raymond Brown silenttr...@yahoo.com
To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com
Sent: Thu, April 1, 2010 5:47:09 PM
Subject: [flexcoders] Question about the flash detection kit script

   
Can anyone give advice on how best to use the flash detection kit.  My users 
have 4.0 minimum so I should be able to use the flash_AS_detection. as but I am 
not sure how to use it.  I want to achieve the following:

1.  My users go to page https://127. 0.0.1:8443/ initial/startPag e.swf
 - if they are not the right flash then they are transferred to the page 
upgrade_flash. html (Which of course takes them adobe.)
 - how do I use the flash_AS_detection. as in a swf to achieve this?

2.  If users are at right level then they are transferred to my swf
 - https://127. 0.0.1:8443/ Frank/rockOn. swf
 - again how do I add this to the startPage.swf noted in line 1.

-ray

 


  

Re: [flexcoders] Embedded an image list

2010-03-22 Thread claudiu ursica
Why would you want to embed when you can load them at runtime ?
C






From: Christophe christophe_jacque...@yahoo.fr
To: flexcoders@yahoogroups.com
Sent: Mon, March 22, 2010 11:02:31 AM
Subject: [flexcoders] Embedded an image list

  
Hello,

How to embed an image list in a swf for a galery ? 
At this time, the image file paths are in a xml ? 

Thank you,
Christophe, 


 


  

Re: [flexcoders] Embedded an image list

2010-03-22 Thread claudiu ursica
I'm still trying to understand what you are trying to achieve... But you should 
be able to loadn the xml at run time, parse it and load the images from the 
path that you read from the xml ...
C





From: Oleg Sivokon olegsivo...@gmail.com
To: flexcoders@yahoogroups.com
Sent: Mon, March 22, 2010 12:42:48 PM
Subject: Re: [flexcoders] Embedded an image list

   
This depends on the OS and / or the programming / scripting language you know 
to operate it. I had written a tiny C# program to browse a given folder for the 
files of a given type and generate an AS file with embeds, but, I'm sure you 
can do the same with any language that can access to the file system and 
process strings, even AIR can do that.

If you're interested in what I did - here it is:

using System;
using System.Collections. Generic;
using System.Linq;
using System.Windows. Forms;

namespace ResourceBatchProces sor
{
static class Program
{
/// summary
/// The main entry point for the application.
/// /summary
[STAThread]
static void Main()
{
Application. EnableVisualStyl es();
Application. SetCompatibleTex tRenderingDefaul t(false);
Application. Run(new Form1());
}
}
}

using System;
using System.Collections. Generic;
using System.Linq;
using System.Text;
using System.Text. RegularExpressio ns;
using System.IO;
using System.Xml;

namespace ResourceBatchProces sor
{
class MXMLGenerator
{
public static string templateStart = 
@?xml version=1.0 encoding=utf-8?
fl:Sprite 
xmlns:mx=http://www.adobe. com/2006/ mxml
xmlns:fl=flash.display. *
xmlns:rs=org.wvxvws.resource s.*
;
public static string embed =
@rs:Resource embed=@Embed(source='%path%')/
;
public static string templateEnd = /fl:Sprite;

public static Regex nonAlphaNum = new Regex(@\W, RegexOptions. 
Compiled) ;

public static void ProcessDirectory( string path)
{
DirectoryInfo di = new DirectoryInfo( path);
FileInfo[] files = di.GetFiles(*.png);
string filePath;
string resultFileName = di.Parent.FullName + @\ + 
nonAlphaNum. Replace(di. Name, _) + .mxml;
string resultFile = (string)templateSta rt.Clone( );
foreach (FileInfo fi in files)
{
filePath = ((string)embed. Clone()). Replace(%path%, 
fi.FullName) ;
resultFile += filePath;
}
resultFile += templateEnd;
XmlTextWriter textWriter = new XmlTextWriter( resultFileName, 
Encoding.UTF8) ;
textWriter.WriteRaw (resultFile) ;
textWriter.Close( );
}

public static void ProcessDirectory( string[] path)
{
//DirectoryInfo[ ] di = new DirectoryInfo[ path.Length] ;
//int i = 0;
foreach (string pt in path)
{
ProcessDirectory( pt);
//di.SetValue( new DirectoryInfo( pt), i);
}
}
}
}

using System;
using System.Collections. Generic;
using System.ComponentMod el;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows. Forms;
using System.IO;

namespace ResourceBatchProces sor
{
public partial class Form1 : Form
{
private bool multipleSelected = false;

public Form1()
{
InitializeComponent ();
this.buttonCreateMX ML.Enabled = false;
this.buttonSelectFo lder.Click += new EventHandler( 
buttonSelectFold er_Click) ;
this.buttonCreateMX ML.Click += new EventHandler( buttonCreateMXML 
_Click);
this.buttonSelectAl lFolders. Click += new EventHandler( 
buttonSelectAllF olders_Click) ;
this.textSelectedFo lder.TextChanged += new EventHandler( 
textSelectedFold er_TextChanged) ;
this.Resize += new EventHandler( Form1_Resize) ;
}

void buttonSelectAllFold ers_Click( object sender, EventArgs e)
{
FolderBrowserDialog dialog = new FolderBrowserDialog ();
DialogResult result = dialog.ShowDialog( );
if (result == DialogResult. OK)
{
this.textSelectedFo lder.Text = dialog.SelectedPath ;
}
this.multipleSelect ed = true;
}

void Form1_Resize( object sender, EventArgs e)
{
this.buttonCreateMX ML.Width = this.Width - 30;
this.buttonSelectFo lder.Width = this.Width - 30;
this.textSelectedFo lder.Width = this.Width - 30;
this.buttonSelectAl lFolders. Width = this.Width - 30;
this.label2. Width = this.Width;
}

void textSelectedFolder_ TextChanged( object sender, EventArgs e)
{
if (this.textSelectedF older.Text == )
{
this.buttonCreateMX ML.Enabled = 

Re: [flexcoders] Re: Issue in Flex application deployed in Load balanced environment

2010-03-06 Thread claudiu ursica
I had the something similar more that one year ago:
we did something like this in the delegate which had the service instance

service.method = POST;
service.contentType = application/x-www-form-urlencoded;
var call : Object = service.send({test:ping});

In our case the issue with the netscaler was messing with the requests and was 
not able to consume empty GET/POST requests, so it kept rejecting them as 
invalid when the first empty GET/POST.

HTH,
C



From: murugs73 murug...@yahoo.com
To: flexcoders@yahoogroups.com
Sent: Fri, March 5, 2010 5:54:32 PM
Subject: [flexcoders] Re: Issue in Flex application deployed in Load balanced 
environment

   
Hi, 
I do have the same issue, when flex app is deployed behind the load balancer, 
where ssl is terminated. Please let me know, how i can resolve this..

Thanks
Murugan.

--- In flexcod...@yahoogro ups.com, abhgup abhishek.gupta@ ... wrote:

 
 I have developed the dashboard in my application using flex 3.0. For this I
 have used JSP wrapper around the flex application. My application runs on
 JBoss application server. for communication between flex app and my
 application i am using LCDS. HTTPService component is being used to receive
 data from the server. Channel definitions are given in service-config. xml
 for amf and http channels and for both secure secure and not secure mode. In
 my proxy-config. xml i have defined Channels and destinations.
 
 
 
 services-config. xml
 
 ...
 ...
 
 channel-definition id=my-amf class=mx.messaging .channels. AMFChannel 
 endpoint
 url=http:// {server.name} :{server. port}/{context. root}/messagebro ker/amf
 class=flex. messaging. endpoints. AMFEndpoint /
 properties
   polling-enabled false/polling- enabled
 /properties
 /channel-definitio n
 
 channel-definition id=my-secure- amf
 class=mx.messaging .channels. SecureAMFChannel 
 endpoint
 url=https:/ /{server. name}:{server. port}/{context. root}/messagebro 
 ker/amfsecure
 class=flex. messaging. endpoints. SecureAMFEndpoin t/
 properties
   add-no-cache- headersfalse /add-no-cache- headers
 /properties
 /channel-definitio n
 
 channel-definition id=my-http class=mx.messaging .channels. HTTPChannel 
 endpoint
 url=http:// {server.name} :{server. port}/{context. root}/messagebro 
 ker/http
 class=flex. messaging. endpoints. HTTPEndpoint /
 /channel-definitio n
 
 channel-definition id=my-secure- http
 class=mx.messaging .channels. SecureHTTPChanne l
 endpoint
 url=https:/ /{server. name}:{server. port}/{context. root}/messagebro 
 ker/httpsecure
 class=flex. messaging. endpoints. SecureHTTPEndpoi nt/
 properties
 add-no-cache- headersfalse /add-no-cache- headers
 /properties
 /channel-definitio n
 
 
 ...
 ...
 
 
 
 proxy-config. xml
 
 
 
 ...
 ...
 
 default-channels
 channel ref=my-http /
 channel ref=my-amf /
 channel ref=my-secure- http/
 channel ref=my-secure- amf/
 /default-channels
 
 ...
 ...
 
 destination id=dashboardServic e
 properties
 url/kr/servlet/ DashboardServlet /url
 /properties
 /destination
 
 destination id=dashboardJSPSer vice
 properties
 url/kr/krportal/ dashboardJSPServ ice.jsf/ url
 /properties
 /destination
 
 
 
 ...
 
 ...
 
 
 
 In my development environment both secure and non secure mode were working
 fine. Now when I have deployed it behind the load balancer(which accepts
 secure requests only and if the request is not secure it redirects it to
 secure url) there is no response from the message broker servlet. One thing
 more I have observed is when the environment is non load balanced there are
 request like
 'http://{server. name}:{server. port}/{context. root}/messagebro ker/http' . 
 and
 these requests are post request. But in load balanced environment with ssl
 the request is again like
 'http://{server. name}:{server. port}/{context. root}/messagebro ker/http' 
 which
 is a post request and it is redirected to
 'https://{server. name}:{server. port}/{context. root}/messagebro ker/http'
 which is a get request. The content returned by this get request is null.
 
 
 
 Looking for some comments
 
 
 
 Thanks
 
 Abhishek Gupta 
 -- 
 View this message in context: http://old.nabble. com/Issue- in-Flex-applicat 
 ion-deployed- in-Load-balanced -environment- tp26156027p26156 027.html
 Sent from the FlexCoders mailing list archive at Nabble.com.



 


  

Re: [flexcoders] Can't move titlewindow in an Application

2010-03-05 Thread claudiu ursica
in creation complete add this.isPopUp = true;
Make sure u get rid of all the listeners ...
C





From: xmwang1982 ask...@gmail.com
To: flexcoders@yahoogroups.com
Sent: Fri, March 5, 2010 4:30:30 PM
Subject: [flexcoders] Can't move titlewindow in an Application

   
Hi experts,

I have a class inheriting TitleWindow, and I add the following code to enable 
drag/drop of the title window by press on the title bar:

private function onCreationComplete( evt:Event) :void
{
this.titleBar. addEventListener (MouseEvent. MOUSE_DOWN, startDragWin) ;
this.titleBar. addEventListener (MouseEvent. MOUSE_UP, stopDragWin) ;
this.titleBar. addEventListener (MouseEvent. MOUSE_OUT, stopDragWin) ; 
this.addEventListen er(DragEvent. DRAG_DROP, moveSelf);
}

private function moveSelf(evt: DragEvent) :void
{
this.x = evt.stageX;
this.y = evt.stageY; 
}

private function startDragWin( evt:MouseEvent) :void
{


this.startDrag( );
}



private function stopDragWin( evt:MouseEvent) :void
{

this.stopDrag( );
}

I added the object as the top level child of an application. However the 
settings of x and y are not working. The window is not moved.

I have been confused for long. Any possible reason?

Layout of application is: layout=absolute

The following attributes were set for the title window in the MXML of the 
application 

MyTitleWindow backgroundAlpha= 0.5 bottom=10 right=10 width=400 
height=300 ...

I guess these initial settings don't matter at all.

Please suggest. Thanks in advance.


 


  

Re: [flexcoders] Re: Can't move titlewindow in an Application

2010-03-05 Thread claudiu ursica
I have no idea, what is wrong with your app, I have the same thing and it is 
working  Share the window and I'll try to have a look these days
C





From: xmwang1982 ask...@gmail.com
To: flexcoders@yahoogroups.com
Sent: Sat, March 6, 2010 3:58:58 AM
Subject: [flexcoders] Re: Can't move titlewindow in an Application

   
if I set isPopUp to true and remove all the listners, I can't even drag and 
move the window.

with the old code, I can drag and move the window but can't drop it to the last 
position in dragging.

what's wrong with that? thanks.

--- In flexcod...@yahoogro ups.com, claudiu ursica the_braniak@ ... wrote:

 in creation complete add this.isPopUp = true;
 Make sure u get rid of all the listeners ...
 C
 
 
 
 
  _ _ __
 From: xmwang1982 ask...@...
 To: flexcod...@yahoogro ups.com
 Sent: Fri, March 5, 2010 4:30:30 PM
 Subject: [flexcoders] Can't move titlewindow in an Application
 
 
 Hi experts,
 
 I have a class inheriting TitleWindow, and I add the following code to enable 
 drag/drop of the title window by press on the title bar:
 
 private function onCreationComplete( evt:Event) :void
 {
 this.titleBar. addEventListener (MouseEvent. MOUSE_DOWN, startDragWin) ;
 this.titleBar. addEventListener (MouseEvent. MOUSE_UP, stopDragWin) ;
 this.titleBar. addEventListener (MouseEvent. MOUSE_OUT, stopDragWin) ; 
 this.addEventListen er(DragEvent. DRAG_DROP, moveSelf);
 }
 
 private function moveSelf(evt: DragEvent) :void
 {
 this.x = evt.stageX;
 this.y = evt.stageY; 
 }
 
 private function startDragWin( evt:MouseEvent) :void
 {
 
 
 this.startDrag( );
 }
 
 
 
 private function stopDragWin( evt:MouseEvent) :void
 {
 
 this.stopDrag( );
 }
 
 I added the object as the top level child of an application. However the 
 settings of x and y are not working. The window is not moved.
 
 I have been confused for long. Any possible reason?
 
 Layout of application is: layout=absolute
 
 The following attributes were set for the title window in the MXML of the 
 application 
 
 MyTitleWindow backgroundAlpha= 0.5 bottom=10 right=10 width=400 
 height=300 ...
 
 I guess these initial settings don't matter at all.
 
 Please suggest. Thanks in advance.



 


  

Re: [flexcoders] help - code assist stopped working

2010-03-04 Thread claudiu ursica
Did you by any chance upgraded to a newer release than beta 2?
C





From: Chris Sheffield cmsheffi...@gmail.com
To: flexcoders@yahoogroups.com
Sent: Thu, March 4, 2010 7:55:03 PM
Subject: [flexcoders] help - code assist stopped working

   
I apologize. This is probably more of an Adobe Support issue, but since I'm 
using beta 2 of FB4, I wasn't sure what kind of support is currently available.

Anyway, I was working on a project yesterday and all of a sudden my code assist 
stopped working in .as files. Still seems to work fine in .mxml files, so not 
sure what's going on. Has anyone run into this? Is there anything I can do? The 
error I receive is:

Content Assist did not complete normally.  Please see the log for more 
information.
java.lang.NullPoint erException


I haven't checked the log because I have no idea where it can be found. Running 
on a Mac, btw. I suppose my next step is to simply reinstall the product if I 
can't find another fix.

Thanks,
Chris


--
Chris Sheffield
Read Naturally, Inc.
www.readnaturally. com 

 


  

Re: [flexcoders] Pb with mx:List

2010-03-03 Thread claudiu ursica
Do you use some custom renderer in there?
C





From: Christophe christophe_jacque...@yahoo.fr
To: flexcoders@yahoogroups.com
Sent: Wed, March 3, 2010 11:39:16 AM
Subject: [flexcoders] Pb with mx:List

   
Hello, 

I have a List, but the selected item is selected only when I click on the 
element, when I mouve the mouse the items is getting unselected.

How to keep the element selected ?

Thank you,
Christophe, 


 


  

Re: [flexcoders] Flowing Containers

2010-02-26 Thread claudiu ursica
Try with the flow box from the flexlib
C





From: criptopus sd_br...@ntlworld.com
To: flexcoders@yahoogroups.com
Sent: Fri, February 26, 2010 4:34:43 PM
Subject: [flexcoders] Flowing Containers

   
What I need is a mx:HBox that allows me to put Tick Boxes in it in a 
horizontal row but when the HBox resizes due to the browser window changing 
sizes it wraps the Tick Boxes onto the next line.

I thought of using Tile, but the text that comes with the tick boxes are many 
diffrent lengths long and the Tile does not take into account the length of the 
tick boxes.

from this

#  XX XXX XXX XX XXX XX #

to this

#  XX XXX XXX#
# XX XXX XX  #

when the window changes size.

- Stephen Brown


 


  

Re: [flexcoders] Strategies for switching between testing and deployment addresses

2010-02-25 Thread claudiu ursica
We keep out URL's in an external XML file which is deployed on different 
environments. When app loads make a call to the Servlet and gets the URL's. The 
Servlet returns the configuration according to the environment that it is 
deployed on.
HTH,
C






From: Nick Middleweek n...@middleweek.co.uk
To: flexcoders@yahoogroups.com
Sent: Thu, February 25, 2010 2:32:28 PM
Subject: Re: [flexcoders] Strategies for switching between testing and  
deployment addresses

  
Hey David,

If you have a local DNS you could setup a subdomain for the production IP and 
edit your windows hosts file to override it to point locally...

Tracy mentioned FlashVars, that's a real easy way.

You've help me enough in the world of 4D so I'll ping something over if you 
need it...



Cheers,
Nick





On 22 February 2010 02:00, David Adams dpad...@gmail. com wrote:














  


 
  
 
I've been writing some small programs that use HTTPService calls to
fetch data from a back-end. During testing, I'm using 127.0.0.1 or an
IP address on my subnet. When I deploy, I update the IP address in
service definitions to the right external address and build the app.
Or at least I mean to. It's all too easy to accidentally change the
addresses for internal testing and then forget to switch them back
before building.

Is there a best practice or simple strategy for putting the IP address
somewhere outside of the source code that it can easily be edited
without a rebuild?

Thanks for any advice.



 


  

Re: [flexcoders] Is removing a child from DisplayList better the visible=includeInLayout=false?

2010-02-24 Thread claudiu ursica
Removing is expensive it is better to hide, or to try reparenting.
C






From: tntomek tnto...@yahoo.com
To: flexcoders@yahoogroups.com
Sent: Wed, February 24, 2010 6:14:39 AM
Subject: [flexcoders] Is removing a child from DisplayList better the 
visible=includeInLayout=false?

   
Assuming you want to use that UIComponenet again in future and not destro it, 
does the lifecycle of a UiComponent still kick in when includeInLayout is 
false? is it much more efficient to remove it from displ


 


  

Re: [flexcoders] Binding Issues with ArrayCollections

2010-02-24 Thread claudiu ursica
In a non related thins you shouldn't have view refereces in your model - 
modelLocator.view.fields . You could listen for the COLLECTION_CHANGE event in 
the view and see it that fires when you add the item. If so you can do the 
update in the handler by hand. On the other hand if you use list based 
controls in your view it kind of always works...
HTH,
C





From: chefbrittison britton.j...@gmail.com
To: flexcoders@yahoogroups.com
Sent: Wed, February 24, 2010 3:12:32 AM
Subject: [flexcoders] Binding Issues with ArrayCollections

   
I'm using Cairngorm in a project and using Commands to update the model.  Upon 
adding an item to an ArrayCollection in the model, custom components that are 
bound to it are not updated.  It seems that bindings are only fired upon a 
change of reference.  Is there something I'm missing or a better way to 
accomplish the same task.  Any help is much appreciated.  Thanks.

//code in command
private var modelLocator: ModelLocator = ModelLocator. getInstance( );
modelLocator. view.fields. addItem(newItem) ;




 


  

Re: [flexcoders] Pb with mx:image and Path on server

2010-02-23 Thread claudiu ursica
Try to see the image in your browser. The you'll know that the path is correct. 
C





From: Christophe christophe_jacque...@yahoo.fr
To: flexcoders@yahoogroups.com
Sent: Tue, February 23, 2010 4:56:35 PM
Subject: [flexcoders] Pb with mx:image and Path on server

   
Hello, 

Its impossible to view an image on my server with mx:image

My server folders are:
-- Images -- .JPG images
-- www  .swf application

When I use mx:image source=../Images/ myImg.jpg /

It does not work. 

Notice the image repertory is at the same level as www. Image has 755 as 
properties.

What is the solution ?

Thank you,
Christophe, 


 


  

Re: [flexcoders] Dynamically naming classes

2010-02-22 Thread claudiu ursica
When you iterate you can assign an id of item_ and the current iterated item. 
I haven't used the component but I'm sure you can assign that id somehow to the 
page.
C






From: Wally Kolcz wko...@isavepets.com
To: flexcoders@yahoogroups.com
Sent: Mon, February 22, 2010 4:14:43 PM
Subject: [flexcoders] Dynamically naming classes

   
I am using Ruben Swieringa's flip book 
(http://www.rubenswieringa.com/blog/flex-book-component-beta) to create 
a journal for a project which has a Book class and Page Class and a 
really cool goToPage() method. I am using a loop to add Pages based on 
an ArrayCollection record (dateAdded) and would like to name the Page 
instance the rendered version of the date. Problem is I cannot find 
anywhere to name the class based on a dynamical element. I googled all 
around for it, but haven't come up with a working solution in the Flex 
enviornment. I want to do something like this:

[Bindable] public var entries:ArrayCollec tion;
...
public function buildBook(): void {
for (var i:int = 0; i  entries.length; i ++){
var entries.getItemAt( i).dateAdded: Page = new Page();
...Add content, define styles, etc...
myBook.addChild( e.getItemAt( i).dateAdded) ;
}
}

The end result would be a page with the id of 21220100345 and I can do 
the flip to it using the .goToPage(212201003 45)


 


  

Re: [flexcoders] executeNextCommand() Cairngorm - Why?

2010-02-18 Thread claudiu ursica
Eventually it dispatches the event for you. The fact that you are new to 
Cairngorm is actually good. You should move towards dependency injection and 
other framework (e.g. PureMVC w/Spring Actionscript, Parsley). The Cairngorm as 
we all use to know it will not be around that much.

C





From: Nick Middleweek n...@middleweek.co.uk
To: flexcoders@yahoogroups.com
Sent: Wed, February 17, 2010 8:52:46 PM
Subject: [flexcoders] executeNextCommand() Cairngorm - Why?

  
Hi,

Hopefully this is a quick... I'm looking at some code that is using the 
executeNextCommand( ) in Cairngorm but I'm wondering why don't we just 
dispatch() the event that is created instead of calling executeNextCommand( )...

I'm quite new to Cairngorm and frameworks but to it seems executeNextCommand( ) 
will achieve the same results as .dispatch().

Perhaps executeNextCommand( ) is just a tad more efficient because an Event 
isn't actually fired and maybeexecuteNextCom mand() just invokes the 
frontController directly?


This is all a guess so if someone knows, please help :)


Cheers,
Nick


 


  

Re: [flexcoders] How much knowledge in Java do you actually need to be hired as a Flex Developer

2010-02-18 Thread claudiu ursica
It depends on the company. At Betfair we have dedicated java teams so the UI 
teams only do UI. Doesn;t matter if it is Flex/Flash/HTML/Ajax, we rarely touch 
the java code. You are not screwed you just need to find the right employer :).
C






From: fred44455 fred44...@yahoo.com
To: flexcoders@yahoogroups.com
Sent: Thu, February 18, 2010 12:06:09 AM
Subject: [flexcoders] How much knowledge in Java do you actually need to be 
hired as a Flex Developer

   
How much knowledge in Java do they required?? I mean that's ridiculous , last 
year there were just a few companies who were requiring some Java Knowledge now 
80% of the job ads for Flex Developers (on dice.com) require some Knowledge in 
java. I understand that it is probably to connect to back end servers. My 
question is : How much knowledge are we talking about here?? I know nothing 
about Java. so I guess I am screwed?
You end up finishing learning Flex to find out that they require another core 
technology!! That;'s stupid.

Thank you.


 


  

Re: [flexcoders] Deep Object Copy?

2010-02-16 Thread claudiu ursica
Write your own utility. Do something recursive it takes some time but it will 
fit your needs.
C






From: Nick Middleweek n...@middleweek.co.uk
To: flexcoders@yahoogroups.com
Sent: Tue, February 16, 2010 11:03:38 AM
Subject: Re: [flexcoders] Deep Object Copy?

  
Hi, I understand the problem with ByteArray is that the destination Object 
looses all knowledge of it's Value Object Classes...

I need to keep all this information intact.


Thanks,
Nick




On 15 February 2010 22:20, Guy Morton g...@alchemy. com.au wrote:
















  


 
  
 
You can use ByteArray to deep copy an object. Can't recall off the top of my 
head the code but I'm sure you could find it via the Google. :-)


On 16/02/2010, at 8:00 AM, Nick Middleweek wrote:

 


  

Re: [flexcoders] Flex call javascript

2010-02-10 Thread claudiu ursica
http://curtismorley.com/2008/11/01/actionscript-security-error-2060-security-sandbox-violation/
 
HTH
C





From: markflex2007 markflex2...@yahoo.com
To: flexcoders@yahoogroups.com
Sent: Wed, February 10, 2010 5:15:30 PM
Subject: [flexcoders] Flex call javascript

   
I use the Flex function to call javascript function

mx:Script
![CDATA[
import flash.external. *;

private function callJS():void{
var s:String;
if (ExternalInterface. available) {
var wrapperFunction: String = jsPrint;
s = ExternalInterface. call(wrapperFunc tion,'a') ;
}
}
]]
/mx:Script

But I get following error

SecurityError: Error #2060: Security sandbox violation: 
ExternalInterface caller file:///C:/jsTest/ jsTest.swf cannot access 
file:///C:/jsTest/ index.html.

why this happens,how to fix it.

Thanks

Mark


 


  

Re: [flexcoders] Best practices regarding XML to VO conversion

2010-02-09 Thread claudiu ursica
I usually had a finite number of xml's 4 or 5 per project top. So I wrote 
custom parsers/unmarshallers and use e4x. Works like clockwork :)

C





From: W.R. de Boer w...@innerfuse.biz
To: flexcoders@yahoogroups.com
Sent: Tue, February 9, 2010 4:02:54 PM
Subject: [flexcoders] Best practices regarding XML to VO conversion

   
Hello,

I am having a question what the best approach is to convert existing XML data 
to a object graph of value objects. I have spend quite some time to fix a 
memory leak in my existing parsing practice and I am curious how others solve 
this problem.

My common approach is to create a class such as EventReader and EventItemReader 
class which is responsible for the parsing of the specific XML element and 
return the appropriate value object. But somehow this code is leaking like a 
mad dog (200kb per time) while the XML file is only 16kb. Now I have currently 
rewritten it so that just using simple strong typed objects. 

But I would love to find out what I am doing wrong in my current approach and 
how to solve it. Because it makes it easier to reuse the parsing code/logic. 

For example, normally, I use the approach of creating a public class with a few 
public variables like this:

public class EventItemVO {
public var eventDate: Date;
public var eventName: String;
public var location: String;
}

and then I am having code like this to parse it:

try {
var xml: XML = new XML( loaderContent );
var parser: EventItemXMLReader = new EventItemXMLReader( xml );
parser.parse( );
} catch (e: Error) {
trace(Error occured while parsing);
} finally {
parser = null;
xml = null;
}

in the EventItemXMLReader- class I then return an instance of the EventItemVO- 
class

Somehow this leaks and while I do the same stuff in the onComplete-handler of 
the Loader and do:
array.push( {eventDate:date, eventName:name, location:location} );

The memory leak disappears. I would expect their is some reference kept alive 
but I am having a hard-time finding the reference which keeps it from garbage 
collecting it all.

How do you parse XML and convert it in value objects?

Yours,
Weyert de Boer
 


  

Re: [flexcoders] Best practices regarding XML to VO conversion

2010-02-09 Thread claudiu ursica
You can give a try. Probably somebody will figure it out after all.
C





From: W.R. de Boer w...@innerfuse.biz
To: flexcoders@yahoogroups.com
Sent: Tue, February 9, 2010 5:00:11 PM
Subject: Re: [flexcoders] Best practices regarding XML to VO conversion

   
Hi Claudiu,

I am using my custom unmarshaller class in combination with XML/E4X but I keep 
having a memory. Maybe I am just doing something? Maybe it's the use of a 
Vector-type in main VO object which stores child VO objects?

Maybe I have to nullify the variables with vectors or arrays? I can put some 
code online on pastebin.com. If anyone is interested.

Weyert de Boer
 


  

Re: [flexcoders] Problem with dealing with loads of XML data

2010-02-09 Thread claudiu ursica
Tile list with TextInput as a renderer?
C





From: shail shail_l...@yahoo.com
To: flexcoders@yahoogroups.com
Sent: Tue, February 9, 2010 7:54:22 PM
Subject: [flexcoders] Problem with dealing with loads of XML data

   
Hi,
In my application I created a panel full of TextInput controls to make it look 
like a excelsheet. I pushed my TextInputs Ids in Array while creation complete 
event.

I assign data to respective TxtInput by looping though Array. Data is coming as 
XML, so its taking much time and got application slow.

Any other approach, work around could be of some help. how can I make it 
faster??

Thanks,
Shailendra 


 


  

Re: [flexcoders] Can I get 1:1 tuition in London or Paris?

2010-02-08 Thread claudiu ursica
You need something like an official training or what exactly?
C





From: Nick Middleweek n...@middleweek.co.uk
To: flexcoders@yahoogroups.com
Sent: Mon, February 8, 2010 10:32:44 AM
Subject: [flexcoders] Can I get 1:1 tuition in London or Paris?

   
Hi guys,

Does anyone know of a good company or individual(s) where I can get some 
private Flex/ ActionScript tuition?

I've been coding for about 6 months and working on a great project but feel I 
need guidance in advanced areas and methodologies and to get an understanding 
of different and smarter ways of working... I'm sure we've all been there :-)

If anyone can recommend anyone or if you can offer training, please get in 
touch.

I live in London but work 3-4 days a week Paris.


Thanks,
Nick
--
mobile: 0774 035 5424
email: n...@middleweek. co.uk


 


  

Re: [flexcoders] WSDL objects - Flex value objects

2010-02-04 Thread claudiu ursica


As Peeyush Tuli menstioned, you can go with the automatic conversion also. I 
just don't like the bunch of generated classes it is one abstract and one 
implementation for almost everything in there. However there's no room for 
error in there.
It is a matter of choice in the end :).

C



From: Nick Middleweek n...@middleweek.co.uk
To: flexcoders@yahoogroups.com
Sent: Thu, February 4, 2010 9:52:03 AM
Subject: Re: [flexcoders] WSDL objects - Flex value objects

   
This is super, I'll try this out today and seems it could save me some 
leg-work...

Claudiu, I'll check out the translator class as well.


Cheers,
Nick




On 3 February 2010 15:40, Peeyush Tuli peeyus...@gmail. com wrote:














  


 
  
 
Why dont you use this?

http://shardulbartw al.wordpress. com/2008/ 03/20/import- web-servicewsdl- 
wizard-in- flex-30/

its the easiest way to convert a wsdl to AS3 client stubs.



 


  

Re: [flexcoders] how to show a preloader (loading spinner) when loading images in a flex app.

2010-02-04 Thread claudiu ursica
Use an itemrenderer with 2 states one is the loading spinner the other is the 
loaded image.
C





From: ZIONIST stinas...@yahoo.com
To: flexcoders@yahoogroups.com
Sent: Thu, February 4, 2010 10:43:22 AM
Subject: [flexcoders] how to show a preloader (loading spinner) when loading 
images in a flex app.

   
hi guys i really would like to show a loading spinner when images are being 
loaded in a tile list. please i need help.


 


  

Re: [flexcoders] Trying to use an Array inside a VO.

2010-02-04 Thread claudiu ursica
try param2:Array= null
C





From: laurence5905 lmacne...@comcast.net
To: flexcoders@yahoogroups.com
Sent: Thu, February 4, 2010 12:18:47 PM
Subject: [flexcoders] Trying to use an Array inside a VO.

   
I have a Value Object called EventVO.  Inside this object, I want there to be 
an Array, in addition to the various Strings and ints that are in there already 
of course.

My problem comes in the initialization function.  It currently looks something 
like this:
public function EventVO ( param1:String= , param2:int=0) {
this.param1 = param1;
this.param2 = param2;
}

Let's say I want to make param2 an Array instead.  I would think it should look 
something like this:
public function EventVO (param1:String= , param2:Array= []) {
this.param1 = param1;
this.param2 = param2;
}

But that gives me the following error:
1047: Parameter initializer unknown or is not a compile-time constant.

So how the heck do you initialize an Array inside a list of function-parameters 
?  This has been driving me CRAZY!!  I can't find the answer anywhere.

Your help would be greatly appreciated.  Thanks.


 


  

Re: [flexcoders] Re: how to show a preloader (loading spinner) when loading images in a flex app.

2010-02-04 Thread claudiu ursica
Well when the loading is triggered (you probably call a service) you send a 
notification to the component to switch to the loading state. On loading 
COMPLETE it changes to the image.

C





From: ZIONIST stinas...@yahoo.com
To: flexcoders@yahoogroups.com
Sent: Thu, February 4, 2010 1:42:17 PM
Subject: [flexcoders] Re: how to show a preloader (loading spinner) when 
loading images in a flex app.

   
and how do i change between states? as in there must be some kind of event 
triggered.


 


  

Re: [flexcoders] Assigning arrays...

2010-02-04 Thread claudiu ursica
Array.splice method (Array.concat or Array.join) check the docs I don;t know 
them by heart.
C





From: Laurence lmacne...@comcast.net
To: flexcoders@yahoogroups.com
Sent: Thu, February 4, 2010 6:02:46 PM
Subject: [flexcoders] Assigning arrays...

   
I need to copy one array to another -- NOT copy a reference to the array... 

For example:
array1 = array2 will simply copy a reference to array2 into array1.

I want to do something like this:
array1 = new Array(array2) .

Of course, that doesn't work...  It simply creates a blank array that's 
pre-allocated to be the length of whatever array2's length was...  (At least 
that's what I think is going on...)

Anyway -- how do I copy one array to another, without looping through the 
entire array?


 


  

Re: [flexcoders] auto close popups

2010-02-04 Thread claudiu ursica
Put t timer inside the custom pop-up, give it a certain life span and close the 
pop-up on Timer event.
C





From: Glenn Jones tgjone...@gmail.com
To: flexcoders@yahoogroups.com
Sent: Fri, February 5, 2010 12:02:27 AM
Subject: [flexcoders] auto close popups

   
I have a popup that's opened in the usual way with the popup manager.  It's not 
modal.
Sometimes the controls within the popup are enabled so that the user can 
interact with them,
and sometimes the controls are disabled because the contents are read-only.

As soon as the user clicks anywhere else in the application, I'd like to close 
the popup.

Is there an easy way to do that?

Based on what I've read, the popup should have it's own instance of 
FocusManager, and that
FocusManager should receive a deactive() call if the user clicks somewhere 
else. So I thought
about extending the FocusManager with some new class designed to close the 
parent form
on deactivate.  But was hoping there was a better way.

Thanks,
Glenn

 


  

Re: [flexcoders] WSDL objects - Flex value objects

2010-02-03 Thread claudiu ursica
There are 2 version of the utility, I'm sucessfully using one of them. I can 
send it to you though if you need it. The idea is that you want to translate 
object from the response into custom objects. And that does exactly that thing.
C






From: Nick Middleweek n...@middleweek.co.uk
To: flexcoders@yahoogroups.com
Sent: Wed, February 3, 2010 12:46:21 PM
Subject: Re: [flexcoders] WSDL objects - Flex value objects

   
Hey, thanks for the reply... I'm not sure how that helps though?


Thanks




On 2 February 2010 16:56, claudiu ursica the_braniak@ yahoo.com wrote:














  


 
  
 
Google for Object Translator custom class.
C


 


  

Re: [flexcoders] WSDL objects - Flex value objects

2010-02-02 Thread claudiu ursica
Google for Object Translator custom class.
C





From: Nick Middleweek n...@middleweek.co.uk
To: flexcoders@yahoogroups.com
Sent: Tue, February 2, 2010 5:27:34 PM
Subject: [flexcoders] WSDL objects - Flex value objects

   
Hello,

Does anyone know of a way to convert a WSDL document into a bunch of Flex 
Classes?

I'm working on a project where the WDSL data structures are changing and it's a 
real pain to have to re-check what has changed and then re-code the classes and 
Interfaces.. .


Thanks,
Nick


 


  

Re: [flexcoders] Using a VBox container inside a ListItemRenderer

2010-02-01 Thread claudiu ursica
I had the list index issue myself back in the days but under flex 3. I manage 
to fix it by implementing the IDropInListItemRenderer myself in my custom 
renderer. You should be able to do this with the spark component.

HTH,
Claudiu






From: Cory corymcma...@gmail.com
To: flexcoders@yahoogroups.com
Sent: Sun, January 24, 2010 6:26:08 AM
Subject: [flexcoders] Using a VBox container inside a ListItemRenderer

   
Hello, 

I'm trying to use a custom component based on a ListItemRenderer object as an 
item renderer for my List, and I'm getting compiler errors telling me that the 
VBox object I'm using inside my item renderer does not implement IUIComponent. 
This is confusing, since VBox certainly is in the inheritance tree of 
UIComponent which does implement IUIComponent. What am I not understanding? Is 
this a bug?

I originally was using a custom component based off a spark ItemRenderer, and 
inside this component I have a VBox container to organize the other drawable 
components (labels and text fields). Unfortunately, I could not figure out any 
way to query the current ItemRenderer' s index in the List object. 

However, ListItemRenderer implements IDropInListItemRend erer, which gives 
access to the listData property. This property then gives access to the list 
index value. However, if I change my component to be based on a 
ListItemRenderer, I get the previously mentioned compiler errors. This is a 
Flex 4 project using Flash Builder 4 Beta 2. 

Can anyone explain why VBox containers would not be supported inside a 
ListItemRenderer?

Thanks in advance!


 


  

Re: [flexcoders] Web development with Flex

2010-01-31 Thread claudiu ursica
Yes





From: Christophe christophe_jacque...@yahoo.fr
To: flexcoders@yahoogroups.com
Sent: Sun, January 31, 2010 11:46:09 AM
Subject: [flexcoders] Web development with Flex

   
Hello, 

Is it possible to developp Html/php classical websites with Flex animations 
instead of Flash animations, because I don't know Flash, but only Flex ? 

Thank you,
Christophe,


 


  

  1   2   3   >