[flexcoders] Drawing a Grid

2010-01-21 Thread flexaustin
Does anyway happen to know the best way to draw a grid inside of Sprite that 
uses the least amount of mem/processing?  

I have a sprite that can be up to 40,000 pixels wides by 40,000 pixels high and 
I need to draw a grid in the background of the sprite, similar to Visio.

The issue is when I just try drawing the lines in the sprite it takes up a huge 
amount of memory.  I was wondering if maybe I only draw the lines 2x the width 
and height of the screen and then if the user scrolls the swf then redraw the 
lines based on position?

Anyone ever tried this or have any suggestions or examples?




[flexcoders] Re: Text stuck on screen BUG in FP10 or IE7????

2010-01-20 Thread flexaustin
Alex, wanted to update you that the issue is with FP10.  I tried the bitmap 
snapshot of the swf and it did not show the ghosting/artifacts and I test the 
app on several machines and several browsers on those machines and we the 
ghosting was still there.  Ghosting has started to hit other areas of my app 
almost making it unusable, keep in mind it is a pretty mem/processor intensive 
app. 

I uninstalled FP10 and installed FP10.1 beta 2 and the ghosting is gone and the 
app now performs anywhere from 25% to 50% better.

J




--- In flexcoders@yahoogroups.com, Alex Harui  wrote:
>
> The intervals are short implying that the updates are happening fast enough.  
> Where do you see the ghosting?  Can you get a screen shot?
> 
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.<http://www.adobe.com/>
> Blog: http://blogs.adobe.com/aharui
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
> Behalf Of flexaustin
> Sent: Thursday, June 04, 2009 6:35 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Text stuck on screen BUG in FP10 or IE7
> 
> 
> 
> 
> 
> Thanks Alex. Here is what I get. Not sure what this tells me or if I can make 
> refresh quicker?
> 
> 56408
> 56446
> 56487
> 56527
> 56586
> 56625
> 56668
> 56708
> 56748
> 56788
> 56830
> 56869
> 56910
> 56951
> 56991
> 57031
> 57072
> 57114
> 57155
> 57193
> 57252
> 57292
> 57332
> 57374
> 57415
> 57454
> 57494
> 57535
> 57579
> 57620
> 57670
> 57693
> 57752
> 57779
> 57827
> 57863
> 
> Thanks, J
> 
> --- In flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>, Alex 
> Harui  wrote:
> >
> > Doesn't sound familiar. I'm not sure how you're moving the main sprite and 
> > whether the text is within the stage or not. Trace getTImer() on enterFrame 
> > to see how fast the player is refreshing the screen.
> >
> > Alex Harui
> > Flex SDK Developer
> > Adobe Systems Inc.<http://www.adobe.com/>
> > Blog: http://blogs.adobe.com/aharui
> >
> > From: flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com> 
> > [mailto:flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>] On 
> > Behalf Of flexaustin
> > Sent: Wednesday, June 03, 2009 3:48 PM
> > To: flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>
> > Subject: [flexcoders] Text stuck on screen BUG in FP10 or IE7
> >
> >
> >
> >
> >
> > So I have an app that has upto 300 sprites on screen at once and inside 
> > each sprite is a textfield with embedded font (all Arial font).
> >
> > In IE7, when you move the main Sprite around the sprite/textfield text gets 
> > stuck on the screen then eventually disappears. Its like the browser isn't 
> > refreshing fast or something. The amount of time it takes for the 
> > sprite/textfields to all go away varies sometimes 5 seconds sometimes 30 
> > seconds.
> >
> > Wondering if its because of the way FP10 handles text now or ???
> >
> > TIA
> >
>




[flexcoders] Can a canvas be scrollable without the scrollbars?

2010-01-15 Thread flexaustin
Anyone know of a way to set the horizontalScrollPolicy and verticalScrollPolicy 
both to false so that the scrollbars don't show, but still have the canvas 
scroll?

I have content that inside the canvas that will always be larger than the 
canvas so I want to be able to scroll without showing any scrollbars.

This is like the little zoom panel/control in the bottom right-hand corner of 
Google maps.

thx, j



[flexcoders] CPU Freezing up! Any Tips???

2009-11-14 Thread flexaustin
So I have a Flex 4 app that is very processor intensive around 1000 objects 
each with their own embedded swf's coupled with drawing api and can't use 
cacheAsBitmap as things are moving and morphing. 

Anyway, I had a couple of ideas but didn't know if they would help much or make 
things worse. 

#1. Would it make a difference to set StageQuality = LOW when things are moving 
and the set StageQuality = HIGH when things stop moving/transition?

#2. The other idea is that about 500 of the 1000 items on the stage are not 
shown all the time (user has zoomed in; think Google Maps), so would it help 
out to remove the embedded swf's, on the 500 of the visible stage area, and 
then re-embed when they are visible on stage? If so I was thinking adding an 
eventlistener to each of the 1000 items to recognize when off stage or have 
some control that recognizes the zoom or drag and then starts embedding the 
swf's in the 1000 items if they are with in the viewable stage are. But then I 
think wouldn't this make things worse since items would be embedded and 
re-embedded over and over? Or would it make things better as leaving them 
embedded and redrawing them when dragged or transitioned on every frame exit?

Probably lost you.

TIA, Jason



[flexcoders] when is concatenatedMatrix set?

2009-11-02 Thread flexaustin
Can anyone tell me when concatenatedMatrix is set during instantiation? Or 
point me to an article would be great.

Or the entire transform object for that matter?

Thanks, Jason



[flexcoders] Re: bytearray.readObject doesn't convert my objects back

2009-10-30 Thread flexaustin
Alex, first thanks for spending so much time helping me with this.

How do I handle all the rest?  Flex specific classes? Should I monkey patch? 
See error below my custom object needs to have all this serialized and 
dematerialized as well.:

ArgumentError: Error #1063: Argument count mismatch on flash.geom::Transform(). 
Expected 1, got 0.


Jason



--- In flexcoders@yahoogroups.com, Alex Harui  wrote:
>
> Serialization requires that the constructor handle zero parameters.  So just 
> try:
> 
> public function DataList(name:String = null)
> 
> 
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.<http://www.adobe.com/>
> Blog: http://blogs.adobe.com/aharui
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
> Behalf Of flexaustin
> Sent: Friday, October 30, 2009 11:42 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: bytearray.readObject doesn't convert my objects back
> 
> 
> 
> I don't think so. Its just that it isn't just a generic simple Object or 
> Array but rather a large Class file which contains other large class files.
> 
> So imagine saving something like your entire displaylist, but not the visual 
> just the data behind it.
> 
> The object I am saving cotains over 100 over objects and these 100 objects 
> contains a handful of objects.
> 
> Jason
> 
> --- In flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>, 
> "seanmcmonahan"  wrote:
> >
> > Do you think the class being dynamic is causing this issue? I ask because I 
> > have a similar problem with a dynamic class that extends Dictionary. It 
> > works fine in Flash Player 9.0.28 but not in 10.
> >
> > --- In flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>, 
> > Alex Harui  wrote:
> > >
> > > Yeah, I think that's because Proxy is an odd beast. It is dynamic and can 
> > > have "any" property and you're responsible for implementing all those 
> > > methods that help iterate the object.
> > >
> > > Alex Harui
> > > Flex SDK Developer
> > > Adobe Systems Inc.<http://www.adobe.com/>
> > > Blog: http://blogs.adobe.com/aharui
> > >
> > > From: flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com> 
> > > [mailto:flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>] 
> > > On Behalf Of flexaustin
> > > Sent: Friday, October 30, 2009 9:40 AM
> > > To: flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>
> > > Subject: [flexcoders] Re: bytearray.readObject doesn't convert my objects 
> > > back
> > >
> > >
> > >
> > >
> > > Can't even use an JSON encoding
> > >
> > > at com.adobe.serialization.json::JSONEncoder/objectToString()
> > >
> > > jason
> > >
> > > --- In 
> > > flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>,
> > >  "flexaustin"  wrote:
> > > >
> > > > What about using the JSONEncoder and JSONDecoder? Will I have the same 
> > > > issue?
> > > >
> > > > Jason
> > > >
> > > >
> > > >
> > > > --- In 
> > > > flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>,
> > > >  "flexaustin"  wrote:
> > > > >
> > > > > Just realized need return type.
> > > > >
> > > > >
> > > > > --- In 
> > > > > flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>,
> > > > >  "flexaustin"  wrote:
> > > > > >
> > > > > > Getting error
> > > > > > 1144: Interface method readExternal in namespace 
> > > > > > flash.utils:IExternalizable is implemented with an incompatible 
> > > > > > signature
> > > > > >
> > > > > >
> > > > > > public class Data extends EventDispatcher implements IExternalizable
> > > > > >
> > > > > > public function writeExternal(output:IDataOutput) {
> > > > > > output.writeObject(_nodes);
> > > > > > output.writeObject(_edges);
> > > > > > output.writeObject(_span);
> > > > > > output.writeObject(_groups);
> > > > > > output.writeObject(_root);
> > > > > > output.writeObject(_tree);
> > > > > > }
> > > > > > public function readExternal(input:IDataInput) {
> > > > > > _nodes = input.readObject();
> > > > > > _edges = input.readObject();
> > > > > > _span = input.readObject();
> > > > > > _groups = input.readObject();
> > > > > > _root = input.readObject();
> > > > > > _tree = input.readObject();
> > > > > > }
> > > > > >
> > > > >
> > > >
> > >
> >
>




[flexcoders] Re: bytearray.readObject doesn't convert my objects back

2009-10-30 Thread flexaustin
I don't think so. Its just that it isn't just a generic simple Object or Array 
but rather a large Class file which contains other large class files.

So imagine saving something like your entire displaylist, but not the visual 
just the data behind it.

The object I am saving cotains over 100 over objects and these 100 objects 
contains a handful of objects.

Jason




--- In flexcoders@yahoogroups.com, "seanmcmonahan"  wrote:
>
> Do you think the class being dynamic is causing this issue?  I ask because I 
> have a similar problem with a dynamic class that extends Dictionary.  It 
> works fine in Flash Player 9.0.28 but not in 10.
> 
> --- In flexcoders@yahoogroups.com, Alex Harui  wrote:
> >
> > Yeah, I think that's because Proxy is an odd beast.  It is dynamic and can 
> > have "any" property and you're responsible for implementing all those 
> > methods that help iterate the object.
> > 
> > Alex Harui
> > Flex SDK Developer
> > Adobe Systems Inc.<http://www.adobe.com/>
> > Blog: http://blogs.adobe.com/aharui
> > 
> > From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
> > Behalf Of flexaustin
> > Sent: Friday, October 30, 2009 9:40 AM
> > To: flexcoders@yahoogroups.com
> > Subject: [flexcoders] Re: bytearray.readObject doesn't convert my objects 
> > back
> > 
> > 
> > 
> > 
> > Can't even use an JSON encoding
> > 
> > at com.adobe.serialization.json::JSONEncoder/objectToString()
> > 
> > jason
> > 
> > --- In flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>, 
> > "flexaustin"  wrote:
> > >
> > > What about using the JSONEncoder and JSONDecoder? Will I have the same 
> > > issue?
> > >
> > > Jason
> > >
> > >
> > >
> > > --- In flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>, 
> > > "flexaustin"  wrote:
> > > >
> > > > Just realized need return type.
> > > >
> > > >
> > > > --- In flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>, 
> > > > "flexaustin"  wrote:
> > > > >
> > > > > Getting error
> > > > > 1144: Interface method readExternal in namespace 
> > > > > flash.utils:IExternalizable is implemented with an incompatible 
> > > > > signature
> > > > >
> > > > >
> > > > > public class Data extends EventDispatcher implements IExternalizable
> > > > >
> > > > > public function writeExternal(output:IDataOutput) {
> > > > > output.writeObject(_nodes);
> > > > > output.writeObject(_edges);
> > > > > output.writeObject(_span);
> > > > > output.writeObject(_groups);
> > > > > output.writeObject(_root);
> > > > > output.writeObject(_tree);
> > > > > }
> > > > > public function readExternal(input:IDataInput) {
> > > > > _nodes = input.readObject();
> > > > > _edges = input.readObject();
> > > > > _span = input.readObject();
> > > > > _groups = input.readObject();
> > > > > _root = input.readObject();
> > > > > _tree = input.readObject();
> > > > > }
> > > > >
> > > >
> > >
> >
>




[flexcoders] Re: bytearray.readObject doesn't convert my objects back

2009-10-30 Thread flexaustin
Alex, what else can I try?  I have tried implementing IExternalizable in every 
class and it doesn't seem to work, I think I might be close as one class is 
causing me issue "Datalist". When I implement IExternalizable and flex starts 
decoding the bytearray it throws an error on "Datalist" constructor. It 
expecting one arguement in the constructor Datalist(name:String) and I guess 
Flex isn't passing it the arguement.

Jason



--- In flexcoders@yahoogroups.com, Alex Harui  wrote:
>
> Yeah, I think that's because Proxy is an odd beast.  It is dynamic and can 
> have "any" property and you're responsible for implementing all those methods 
> that help iterate the object.
> 
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.<http://www.adobe.com/>
> Blog: http://blogs.adobe.com/aharui
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
> Behalf Of flexaustin
> Sent: Friday, October 30, 2009 9:40 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: bytearray.readObject doesn't convert my objects back
> 
> 
> 
> 
> Can't even use an JSON encoding
> 
> at com.adobe.serialization.json::JSONEncoder/objectToString()
> 
> jason
> 
> --- In flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>, 
> "flexaustin"  wrote:
> >
> > What about using the JSONEncoder and JSONDecoder? Will I have the same 
> > issue?
> >
> > Jason
> >
> >
> >
> > --- In flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>, 
> > "flexaustin"  wrote:
> > >
> > > Just realized need return type.
> > >
> > >
> > > --- In flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>, 
> > > "flexaustin"  wrote:
> > > >
> > > > Getting error
> > > > 1144: Interface method readExternal in namespace 
> > > > flash.utils:IExternalizable is implemented with an incompatible 
> > > > signature
> > > >
> > > >
> > > > public class Data extends EventDispatcher implements IExternalizable
> > > >
> > > > public function writeExternal(output:IDataOutput) {
> > > > output.writeObject(_nodes);
> > > > output.writeObject(_edges);
> > > > output.writeObject(_span);
> > > > output.writeObject(_groups);
> > > > output.writeObject(_root);
> > > > output.writeObject(_tree);
> > > > }
> > > > public function readExternal(input:IDataInput) {
> > > > _nodes = input.readObject();
> > > > _edges = input.readObject();
> > > > _span = input.readObject();
> > > > _groups = input.readObject();
> > > > _root = input.readObject();
> > > > _tree = input.readObject();
> > > > }
> > > >
> > >
> >
>




[flexcoders] Re: bytearray.readObject doesn't convert my objects back

2009-10-30 Thread flexaustin


Can't even use an JSON encoding

at com.adobe.serialization.json::JSONEncoder/objectToString()

jason

--- In flexcoders@yahoogroups.com, "flexaustin"  wrote:
>
> What about using the JSONEncoder and JSONDecoder? Will I have the same issue?
> 
> Jason
> 
> 
> 
> --- In flexcoders@yahoogroups.com, "flexaustin"  wrote:
> >
> > Just realized need return type.
> > 
> > 
> > --- In flexcoders@yahoogroups.com, "flexaustin"  wrote:
> > >
> > > Getting error 
> > > 1144: Interface method readExternal in namespace 
> > > flash.utils:IExternalizable is implemented with an incompatible signature
> > > 
> > > 
> > > public class Data extends EventDispatcher implements IExternalizable
> > > 
> > >   public function writeExternal(output:IDataOutput) {
> > >   output.writeObject(_nodes);
> > >   output.writeObject(_edges);
> > >   output.writeObject(_span);
> > >   output.writeObject(_groups);
> > >   output.writeObject(_root);
> > >   output.writeObject(_tree);
> > >   }
> > >   public function readExternal(input:IDataInput) {
> > >   _nodes = input.readObject();
> > >   _edges = input.readObject();
> > >   _span = input.readObject();
> > >   _groups = input.readObject();
> > >   _root = input.readObject();
> > >   _tree = input.readObject();
> > >   }
> > >
> >
>




[flexcoders] Re: bytearray.readObject doesn't convert my objects back

2009-10-30 Thread flexaustin
What about using the JSONEncoder and JSONDecoder? Will I have the same issue?

Jason



--- In flexcoders@yahoogroups.com, "flexaustin"  wrote:
>
> Just realized need return type.
> 
> 
> --- In flexcoders@yahoogroups.com, "flexaustin"  wrote:
> >
> > Getting error 
> > 1144: Interface method readExternal in namespace 
> > flash.utils:IExternalizable is implemented with an incompatible signature
> > 
> > 
> > public class Data extends EventDispatcher implements IExternalizable
> > 
> > public function writeExternal(output:IDataOutput) {
> > output.writeObject(_nodes);
> > output.writeObject(_edges);
> > output.writeObject(_span);
> > output.writeObject(_groups);
> > output.writeObject(_root);
> > output.writeObject(_tree);
> > }
> > public function readExternal(input:IDataInput) {
> > _nodes = input.readObject();
> > _edges = input.readObject();
> > _span = input.readObject();
> > _groups = input.readObject();
> > _root = input.readObject();
> > _tree = input.readObject();
> > }
> >
>




[flexcoders] Re: bytearray.readObject doesn't convert my objects back

2009-10-30 Thread flexaustin
Just realized need return type.


--- In flexcoders@yahoogroups.com, "flexaustin"  wrote:
>
> Getting error 
> 1144: Interface method readExternal in namespace flash.utils:IExternalizable 
> is implemented with an incompatible signature
> 
> 
> public class Data extends EventDispatcher implements IExternalizable
> 
>   public function writeExternal(output:IDataOutput) {
>   output.writeObject(_nodes);
>   output.writeObject(_edges);
>   output.writeObject(_span);
>   output.writeObject(_groups);
>   output.writeObject(_root);
>   output.writeObject(_tree);
>   }
>   public function readExternal(input:IDataInput) {
>   _nodes = input.readObject();
>   _edges = input.readObject();
>   _span = input.readObject();
>   _groups = input.readObject();
>   _root = input.readObject();
>   _tree = input.readObject();
>   }
>




[flexcoders] Re: bytearray.readObject doesn't convert my objects back

2009-10-30 Thread flexaustin
Getting error 
1144: Interface method readExternal in namespace flash.utils:IExternalizable is 
implemented with an incompatible signature


public class Data extends EventDispatcher implements IExternalizable

public function writeExternal(output:IDataOutput) {
output.writeObject(_nodes);
output.writeObject(_edges);
output.writeObject(_span);
output.writeObject(_groups);
output.writeObject(_root);
output.writeObject(_tree);
}
public function readExternal(input:IDataInput) {
_nodes = input.readObject();
_edges = input.readObject();
_span = input.readObject();
_groups = input.readObject();
_root = input.readObject();
_tree = input.readObject();
}




[flexcoders] Re: bytearray.readObject doesn't convert my objects back

2009-10-29 Thread flexaustin
This is what I have assuming I use the lib directory structure and not my app 
structure?

[RemoteClass(alias="flare.vis.data.DataList")]
public class DataList extends Proxy implements IEventDispatcher


The actual directory structure is(notice src):
[RemoteClass(alias="src.flare.vis.data.DataList")]
public class DataList extends Proxy implements IEventDispatcher

This didn't work.  I tried going in and creating getters and setters for all 
protected and private properties which got some of the data back, but not all 
of it.

Jason


--- In flexcoders@yahoogroups.com, Alex Harui  wrote:
>
> All sub-objects that are going to get serialized also need to have registered 
> aliases.
> 
> Do a simple test with simpler data objects to see if it works for you.
> 
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.<http://www.adobe.com/>
> Blog: http://blogs.adobe.com/aharui
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
> Behalf Of flexaustin
> Sent: Thursday, October 29, 2009 9:21 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: bytearray.readObject doesn't convert my objects back
> 
> 
> 
> I can't seem to get this to work saving to a SQLite3 database. The code works 
> writing (Data object contains 101 objects), but when reading the bytearray 
> the Data object ends up with 0 objects inside it. Its like it just returns a 
> new Data object. FYI, the Data object I am converting to a bytearray is 
> holder for other objects.
> 
> Writing code:
> public function shouldPrepareDatasetAsByteArrayAndSaveToDB( data:Data ) : 
> String
> {
> registerClassAlias("flare.vis.data.Data", Data);
> var d:Data = data;
> var byteArray:ByteArray = new ByteArray();
> byteArray.writeObject(d);
> byteArray.position = 0;
> 
> var base64Enc:Base64Encoder = new Base64Encoder();
> var str:String = '';
> base64Enc.encodeBytes( byteArray );
> str = base64Enc.toString();
> 
> return str;
> }
> 
> Reading code:
> private function shouldPrepareDatasUnWindByteArray( str:* ) : Data
> {
> var base64Dec:Base64Decoder = new Base64Decoder();
> base64Dec.decode( str );
> var byteArray:ByteArray = base64Dec.toByteArray();
> byteArray.position = 0;
> registerClassAlias("flare.vis.data.Data", Data);
> var data:Data = byteArray.readObject();
> return data;
> }
> 
> --- In flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>, Alex 
> Harui  wrote:
> >
> > Did you call registerClassAlias or use [RemoteClass] metadata?
> >
> > Alex Harui
> > Flex SDK Developer
> > Adobe Systems Inc.<http://www.adobe.com/>
> > Blog: http://blogs.adobe.com/aharui
> >
> > From: flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com> 
> > [mailto:flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>] On 
> > Behalf Of flexaustin
> > Sent: Wednesday, October 28, 2009 3:40 PM
> > To: flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>
> > Subject: [flexcoders] bytearray.readObject doesn't convert my objects back
> >
> >
> >
> > So I am using
> >
> > var myArray:Array = [someObjectOfTypeObject, someOtherObjectOfTypeObject ];
> >
> > bytearray.writeObject(myArray);
> >
> > var blah:Array = bytearray.readObject();
> >
> > Blah comes back with two Objects but not someObjectOfTypeObject they come 
> > back with generic "Objects" and no data inside?
> >
> > Anyone have a clue on this? someObjectOfTypeObject and 
> > someOtherObjectOfTypeObject are of a special type of Class in my app so
> > someOtherObjectOfTypeObject:FooClass.
> >
> > Why doesn't it put them back as the correct type?
> >
>




[flexcoders] Re: bytearray.readObject doesn't convert my objects back

2009-10-29 Thread flexaustin
I can't seem to get this to work saving to a SQLite3 database. The code works 
writing (Data object contains 101 objects), but when reading the bytearray the 
Data object ends up with 0 objects inside it. Its like it just returns a new 
Data object. FYI, the Data object I am converting to a bytearray is holder for 
other objects. 

Writing code:
public function shouldPrepareDatasetAsByteArrayAndSaveToDB( data:Data ) : String
{ 
registerClassAlias("flare.vis.data.Data", Data);
var d:Data = data;
var byteArray:ByteArray = new ByteArray();
byteArray.writeObject(d);
byteArray.position = 0;

var base64Enc:Base64Encoder = new Base64Encoder();
var str:String = '';
base64Enc.encodeBytes( byteArray );
str = base64Enc.toString();

return str;
}


Reading code:
private function shouldPrepareDatasUnWindByteArray( str:* ) : Data
{
var base64Dec:Base64Decoder = new Base64Decoder();
base64Dec.decode( str );
var byteArray:ByteArray = base64Dec.toByteArray();
byteArray.position = 0;
registerClassAlias("flare.vis.data.Data", Data);
var data:Data = byteArray.readObject(); 
return data;
}




--- In flexcoders@yahoogroups.com, Alex Harui  wrote:
>
> Did you call registerClassAlias or use [RemoteClass] metadata?
> 
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.<http://www.adobe.com/>
> Blog: http://blogs.adobe.com/aharui
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
> Behalf Of flexaustin
> Sent: Wednesday, October 28, 2009 3:40 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] bytearray.readObject doesn't convert my objects back
> 
> 
> 
> So I am using
> 
> var myArray:Array = [someObjectOfTypeObject, someOtherObjectOfTypeObject ];
> 
> bytearray.writeObject(myArray);
> 
> var blah:Array = bytearray.readObject();
> 
> Blah comes back with two Objects but not someObjectOfTypeObject they come 
> back with generic "Objects" and no data inside?
> 
> Anyone have a clue on this? someObjectOfTypeObject and 
> someOtherObjectOfTypeObject are of a special type of Class in my app so
> someOtherObjectOfTypeObject:FooClass.
> 
> Why doesn't it put them back as the correct type?
>




[flexcoders] Re: bytearray.readObject doesn't convert my objects back

2009-10-29 Thread flexaustin
Not sure how that works and would I need it if I am not saving the file to a 
SharedObject?  I am trying to save a CustomData class to a sqlite database. So 
I am trying to convert to a bytearray and then string.

So that if the user opens the app say a week later they can pull the object 
from the db and the app will work.

Jason

--- In flexcoders@yahoogroups.com, Alex Harui  wrote:
>
> Did you call registerClassAlias or use [RemoteClass] metadata?
> 
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.<http://www.adobe.com/>
> Blog: http://blogs.adobe.com/aharui
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
> Behalf Of flexaustin
> Sent: Wednesday, October 28, 2009 3:40 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] bytearray.readObject doesn't convert my objects back
> 
> 
> 
> So I am using
> 
> var myArray:Array = [someObjectOfTypeObject, someOtherObjectOfTypeObject ];
> 
> bytearray.writeObject(myArray);
> 
> var blah:Array = bytearray.readObject();
> 
> Blah comes back with two Objects but not someObjectOfTypeObject they come 
> back with generic "Objects" and no data inside?
> 
> Anyone have a clue on this? someObjectOfTypeObject and 
> someOtherObjectOfTypeObject are of a special type of Class in my app so
> someOtherObjectOfTypeObject:FooClass.
> 
> Why doesn't it put them back as the correct type?
>




[flexcoders] bytearray.readObject doesn't convert my objects back

2009-10-28 Thread flexaustin
So I am using 

var myArray:Array = [someObjectOfTypeObject, someOtherObjectOfTypeObject ];

bytearray.writeObject(myArray);

var blah:Array = bytearray.readObject();

Blah comes back with two Objects but not someObjectOfTypeObject they come back 
with generic "Objects" and no data inside?

Anyone have a clue on this? someObjectOfTypeObject and 
someOtherObjectOfTypeObject are of a special type of Class in my app so
someOtherObjectOfTypeObject:FooClass.

Why doesn't it put them back as the correct type?



[flexcoders] Save an Array to a database or an Object SQLite

2009-10-28 Thread flexaustin
What would be the process to save an array to a database? Can it be converted 
to a bytearray or do I have use a blob?

J



[flexcoders] How to save a bytearray to a database

2009-10-27 Thread flexaustin
So I am trying to save a bytearray to a database.  I tried bytearray.toString, 
which works as expected.  

But on retrieving the string (bytearray) from the database how would I convert 
it back to a bytearray?

Thx, J



[flexcoders] Re: Flex and Rails

2009-10-27 Thread flexaustin
Fixed  

should be 


this.service.headers ={X_HTTP_METHOD_OVERRIDE:'PUT'}


NOT


  this.service.headers ="{{X_HTTP_METHOD_OVERRIDE:'PUT'}}"






--- In flexcoders@yahoogroups.com, "flexaustin"  wrote:
>
> Anyone know why this won't work when I call my Update CRUD method?
> I have tried it without 
>   this.service.headers 
> ="{{X_HTTP_METHOD_OVERRIDE:'PUT'}}" and using /savedthing/+ id + 
> '?_method=PUT' for the urlString, but still now luck.
> 
> public function shouldUpdateMapToRails( id:String, name:String, 
> customdata:String, origdata:String ) : void
>   {
>   // constructor will store a reference to the service 
> we're going to call
>   this.service = new HTTPService();
>   this.service.method = 'POST';
>   this.service.contentType = 
> "application/x-www-form-urlencoded";
>   this.service.headers ="{{X_HTTP_METHOD_OVERRIDE:'PUT'}}"
>   this.service.resultFormat ="e4x";
>   /* PRODUCTION VERSION 
> =*/
>   var  urlString:String = "/savedthing/" + id;
>   _params = { 'saved_thing[myname]': name, 
> 'saved_thing[customdata]': customdata, 'saved_thing[originaldata]': origdata 
> };
>   this.service.url=urlString;
>   }
>




[flexcoders] Flex and Rails

2009-10-27 Thread flexaustin
Anyone know why this won't work when I call my Update CRUD method?
I have tried it without 
this.service.headers 
="{{X_HTTP_METHOD_OVERRIDE:'PUT'}}" and using /savedthing/+ id + '?_method=PUT' 
for the urlString, but still now luck.

public function shouldUpdateMapToRails( id:String, name:String, 
customdata:String, origdata:String ) : void
{
// constructor will store a reference to the service 
we're going to call
this.service = new HTTPService();
this.service.method = 'POST';
this.service.contentType = 
"application/x-www-form-urlencoded";
this.service.headers ="{{X_HTTP_METHOD_OVERRIDE:'PUT'}}"
this.service.resultFormat ="e4x";
/* PRODUCTION VERSION 
=*/
var  urlString:String = "/savedthing/" + id;
_params = { 'saved_thing[myname]': name, 
'saved_thing[customdata]': customdata, 'saved_thing[originaldata]': origdata };
this.service.url=urlString;
}



[flexcoders] Re: Flex Datagrid bottom row cutoff

2009-10-26 Thread flexaustin
thx again Alex!

--- In flexcoders@yahoogroups.com, Alex Harui  wrote:
>
> Fix the height to rowCount * rowHeight + viewMetrics.top + viewMetrics.bottom
> 
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.<http://www.adobe.com/>
> Blog: http://blogs.adobe.com/aharui
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
> Behalf Of flexaustin
> Sent: Thursday, October 22, 2009 8:38 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Flex Datagrid bottom row cutoff
> 
> 
> 
> My datagrids bottom row is getting cutoff, how do I stop this?
> 
> J
>




[flexcoders] undo a matrix transformation

2009-10-26 Thread flexaustin
So in my app I am using the senocular transformtool so that a user can rotate, 
scale, skew a sprite object by applying a matrix transformation to it.

I need to allow the user to undo this. How would I go about undoing this? I 
tried to just invert() the altered matrix that gets applied to the sprite 
object, but when I do that sprite ends up off screen in some other location and 
the none of he rotation or scaled stuff is undone.

I also tried to invert() and the concate the inverted matrix with the the 
current matrix of the sprite, but that didn't work either?

Any suggestions?

J



[flexcoders] Flex Datagrid bottom row cutoff

2009-10-22 Thread flexaustin
My datagrids bottom row is getting cutoff, how do I stop this?

J



[flexcoders] Scaling issues.

2009-10-20 Thread flexaustin
I am using a library that has a built in scaling so you create an object from 
the library and when you scale everything in the object will scale. Think 
Google maps.  

So the issue I am having is that I am using a TransformTool Senocular's that 
is. So when a transform tool is in side the framework object it gets scaled as 
well ending up with a giant transformtool.  How can I keep the Transformtool 
from scaling?  Or counter it.

Something like

transformtool.scaleX = 1 - frameworkObject.scaleX;
transformtool.scaleY = 1 - frameworkObject.scaleY;

Thanks, J



[flexcoders] Re: Question for Math guys/girls

2009-10-19 Thread flexaustin
Good points.  I guess it would need to be percentage based as I didn't think 
about them shrinking the line past the point, duh. 

Yes the length and angle of the line can change at any time. Also I am not 
placing a marker in the same mc or sprite, but rather a popup on the mainstage 
needs to hover over that point on the line.

J

--- In flexcoders@yahoogroups.com, Charles Parcell  wrote:
>
> Does the angle of the line ever change? Or is it always 45 or 0? If the
> angle changes then the X coordinate will change for any points on the line.
> 
> I hope that you are not scaling a MC to grow/shrink the line.  Rather you
> should be drawing the line with every mouse move event (or whatever method
> you are using to allow user interaction).
> 
> Charles P.
> 
> 
> On Mon, Oct 19, 2009 at 6:23 PM, Netaman  wrote:
> 
> > What if the user should make the line shorter then 100 pixels does the
> > marker go away, I don't think it's math more like an array collection of
> > markers. You save the x,y coordinates of the marker, as the line gets bigger
> > or smaller you replace the markers that fit on the line from the array's x,y
> > coordinates... Add an click event listener to your container with the line,
> > then create a function to add the x,y coordinates to an array. Without a
> > code example I can only guess what you are trying to accomplish. You can
> > create a timer to refresh your container with the markers from the array, or
> > generate another event when the line changes length, or you add another
> > marker.
> >
> > Do you have any code to share?
> >
> > Randy
> >
> > --- In flexcoders@yahoogroups.com, "flexaustin"  wrote:
> > >
> > > I have a line which can be horizontal or diagnol, and the user can make
> > it longer or short by dragging an end.
> > >
> > > If the user should click anywhere on the line I need to keep track of
> > this and place a marker or callout over this clicked spot on the line at all
> > times.  So if the user clicks say 1/4, say 100 pixels from the bottom of the
> > line) the way down from the top left of a diagonal line I need to put a
> > marker there. Then if the user drags the line to make it twice as long I
> > still need that marker to be in the same spot.
> > >
> > > How would I do this math wise?  And no I don't want it to be a percentage
> > of the length of the line. Meaning I always want the spot to be 100 pixels
> > from bottom of the line.
> > >
> > > TIA, J
> > >
> >
> >
> >
> >
> > 
> >
> > --
> > Flexcoders Mailing List
> > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > Alternative FAQ location:
> > https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
> > Search Archives:
> > http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
> > Links
> >
> >
> >
> >
>




[flexcoders] Question for Math guys/girls

2009-10-19 Thread flexaustin
I have a line which can be horizontal or diagnol, and the user can make it 
longer or short by dragging an end.

If the user should click anywhere on the line I need to keep track of this and 
place a marker or callout over this clicked spot on the line at all times.  So 
if the user clicks say 1/4, say 100 pixels from the bottom of the line) the way 
down from the top left of a diagonal line I need to put a marker there. Then if 
the user drags the line to make it twice as long I still need that marker to be 
in the same spot. 

How would I do this math wise?  And no I don't want it to be a percentage of 
the length of the line. Meaning I always want the spot to be 100 pixels from 
bottom of the line.

TIA, J 



[flexcoders] Re: follow the mouse

2009-10-13 Thread flexaustin
Ok so now the problem is the tempNode is lagging. So when you move the mouse 
the sprite lags behind anywhere from 10 to 50 pixels behind.

I tried switching it from a EnterFrame event to a MouseMove event and using 
updateAfter but it still lags the same amount.

Anyone have any suggestions?



--- In flexcoders@yahoogroups.com, "flexaustin"  wrote:
>
> TempNode isn't on the main the stage its down in about 6 containers.  I 
> thought it was the same but the first way the mouse only traveled 50% of the 
> distance to the mouse.
> 
> 
> 
> --- In flexcoders@yahoogroups.com, Paul Andrews  wrote:
> >
> > flexaustin wrote:
> > > Got it.
> > >
> > > var pt:Point = tempNode.localToGlobal( new Point ( 0, 0 ) );
> > >   var vx:Number = (tempNode.stage.mouseX) - pt.x;
> > >   var vy:Number = (tempNode.stage.mouseY) - pt.y;
> > >   tempNode.x += vx;
> > >   tempNode.y += vy;
> > >
> > >
> > > Always put everything on the same playing field, the stage.
> > >   
> > Isn't that just the same as
> > 
> > tempNode.x = tempNode.stage.mouseX;
> > tempNode.y = tempNode.stage.mouseY;
> > 
> > ?
> > 
> > Paul 
> > 
> > 
> > >
> > >
> > > --- In flexcoders@yahoogroups.com, "flexaustin"  wrote:
> > >   
> > >> Is there a reason this wouldn't work?  I am using the scale as the main 
> > >> canvas can be scaled down.
> > >>
> > >> var vx:Number = (tempNode.stage.mouseX / mainsprite.scaleX )- tempNode.x;
> > >>  var vy:Number = (tempNode.stage.mouseY / 
> > >> mainsprite.scaleX) - tempNode.y;
> > >>  tempNode.x += vx;
> > >>  tempNode.y += vy;
> > >>
> > >> 
> > >
> > >
> > >
> > >
> > > 
> > >
> > > --
> > > Flexcoders Mailing List
> > > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > > Alternative FAQ location: 
> > > https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
> > > Search Archives: 
> > > http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups 
> > > Links
> > >
> > >
> > >
> > >
> > >
> >
>




[flexcoders] Re: follow the mouse

2009-10-13 Thread flexaustin
TempNode isn't on the main the stage its down in about 6 containers.  I thought 
it was the same but the first way the mouse only traveled 50% of the distance 
to the mouse.



--- In flexcoders@yahoogroups.com, Paul Andrews  wrote:
>
> flexaustin wrote:
> > Got it.
> >
> > var pt:Point = tempNode.localToGlobal( new Point ( 0, 0 ) );
> > var vx:Number = (tempNode.stage.mouseX) - pt.x;
> > var vy:Number = (tempNode.stage.mouseY) - pt.y;
> > tempNode.x += vx;
> > tempNode.y += vy;
> >
> >
> > Always put everything on the same playing field, the stage.
> >   
> Isn't that just the same as
> 
> tempNode.x = tempNode.stage.mouseX;
> tempNode.y = tempNode.stage.mouseY;
> 
> ?
> 
> Paul 
> 
> 
> >
> >
> > --- In flexcoders@yahoogroups.com, "flexaustin"  wrote:
> >   
> >> Is there a reason this wouldn't work?  I am using the scale as the main 
> >> canvas can be scaled down.
> >>
> >> var vx:Number = (tempNode.stage.mouseX / mainsprite.scaleX )- tempNode.x;
> >>var vy:Number = (tempNode.stage.mouseY / 
> >> mainsprite.scaleX) - tempNode.y;
> >>tempNode.x += vx;
> >>tempNode.y += vy;
> >>
> >> 
> >
> >
> >
> >
> > 
> >
> > --
> > Flexcoders Mailing List
> > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > Alternative FAQ location: 
> > https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
> > Search Archives: 
> > http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
> >
> >
> >
> >
> >
>




[flexcoders] Re: follow the mouse

2009-10-13 Thread flexaustin
Got it.

var pt:Point = tempNode.localToGlobal( new Point ( 0, 0 ) );
var vx:Number = (tempNode.stage.mouseX) - pt.x;
var vy:Number = (tempNode.stage.mouseY) - pt.y;
tempNode.x += vx;
tempNode.y += vy;


Always put everything on the same playing field, the stage.



--- In flexcoders@yahoogroups.com, "flexaustin"  wrote:
>
> Is there a reason this wouldn't work?  I am using the scale as the main 
> canvas can be scaled down.
> 
> var vx:Number = (tempNode.stage.mouseX / mainsprite.scaleX )- tempNode.x;
>   var vy:Number = (tempNode.stage.mouseY / 
> mainsprite.scaleX) - tempNode.y;
>   tempNode.x += vx;
>   tempNode.y += vy;
>




[flexcoders] follow the mouse

2009-10-12 Thread flexaustin
Is there a reason this wouldn't work?  I am using the scale as the main canvas 
can be scaled down.

var vx:Number = (tempNode.stage.mouseX / mainsprite.scaleX )- tempNode.x;
var vy:Number = (tempNode.stage.mouseY / 
mainsprite.scaleX) - tempNode.y;
tempNode.x += vx;
tempNode.y += vy;



[flexcoders] objectsUnderPoint

2009-10-12 Thread flexaustin
Would anyone know why objectsUnderPoint doesn't capture all objects under point?

I know it will miss some if things areInaccessibleblah() = true. 
But when I try it, the bool comes back false?






[flexcoders] Re: Drawing a line that follows the mouse.

2009-10-12 Thread flexaustin
Ok, so I think the issue is that the Sprite I am drawing in "canvas" is inside 
its parent (vis.marks), which has another 100 sprites.  Each of the 100 sprites 
has a function in library I am using that says on mouseover bring the sprite to 
the top of the display list. I think this is overtaking my mouse position thus 
the mouse events get lost or hijacked or something.

So I tried taking canvas out of vis.marks layer and making it a child of vis 
where marks is located but one level up, so on top of marks.

This still didn't fix the issue.  The only to way to fix it is to put all this 
on the main stage (aka Application.application). I would prefer not to put this 
on the stage unless I have to. Does any one else have any suggestions?

TIA, j



--- In flexcoders@yahoogroups.com, "flexaustin"  wrote:
>
> Wondering if anyone sees an issue with this code/approach?  I am trying to 
> draw a line with the mouse and have the line follow the mouse, rather than a 
> pen tool. This code sort of works, but if you move the mouse to fast or once 
> in a while the line seems to get lost or detached.
> 
> private function drawFakeLine(  ) : void
>   {
>   
>   var canvas:Sprite = new Sprite(); 
>   vis.marks.addChildAt( canvas, 0 ); 
>   
>   vis.addEventListener(MouseEvent.MOUSE_MOVE, draw_line);
>   vis.addEventListener(MouseEvent.MOUSE_UP, 
> stop_drawing); 
>   
>   var startX:Number = vis.mouseX;
>   var startY:Number = vis.mouseY;
>   
>   canvas.graphics.moveTo(vis.mouseX, vis.mouseY);
>   
>   function stop_drawing(e:MouseEvent):void { 
> vis.removeEventListener(MouseEvent.MOUSE_MOVE, draw_line) }; 
>   function draw_line(e:MouseEvent):void 
>   { 
>   canvas.graphics.clear();
>   canvas.graphics.moveTo( startX, startY );
>   canvas.graphics.lineStyle(1, 0xFF6633); 
>   canvas.graphics.lineTo(vis.mouseX, vis.mouseY); 
> 
>   e.updateAfterEvent(); 
>   }
>   }
>




[flexcoders] Re: 2 strange issues for begginer in action script ref

2009-10-11 Thread flexaustin
You need to import the Button so

import mx.controls.Button

But I think your main issue is that you can't create a Sprite component and put 
mx components inside of it.  You need to use UIComponent as your base instead 
of Sprite. I believe you can go lower down the inheritance chain to FlexSprite 
(don't quote me on the name I don't have my Flex posters in front of me). But 
even if you use FlexSprite you have to implement a lot of Classes and write a 
lot of functions (override possibly) to make FlexSprite work so its just best 
to go with UIComponent.

J

--- In flexcoders@yahoogroups.com, "dennis"  wrote:
>
> Hello. I am new to action script and I am (pretty) confused. so any help is
> valuable!!!
> 
>  
> 
> --- issue 1
> 
> -
> 
> I have the follow code. and I get blank page. nothing is appeared on the
> stage at all!!! For god's sake, what is wrong?
> 
>  
> 
> package
> 
> {
> 
>   import flash.display.Sprite;
> 
>   import mx.core.ButtonAsset;
> 
>   public class ASProject2 extends Sprite
> 
>   {
> 
> public function ASProject2()
> 
> {
> 
>   var mb: ButtonAsset = new ButtonAsset();
> 
> mb.x=100; mb.y=100; mb.width=200;
> 
> addChild(mb);
> 
> }
> 
>   }
> 
> }
> 
>  
> 
> --- issue 2
> 
> -
> 
> Which button is the more simple button to use?
> 
> I found the spark components button is the component that Flash Builder uses
> if you write in mxml language. So I add the folder to my project's libraries
> paths, in precise I added as SWC folder the follow folder:
> 
> c:\Program Files\Adobe\Flash Builder
> Beta\sdks\4.0.0\frameworks\projects\flex4\src\spark\components\
> 
>  
> 
> Here is the (very simple) code (with compiler's errors):
> 
>  
> 
> package
> 
> {
> 
>   import flash.display.Sprite;
> 
>   import spark.components.Button;  // <- compile time error: 1172:
> Definition spark.components:Button could not be found.
> 
>   public class ASProjectInFB4 extends Sprite
> 
>   {
> 
> public function ASProjectInFB4()
> 
> {
> 
>   var ab : Button = new Button();  // <- compile time error: 1046: Type
> was not found or was not a compile-time constant: Button.
> 
> ab.x=10;
> 
> ab.y=10;
> 
> ab.width=200;
> 
> ab.height=100;
> 
> ab.enabled=true;
> 
>   addChild(ab);
> 
> }
> 
>   }
> 
> }
> 
>  
> 
> The problem (as you see) are the two compiler errors. Now. if get the cursor
> on "Button" text in my code and I press the F3 the Flash Builder transfers
> me to the declaration of Button class in the proper Button.as file! So I
> suppose that my definition in my preceding code is correct. If I remove the
> the SWC folder from the libraries of my project, the F3 buttons doesn't
> transfer me anywhere, so the SWC folder definition is working too.
> 
>  
> 
> What is wrong?
> 
>  
> 
> Best regards
> 
> Dennis
>




[flexcoders] Drawing a line that follows the mouse.

2009-10-11 Thread flexaustin
Wondering if anyone sees an issue with this code/approach?  I am trying to draw 
a line with the mouse and have the line follow the mouse, rather than a pen 
tool. This code sort of works, but if you move the mouse to fast or once in a 
while the line seems to get lost or detached.

private function drawFakeLine(  ) : void
{

var canvas:Sprite = new Sprite(); 
vis.marks.addChildAt( canvas, 0 ); 

vis.addEventListener(MouseEvent.MOUSE_MOVE, draw_line);
vis.addEventListener(MouseEvent.MOUSE_UP, 
stop_drawing); 

var startX:Number = vis.mouseX;
var startY:Number = vis.mouseY;

canvas.graphics.moveTo(vis.mouseX, vis.mouseY);

function stop_drawing(e:MouseEvent):void { 
vis.removeEventListener(MouseEvent.MOUSE_MOVE, draw_line) }; 
function draw_line(e:MouseEvent):void 
{ 
canvas.graphics.clear();
canvas.graphics.moveTo( startX, startY );
canvas.graphics.lineStyle(1, 0xFF6633); 
canvas.graphics.lineTo(vis.mouseX, vis.mouseY); 

e.updateAfterEvent(); 
}
}



[flexcoders] Re: Custom PopUp not resizing.

2009-10-09 Thread flexaustin
Thanks, Alex.  The issue was setting width and height so my override measure 
was never getting called.  And I had a couple of component referencing/bound 
{this.width} and {this.height} caused some kind of infinite loop or something?

Set all to minWidth and minHeight all works now.

Jason



--- In flexcoders@yahoogroups.com, Alex Harui  wrote:
>
> Maybe you're measured size doesn't match the size you're setting, or maybe 
> the setting of the size causes something to be invalidated and go through the 
> whole sizing pass again.  Setting breakpoints in LayoutManager can help you 
> find the problem.
> 
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.<http://www.adobe.com/>
> Blog: http://blogs.adobe.com/aharui
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
> Behalf Of flexaustin
> Sent: Friday, October 09, 2009 9:04 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Custom PopUp not resizing.
> 
> 
> 
> So I swapped out Box with s:Panel as the base of my custom component. If I 
> don't set set height or width in my component then Flash freezes and says the 
> script is running longer than 15 seconds. Also this same thing happened when 
> I was using mx:Box as the base of my component. This is happening without me 
> overriding any of the measure, commitProperties, etc... functoins. Any 
> suggestions?
> 
> Jason
> 
> --- In flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>, Alex 
> Harui  wrote:
> >
> > Popups are a special case. Panel/TitleWindow know when they've been popped 
> > up and resize themselves. You'll have to teach your Box to do the same.
> >
> > Alex Harui
> > Flex SDK Developer
> > Adobe Systems Inc.<http://www.adobe.com/>
> > Blog: http://blogs.adobe.com/aharui
> >
> > From: flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com> 
> > [mailto:flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>] On 
> > Behalf Of flexaustin
> > Sent: Thursday, October 08, 2009 2:07 PM
> > To: flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>
> > Subject: [flexcoders] Custom PopUp not resizing.
> >
> >
> >
> > I have a custom popup based on mx:Box. In it I have a dropdown. In this 
> > list dropdown you can select multiple items that once items are selected 
> > they stay in the dropdowns selected box (think multiselect combobo box). My 
> > custom pop has a width and height set to 300 by 300;
> >
> > Anyway, when I select several items the pop (not the dropdownlist) starts 
> > adding scrollbars when there are to many. If I set the 
> > horizontalscrollpolicy and verticallscrollpolicy to off then the pop start 
> > moving out of what looks like the popups viewablearea/scrollRect?
> > So as the selecteditems in my dropdown gets longer the top of the popup 
> > start disappearing?
> >
> > Does the popupmanager need to know to increase its viewable area for the 
> > popup? Or is it possible to have a popup increase in size?
> >
>




[flexcoders] Re: Custom PopUp not resizing.

2009-10-09 Thread flexaustin
So I swapped out Box with s:Panel as the base of my custom component. If I 
don't set set height or width in my component then Flash freezes and says the 
script is running longer than 15 seconds. Also this same thing happened when I 
was using mx:Box as the base of my component.  This is happening without me 
overriding any of the measure, commitProperties, etc... functoins. Any 
suggestions?

Jason



--- In flexcoders@yahoogroups.com, Alex Harui  wrote:
>
> Popups are a special case.  Panel/TitleWindow know when they've been popped 
> up and resize themselves.  You'll have to teach your Box to do the same.
> 
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.<http://www.adobe.com/>
> Blog: http://blogs.adobe.com/aharui
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
> Behalf Of flexaustin
> Sent: Thursday, October 08, 2009 2:07 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Custom PopUp not resizing.
> 
> 
> 
> I have a custom popup based on mx:Box. In it I have a dropdown. In this list 
> dropdown you can select multiple items that once items are selected they stay 
> in the dropdowns selected box (think multiselect combobo box). My custom pop 
> has a width and height set to 300 by 300;
> 
> Anyway, when I select several items the pop (not the dropdownlist) starts 
> adding scrollbars when there are to many. If I set the horizontalscrollpolicy 
> and verticallscrollpolicy to off then the pop start moving out of what looks 
> like the popups viewablearea/scrollRect?
> So as the selecteditems in my dropdown gets longer the top of the popup start 
> disappearing?
> 
> Does the popupmanager need to know to increase its viewable area for the 
> popup? Or is it possible to have a popup increase in size?
>




[flexcoders] Custom PopUp not resizing.

2009-10-08 Thread flexaustin
I have a custom popup based on mx:Box.  In it I have a dropdown. In this list 
dropdown you can select multiple items that once items are selected they stay 
in the dropdowns selected box (think multiselect combobo box). My custom pop 
has a width and height set to 300 by 300;

Anyway, when I select several items the pop (not the dropdownlist) starts 
adding scrollbars when there are to many.  If I set the horizontalscrollpolicy 
and verticallscrollpolicy to off then the pop start moving out of what looks 
like the popups viewablearea/scrollRect?
So as the selecteditems in my dropdown gets longer the top of the popup start 
disappearing?

Does the popupmanager need to know to increase its viewable area for the popup? 
Or is it possible to have a popup increase in size?





[flexcoders] Sprite measure?

2009-10-08 Thread flexaustin
Is there a way to get a Sprite class to resize?  

I am using the com.senocular.display.TransformTool. The issue is if I have the 
tool on/over a ballsprite, and while on the ballsprite I change the size of the 
ballsprite the transform doesn't change to match the new size of the ballsprite.

Or if I click a ballsprite, it should put the TransformTool on the ballsprite, 
which works fine. But, if I apply the TransformTool through code, fake a click, 
the TransformTool doesn't size correctly?

I am sure this could be a bug in TransformTool, so just wondering how you 
resize a Sprite since their isn't an invalidDisplayObject.

TIA, J



[flexcoders] localToGlobal???

2009-10-05 Thread flexaustin
So my head is spinning?

I have a popup that is popped on the mainstage. I want to that popup to follow 
a sprite that is down in the Display list about 4 levels. 

So if you a user drags the sprite say left 150 pixels and down 150 the popup 
needs to follow it.

I am trying to do popup.move (somenum, someothernum ) but it doesn't work out 
correctly. I can't seem to get the coord correct or on the same playing field.

The popup might be instantiated at the center of the stage, which is x240 and 
y240 but the sprite might be at x1500 and y 1600 on its level of the 
displaylist.

TIA, J



[flexcoders] Re: xml E4X adding a child?

2009-10-01 Thread flexaustin
This works.

var groupsNode:XML = xmlData.data.(@key == "groups")[0];
groupsNode.insertChildBefore(groupsNode.group[0], 
);


Also WATCHOUT. For some reason putting in a break point and then trying 
different xml expressions in the expressions window doesn't update all the 
time.  Once time it shows that an E4X experession doesn't work then the next 
time it does work (even if you didn't touch it).  Its like it isn't updating



[flexcoders] Re: xml E4X adding a child?

2009-10-01 Thread flexaustin
Doesn't work.




[flexcoders] Re: xml E4X adding a child?

2009-09-30 Thread flexaustin
This doesn't work either?

xmlData.insertChildAfter( xmlData.data.(attribute('key') == 'groups').group[0], 
 );



[flexcoders] Re: xml E4X adding a child?

2009-09-30 Thread flexaustin
This doesn't work either?

xmlData.insertChildAfter( xmlData.data.(attribute('key') == 'groups').group[0], 
 );



[flexcoders] xml E4X adding a child?

2009-09-30 Thread flexaustin
So if I have this XML:


  
name24836
  
  
  
null
  
  
false
  
  

  


How do I add another group? The following doesn't work?

xmlData.insertChildAfter( xmlData.(elements('data').(attribute('key') == 
'groups')).group[0],  ); 





[flexcoders] Re: scrollRect ???

2009-09-25 Thread flexaustin
I would setting for Google or Yahoo version, but eventually I would like to be 
able to scale the floating box (blue box that shows scrollRect of the map) in 
the pan/zoom control and have it change the maps scale factor.


J

--- In flexcoders@yahoogroups.com, Alex Harui  wrote:
>
> I don't know of any example code.  Are you trying to do anything different 
> from the other map applications out there?
> 
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.<http://www.adobe.com/>
> Blog: http://blogs.adobe.com/aharui
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
> Behalf Of flexaustin
> Sent: Thursday, September 24, 2009 10:01 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: scrollRect ???
> 
> 
> 
> Alex, thanks. Do you happen to know of any articles or examples on creating a 
> satellite view pan/zoom control?
> 
> Jason
> 
> --- In flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>, Alex 
> Harui  wrote:
> >
> > I'm pretty sure scrollrects are always positioned at 0,0. It essentially 
> > creates a mask of a certain size, positions it at 0,0, then only shows the 
> > pixels that would otherwise be displayed at x,y at 0,0
> >
> > Alex Harui
> > Flex SDK Developer
> > Adobe Systems Inc.<http://www.adobe.com/>
> > Blog: http://blogs.adobe.com/aharui
> >
> > From: flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com> 
> > [mailto:flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>] On 
> > Behalf Of flexaustin
> > Sent: Wednesday, September 23, 2009 10:35 PM
> > To: flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>
> > Subject: [flexcoders] scrollRect ???
> >
> >
> >
> > Wondering if anyone knows how to get the difference between the scrollRect 
> > x position relative to the components edges?
> >
> > I am building a pancontrol, similar to the ones found Google Maps or Yahoo 
> > Maps, for quick navigation.
> >
> > In order to setup my pancontrol I need to find out the following given this 
> > code:
> >
> >  > ..
> >
> >  > horizontalScrollPolicy="off" verticalScrollPolicy="off" >
> >  > width="100%" height="100%"
> > horizontalScrollPolicy="off" verticalScrollPolicy="off"
> > backgroundAlpha="0"
> > scrollRect="{rec}"
> > cacheAsBitmap="true"
> > mouseUp="handleVisMouseUp()"
> > />
> > 
> >
> > I need to find the distance or gap between the vis.scrollRect x&y position 
> > relative to the vis x&y position. My application width & height are 600 x 
> > 600. Vis width and height are 3000 x 900 so they extend off screen. I am 
> > using the scrollRect to limit what is viewable. But in order build my 
> > pancontrol I need to find the diff between the X & Y of the scrollRect in 
> > relation to the X&Y of the Vis. So how far off left, right, bottom, and top 
> > of the visible area does Vis extend. I need those numbers in pixels.
> >
> > TIA, J
> >
>




[flexcoders] Re: scrollRect ???

2009-09-24 Thread flexaustin
Alex, thanks. Do you happen to know of any articles or examples on creating a 
satellite view pan/zoom control?

Jason


--- In flexcoders@yahoogroups.com, Alex Harui  wrote:
>
> I'm pretty sure scrollrects are always positioned at 0,0.  It essentially 
> creates a mask of a certain size, positions it at 0,0, then only shows the 
> pixels that would otherwise be displayed at x,y at 0,0
> 
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.<http://www.adobe.com/>
> Blog: http://blogs.adobe.com/aharui
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
> Behalf Of flexaustin
> Sent: Wednesday, September 23, 2009 10:35 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] scrollRect ???
> 
> 
> 
> Wondering if anyone knows how to get the difference between the scrollRect x 
> position relative to the components edges?
> 
> I am building a pancontrol, similar to the ones found Google Maps or Yahoo 
> Maps, for quick navigation.
> 
> In order to setup my pancontrol I need to find out the following given this 
> code:
> 
>  ..
> 
>  horizontalScrollPolicy="off" verticalScrollPolicy="off" >
>  width="100%" height="100%"
> horizontalScrollPolicy="off" verticalScrollPolicy="off"
> backgroundAlpha="0"
> scrollRect="{rec}"
> cacheAsBitmap="true"
> mouseUp="handleVisMouseUp()"
> />
> 
> 
> I need to find the distance or gap between the vis.scrollRect x&y position 
> relative to the vis x&y position. My application width & height are 600 x 
> 600. Vis width and height are 3000 x 900 so they extend off screen. I am 
> using the scrollRect to limit what is viewable. But in order build my 
> pancontrol I need to find the diff between the X & Y of the scrollRect in 
> relation to the X&Y of the Vis. So how far off left, right, bottom, and top 
> of the visible area does Vis extend. I need those numbers in pixels.
> 
> TIA, J
>




[flexcoders] scrollRect ???

2009-09-23 Thread flexaustin
Wondering if anyone knows how to get the difference between the scrollRect x 
position relative to the components edges?

I am building a pancontrol, similar to the ones found Google Maps or Yahoo 
Maps, for quick navigation.

In order to setup my pancontrol I need to find out the following given this 
code:


 


I need to find the distance or gap between the vis.scrollRect x&y position 
relative to the vis x&y position.  My application width & height are 600 x 600. 
Vis width and height are 3000 x 900 so they extend off screen. I am using the 
scrollRect to limit what is viewable. But in order build my pancontrol I need 
to find the diff between the X & Y of the scrollRect in relation to the X&Y of 
the Vis. So how far off left, right, bottom, and top of the visible area does 
Vis extend. I need those numbers in pixels.

TIA, J



[flexcoders] Re: SystemManager????

2009-09-21 Thread flexaustin
Is there a way to allow it to be in the same sandbox?  I think you gave a talk 
on this once.

Jason




--- In flexcoders@yahoogroups.com, Alex Harui  wrote:
>
> Security.  The event.target would be an object in the other sandbox
> 
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.
> Blog: http://blogs.adobe.com/aharui
> 
> 
> -Original Message-
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
> Behalf Of Paul Andrews
> Sent: Monday, September 21, 2009 1:14 AM
> To: flexcoders@yahoogroups.com
> Subject: Re: [flexcoders] Re: SystemManager
> 
> Alex Harui wrote:
> >
> >
> > If you click on content loaded from another domain, you don't get a 
> > click event.
> >
> In terms of "clicks" why should the originating domain matter?
> >
> > Alex Harui
> >
> > Flex SDK Developer
> >
> > Adobe Systems Inc. <http://www.adobe.com/>
> >
> > Blog: http://blogs.adobe.com/aharui
> >
> > *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] 
> > *On Behalf Of *flexaustin
> > *Sent:* Sunday, September 20, 2009 6:10 PM
> > *To:* flexcoders@yahoogroups.com
> > *Subject:* [flexcoders] Re: SystemManager
> >
> > Shouldn't systemManager send out a MouseEvent.click on everything 
> > clicked in the application? It seems as though if the item clicked is 
> > a swf or embedded icon (even if included in a sprite) they don't seem 
> > to register with the systemManager? Or the systemManager doesn't send 
> > out a MouseEvent.click.
> >
> > Is their a way to make the systemManager send the click 100% of the time?
> >
> > --- In flexcoders@yahoogroups.com 
> > <mailto:flexcoders%40yahoogroups.com>, "flexaustin"  
> > wrote:
> > >
> > > I am building app that is something similar to photoshop or 
> > illustrator where
> > > you have several tools to choose.
> > >
> > > I want to use a State Object pattern, where selecting a tool changes 
> > the state
> > > of the app. I then want to have the mouse throw different events 
> > depending on,
> > > which tool is selected rather than have state objects in my 
> > listeners or having
> > > conditionals or table look up in my listeners.
> > >
> > > I am using custom mouse pointers for tools so what I am wondering 
> > is, is it
> > > possible for my custom systemmanager or cursormanager to tell when a 
> > click,
> > > doubleclick, or drag happens? If so then I was thinking the 
> > systemmanager or
> > > cursormanager could know what tool is selected, thus what mode/state 
> > the app is
> > > in, and send out different events for say mouse clicks.
> > >
> > > So:
> > >
> > > fingermouse's click = open thing clicked
> > > zoommouse's click = zoom in 25%
> > > mousepointer click = select to transform
> > > pointer with a + on it = add a new thing to stage
> > > ponter with a - on it = sub a new thing from stage
> > >
> > > TIA, J
> > >
> >
> >
> >
> > 
> 
> 
> 
> 
> 
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Alternative FAQ location: 
> https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
> Search Archives: 
> http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
>




[flexcoders] Re: x and y localToGlobal

2009-09-21 Thread flexaustin
thanks alex

--- In flexcoders@yahoogroups.com, Alex Harui  wrote:
>
> If tool and targ have the same parent, then a simple assignment of the x,y 
> should be good enough, assuming that both are drawing into positive 
> coordinates only.  If you've got something drawing into negative coordinates 
> because it is centering and rotation, then you need more calculations.
> 
> If their parents are different, and it sound like they are, then if targ is 
> from a mouseEvent, the mouseEvent's stageX/Y should be good enough to back 
> calculate using globalToLocal.  Note that for a mouseEvent, the event.target 
> could be a sub-component and thus not have the same parent as the other.
> 
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.<http://www.adobe.com/>
> Blog: http://blogs.adobe.com/aharui
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
> Behalf Of flexaustin
> Sent: Saturday, September 19, 2009 2:27 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] x and y localToGlobal
> 
> 
> 
> Can anyone tell me if any of these are correct? I am using Senocular 
> TransformTool (e.g. 
> http://www.sephiroth.it/weblog/archives/2007/07/transformtool_modification.php)
>  I have a Flex that has the following layers:
> 
> Flex Project Layers (top to bottom):
> -Application
> --main sprite
> ---visualization sprite
> holder layer - where TARG and TOOL are located.
> 
> What I need is for TOOL's X & Y to be TARG's X & Y at all times. So if I drag 
> TARG then TOOL needs to stay with it in the same spot (And no I can't put 
> TOOL inside TARG). So I tried the following which doesn't work:
> 
> tool.x = targ.x; (in debug it shows this before assignment tool.x=289 and 
> targ.x=0)
> tool.y = targ.y; (in debug it shows this before assignment tool.y=200 and 
> targ.y=0)
> 
> So, I tried each of the following (substituting in each var), but none of 
> which works.
> tool.x = gtlpt.x;
> tool.y = gtlpt.y;
> 
> var gtlpt:Point = tool.globalToLocal( new Point( targ.x, targ.y ) );
> var ltgpt:Point = tool.localToGlobal( new Point( targ.x, targ.y ) );
> 
> var toolgtlpt:Point = targ.globalToLocal( new Point( tool.x, tool.y ) );
> var toolltgpt:Point = targ.localToGlobal( new Point( tool.x, tool.y ) );
> 
> var mgtlpt:Point = _vis.marks.globalToLocal( new Point( tool.x, tool.y ) );
> var mltgpt:Point = _vis.marks.localToGlobal( new Point( tool.x, tool.y ) );
> 
> var mmgtlpt:Point = _vis.marks.globalToLocal( new Point( targ.x, targ.y ) );
> var mmltgpt:Point = _vis.marks.localToGlobal( new Point( targ.x, targ.y ) );
>




[flexcoders] Graphics Layer

2009-09-20 Thread flexaustin
Is there a way in Flex 3 or Flex 4 to draw items to a sprite graphics layer 
without the manual lineTo and curveTo way.  

I know with mxml you can do this easily with I think its SVG, but can this be 
done with actionscript and the graphic draw methods? Is there a way to put in 
the SVG coord in actionscript?

I have swf icons I am embedding into my project, but would be better if I could 
draw them in my sprites.

TIA, J



[flexcoders] Re: SystemManager????

2009-09-20 Thread flexaustin
Shouldn't systemManager send out a MouseEvent.click on everything clicked in 
the application?  It seems as though if the item clicked is a swf or embedded 
icon (even if included in a sprite) they don't seem to register with the 
systemManager? Or the systemManager doesn't send out a MouseEvent.click.

Is their a way to make the systemManager send the click 100% of the time?



--- In flexcoders@yahoogroups.com, "flexaustin"  wrote:
>
> I am building app that is something similar to photoshop or illustrator where
> you have several tools to choose.
> 
> I want to use a State Object pattern, where selecting a tool changes the state
> of the app. I then want to have the mouse throw different events depending on,
> which tool is selected rather than have state objects in my listeners or 
> having
> conditionals or table look up in my listeners.
> 
> I am using custom mouse pointers for tools so what I am wondering is, is it
> possible for my custom systemmanager or cursormanager to tell when a click,
> doubleclick, or drag happens? If so then I was thinking the systemmanager or
> cursormanager could know what tool is selected, thus what mode/state the app 
> is
> in, and send out different events for say mouse clicks.
> 
> So:
> 
> fingermouse's click = open thing clicked
> zoommouse's click = zoom in 25%
> mousepointer click = select to transform
> pointer with a + on it = add a new thing to stage
> ponter with a - on it = sub a new thing from stage
> 
> TIA, J
>




[flexcoders] Re: Creating Resize Handles

2009-09-20 Thread flexaustin
I should have done a debug and walked in through, but my issue has to do 
something with the creation of the tool and when its created in the "marks" 
layer of Flare. 

I had to do the following:

 tool = new TransformTool();
tool.moveEnabled = false;
tool.skewEnabled = false;
tool.registrationEnabled = false;
tool.constrainScale = true;
tool.maxScaleX = 2;
tool.maxScaleY = 2;
  
//tool.scaleWithRegistration = scale_registration.selected;
_vis.marks.addChild(tool);
tool.x = _targ.x;
tool.y = _targ.y;

tool.target = _targ;

My issue before was I was assigning the target of the tool then doing addChild. 
 Which even though I had a reference to targ to pass in I guess it makes sense 
that the tool needs to be added the marks layer before assigning a target so as 
to understand its boundaries and what not.

So problem solved. Thanks for your help, though.

J


--- In flexcoders@yahoogroups.com, "ag_rcuren"  wrote:
>
> I sounds like you might be having issues with where you added the 
> TransformTool as a child. Try adding the TransformTool as a child of the 
> application and see if that helps. If you are still having problems you could 
> email me or post your code and then I could take look at it.
> 
> Here is an example of how I used it this tool before. All of this code was 
> right in a script tag on the main mxml file.
> 
> private var transformTool:TransformTool;
> 
> private function imageClickHandler(event:MouseEvent):void
> if (!transformTool)
> {
> transformTool = new TransformTool();
> addChild(transformTool);
> }
> transformTool.target = event.currentTarget as DisplayObject;
> }
> 
> 
> --- In flexcoders@yahoogroups.com, "flexaustin"  wrote:
> >
> > Robert, have you used the transformtool in a flex app before? When I try to 
> > add it via tool.target = mySprite and myOtherSprite.addChild(tool). 
> > 
> > It puts the tool on screen but its so small I can barely see it. If I try 
> > to set the w or h it stays the same size; tiny. Also when the tool is put 
> > on screen its about 200 pixels away on the x-axis.
> > 
> > Jason
> > 
> > 
> > 
> > 
> > 
> > --- In flexcoders@yahoogroups.com, "ag_rcuren"  wrote:
> > >
> > > ObjectHandles is ok but they do not handle rotation very well. Have a 
> > > look at this
> > > 
> > > http://www.sephiroth.it/weblog/archives/2007/07/transformtool_modification.php
> > > 
> > > --- In flexcoders@yahoogroups.com, Fotis Chatzinikos  
> > > wrote:
> > > >
> > > > Google ObjectHandles ;-)
> > > > 
> > > > On Thu, Sep 17, 2009 at 5:06 PM, flexaustin  wrote:
> > > > 
> > > > >
> > > > >
> > > > > Anyone ever create or see a tut/example on how to create resize/skew
> > > > > handles on Sprites or UIComponents?
> > > > >
> > > > > Say you click a Sprite on screen, the sprite would should show a 
> > > > > bounding
> > > > > box, similar to Flash, Photoshop, Visio or Firefox, which allow you 
> > > > > to make
> > > > > the clicked Sprite wider, thinner, skew, or rotate the Sprite.
> > > > >
> > > > > TIA, J
> > > > >
> > > > >  
> > > > >
> > > > 
> > > > 
> > > > 
> > > > -- 
> > > > Fotis Chatzinikos, Ph.D.
> > > > Founder,
> > > > Phinnovation
> > > > Fotis.Chatzinikos@,
> > > >
> > >
> >
>




[flexcoders] SystemManager????

2009-09-19 Thread flexaustin
I am building app that is something similar to photoshop or illustrator where
you have several tools to choose.

I want to use a State Object pattern, where selecting a tool changes the state
of the app. I then want to have the mouse throw different events depending on,
which tool is selected rather than have state objects in my listeners or having
conditionals or table look up in my listeners.

I am using custom mouse pointers for tools so what I am wondering is, is it
possible for my custom systemmanager or cursormanager to tell when a click,
doubleclick, or drag happens? If so then I was thinking the systemmanager or
cursormanager could know what tool is selected, thus what mode/state the app is
in, and send out different events for say mouse clicks.

So:

fingermouse's click = open thing clicked
zoommouse's click = zoom in 25%
mousepointer click = select to transform
pointer with a + on it = add a new thing to stage
ponter with a - on it = sub a new thing from stage

TIA, J



[flexcoders] SystemManager???

2009-09-19 Thread flexaustin
I am building app that is something similar to photoshop or illustrator where 
you have several tools to choose.

I want to use a State Object pattern, where selecting a tool changes the state 
of the app. I then want to have the mouse throw different events depending on, 
which tool is selected rather than have state objects in my listeners or having 
conditionals or table look up in my listeners.

I am using custom mouse pointers for tools so what I am wondering is, is it 
possible for my custom mousepointer or cursormanager to tell when a click, 
doubleclick, or drag happens? If so then I was thinking the mousepointer or 
cursormanager could know what tool is selected, thus what mode/state the app is 
in, and send out different events for say mouse clicks. 

So:

fingermouse's click = open thing clicked
zoommouse's click = zoom in 25%
mousepointer click = select to transform
pointer with a + on it = add a new thing to stage
ponter with a - on it = sub a new thing from stage

TIA, J



[flexcoders] x and y localToGlobal

2009-09-19 Thread flexaustin
Can anyone tell me if any of these are correct?  I am using Senocular 
TransformTool (e.g. 
http://www.sephiroth.it/weblog/archives/2007/07/transformtool_modification.php) 
I have a Flex that has the following layers:

Flex Project Layers (top to bottom):
-Application
--main sprite
---visualization sprite
holder layer - where TARG and TOOL are located.

What I need is for TOOL's X & Y to be TARG's X & Y at all times. So if I drag 
TARG then TOOL needs to stay with it in the same spot (And no I can't put TOOL 
inside TARG). So I tried the following which doesn't work:

tool.x = targ.x; (in debug it shows this before assignment tool.x=289 and 
targ.x=0)

tool.y = targ.y; (in debug it shows this before assignment 
tool.y=200 and targ.y=0)


So, I tried each of the following (substituting in each var), but none of which 
works.
tool.x = gtlpt.x;

tool.y = gtlpt.y;


var gtlpt:Point = tool.globalToLocal( new Point( targ.x, targ.y ) );

var ltgpt:Point = tool.localToGlobal( new Point( targ.x, targ.y ) );



var toolgtlpt:Point = targ.globalToLocal( new Point(  
tool.x, tool.y ) );

var toolltgpt:Point = targ.localToGlobal( new Point( 
tool.x, tool.y ) );



var mgtlpt:Point = _vis.marks.globalToLocal( new Point(  
tool.x, tool.y ) );

var mltgpt:Point = _vis.marks.localToGlobal( new Point( 
tool.x, tool.y ) );



var mmgtlpt:Point = _vis.marks.globalToLocal( new Point(  
targ.x, targ.y ) );

var mmltgpt:Point = _vis.marks.localToGlobal( new Point( 
targ.x, targ.y ) );







[flexcoders] Re: Creating Resize Handles

2009-09-18 Thread flexaustin
Robert, have you used the transformtool in a flex app before? When I try to add 
it via tool.target = mySprite and myOtherSprite.addChild(tool). 

It puts the tool on screen but its so small I can barely see it. If I try to 
set the w or h it stays the same size; tiny. Also when the tool is put on 
screen its about 200 pixels away on the x-axis.

Jason





--- In flexcoders@yahoogroups.com, "ag_rcuren"  wrote:
>
> ObjectHandles is ok but they do not handle rotation very well. Have a look at 
> this
> 
> http://www.sephiroth.it/weblog/archives/2007/07/transformtool_modification.php
> 
> --- In flexcoders@yahoogroups.com, Fotis Chatzinikos  
> wrote:
> >
> > Google ObjectHandles ;-)
> > 
> > On Thu, Sep 17, 2009 at 5:06 PM, flexaustin  wrote:
> > 
> > >
> > >
> > > Anyone ever create or see a tut/example on how to create resize/skew
> > > handles on Sprites or UIComponents?
> > >
> > > Say you click a Sprite on screen, the sprite would should show a bounding
> > > box, similar to Flash, Photoshop, Visio or Firefox, which allow you to 
> > > make
> > > the clicked Sprite wider, thinner, skew, or rotate the Sprite.
> > >
> > > TIA, J
> > >
> > >  
> > >
> > 
> > 
> > 
> > -- 
> > Fotis Chatzinikos, Ph.D.
> > Founder,
> > Phinnovation
> > Fotis.Chatzinikos@,
> >
>




[flexcoders] Re: Creating Resize Handles

2009-09-17 Thread flexaustin
This one is much better! I don't have to throw my objects in it like the other 
one.

THanks.  

--- In flexcoders@yahoogroups.com, "ag_rcuren"  wrote:
>
> ObjectHandles is ok but they do not handle rotation very well. Have a look at 
> this
> 
> http://www.sephiroth.it/weblog/archives/2007/07/transformtool_modification.php
> 
> --- In flexcoders@yahoogroups.com, Fotis Chatzinikos  
> wrote:
> >
> > Google ObjectHandles ;-)
> > 
> > On Thu, Sep 17, 2009 at 5:06 PM, flexaustin  wrote:
> > 
> > >
> > >
> > > Anyone ever create or see a tut/example on how to create resize/skew
> > > handles on Sprites or UIComponents?
> > >
> > > Say you click a Sprite on screen, the sprite would should show a bounding
> > > box, similar to Flash, Photoshop, Visio or Firefox, which allow you to 
> > > make
> > > the clicked Sprite wider, thinner, skew, or rotate the Sprite.
> > >
> > > TIA, J
> > >
> > >  
> > >
> > 
> > 
> > 
> > -- 
> > Fotis Chatzinikos, Ph.D.
> > Founder,
> > Phinnovation
> > Fotis.Chatzinikos@,
> >
>




[flexcoders] Creating Resize Handles

2009-09-17 Thread flexaustin
Anyone ever create or see a tut/example on how to create resize/skew handles on 
Sprites or UIComponents? 

Say you click a Sprite on screen, the sprite would should show a bounding box, 
similar to Flash, Photoshop, Visio or Firefox, which allow you to make the 
clicked Sprite wider, thinner, skew, or rotate the Sprite.

TIA, J



[flexcoders] File size and Embed( image.png )

2009-09-16 Thread flexaustin
Anyone have any suggestions on the best way to import png files and keep the 
file size down?

I have an app that can have up to 1000 imported png images with alpha 
backgrounds in my app. These images are 1 of 40 icons we offer in our app. 
These images were created in illustrator (web 2.0 embossed style) and range in 
size from 2kb to 12kb each depending on the style. The images can be dragged 
around on the screen so lots of redrawing for flashplayer to do.

So would it be better to save them all as art work (icons) in one big swf file 
and then give each symbol name and reference that way? 

Or is there another way that is better?

TIA, J



[flexcoders] Re: Regex: match a specific word.

2009-09-14 Thread flexaustin
Thanks, I rolled my own.

--- In flexcoders@yahoogroups.com, joss  wrote:
>
> try looking at this site. as well as looking at lookahead and look behind you 
> may want to look at word boundaries and negation.
> http://www.regular-expressions.info/lookaround.html
> 
> Your problem is that you need to match anything valid that is NOT either of 
> big or small (ignoring case) because the validator gives a message on "no 
> match". it would be easier for you if the error was on match. 
> 
> so you either change your expression to match anything but those two words- 
> although that will not guarantee it is a valid filename unless you add more 
> conditions. Or you could abandon the validator altogther and do your own 
> validation which gives an error IF you find those words on their own- 
> probably much easier.
>




[flexcoders] Re: Regex: match a specific word.

2009-09-14 Thread flexaustin
Great a little closer. I noticed weird things were happening with "myF" and 
"myfile".

So how do you say not this:  ^medium$|^tiny$ <-- meaning if I do the following, 
it comes back as valid if I type in "medium" or "tiny", but I need it to come 
back invalid.  So with the following if I type "sdkfldf" it shows as invalid as 
it doesn't match and if I type "tiny" is shows as valid as it matches.:



I want to say 



[flexcoders] Re: Regex: match a specific word.

2009-09-14 Thread flexaustin
So how do I catch the opposite of this \bBig2\b as with the following (see 
below) the only time I don't get a matchError is if I type in "Big2".  I want 
the reverse.

vResult = reservedNamesValidator.validate();
if (vResult.type==ValidationResultEvent.INVALID)
return; 







[flexcoders] Re: Regex: match a specific word.

2009-09-13 Thread flexaustin
I don't want to match just a word though.

So in my app I have two standard objects that the user can use, which are named 
"Big" and "Small".  

The user can open "Big" make some changes to it then if they want to save those 
changes I don't want them saving it as "Big" or "Small", but they can save it 
as "Big2" or "new_Small". 

So if the user types in "Big" and tries to save it I want to catch this in 
validation and then use the regexvalidator to color the textinput border red.

So if I just do a /Big/ or /Small/ then the user can't save it as "Big2" 
because the regex will see the "Big" part in "Big2" and warn them "you can't 
save it with this name". But "Big2" is valid not as it isn't just plain "Big"

TIA,J 



[flexcoders] Re: Regex: match a specific word.

2009-09-13 Thread flexaustin
I am close with this:



WOULD IT BE THIS?:



SO I DON"T WANT TO ALLOW THE USER TO SAVE A FILE WITH EITHER OF THESE TWO 
NAMES?  ("myfilename" or "myotherfilename").





[flexcoders] Re: Regex: match a specific word.

2009-09-13 Thread flexaustin
Also these
 
1. "myotherfilename" (catch as invalid)
2. "okmyotherfilenameok" (ok)
3. "34myotherfilenameok45" (ok)
4. "MYOTHERFILENAME" (catch as invalid)
5. "myotherfilename " (catch as invalid)
6. " MYOTHERFILENAME " (catch as invalid)
7. "BIG_MYOTHERFILENAME" (ok)






[flexcoders] Regex: match a specific word.

2009-09-13 Thread flexaustin
Anyone good at RegExpValidator's?  (want to catch these as reserved in a 
textinput as invalid; think file names that cannot be overwritten )

I need to match some keywords as follows (ignore quotes just in to show 
whitespace):

1. "myfilename" (catch as invalid)
2. "okmyfilenameok" (ok)
3. "34myfilenameok45" (ok)
4. "MYFILENAME" (catch as invalid)
5. "myfilename " (catch as invalid)
6. " MYFILENAME " (catch as invalid)
7. "BIG_MYFILENAME" (ok)



[flexcoders] Re: Scale a Class file (png, gif, etc...)

2009-08-17 Thread flexaustin
Yes, code would be great! I can't believe how difficult this is to get 
implemented. Hope these things become easier in Flex 5.

J

--- In flexcoders@yahoogroups.com, "ag_rcuren"  wrote:
>
> I ran into this same problem and could not find and easy fix. I ended up 
> extending the LinkButton class. I created a button class that can load it's 
> icons on the fly from any where local, net, or embedded. Instead of needing 
> to set them strictly to Class I created a iconSource property. This allowed 
> me to load the image scale it down and then use that scaled image as the 
> icon. This required some trickery as you have to get the icon for each state 
> by name and manually add your custom icons, but it does work just fine. I 
> don't have time to include code right now but I can post some example code 
> later if you would like. I hope what I said made sense.
> 
> 
> --- In flexcoders@yahoogroups.com, "flexaustin"  wrote:
> >
> > I am trying to use a LinkButton in my app and assign an image to the icon 
> > variable, but I need to scale down or make sure the image isn't any larger 
> > than 15 x 15 pixels.
> > 
> > Is there a way to scale a class file?  I tried to load a png file then 
> > convert the png to Bitmap, tried BitmapData, and tried BitmapAsset and then 
> > scale the embedded image, but non of this worked.
> > 
> > So to recap embed and image (which is 50x50 pixels) and shrink it down to 
> > (15x15 pixels) and assign it to a linkButtons icon. 
> > 
> > Anyone know of a solution?
> >
>




[flexcoders] Re: Scale a Class file (png, gif, etc...)

2009-08-17 Thread flexaustin
Ok, what about BitmapAsset.setActualSize?



--- In flexcoders@yahoogroups.com, "grg_blls"  wrote:
>
> Hi,
>  
> Bitmaps aren't usually 'shrinked' (this or another way) as they lose in 
> context.
> 
> You should use a image processing program to first convert by downsampling to 
> this lower resolution, and if you still can make out what the original image 
> was like, OK. Otherwise you should 'enhance' the result to make up for the 
> lost information.
> Sorry if there is no easy way to effectively scale down bitmaps.
> George
> 
> 
> --- In flexcoders@yahoogroups.com, "flexaustin"  wrote:
> >
> > I am trying to use a LinkButton in my app and assign an image to the icon 
> > variable, but I need to scale down or make sure the image isn't any larger 
> > than 15 x 15 pixels.
> > 
> > Is there a way to scale a class file?  I tried to load a png file then 
> > convert the png to Bitmap, tried BitmapData, and tried BitmapAsset and then 
> > scale the embedded image, but non of this worked.
> > 
> > So to recap embed and image (which is 50x50 pixels) and shrink it down to 
> > (15x15 pixels) and assign it to a linkButtons icon. 
> > 
> > Anyone know of a solution?
> >
>




[flexcoders] Scale a Class file (png, gif, etc...)

2009-08-17 Thread flexaustin
I am trying to use a LinkButton in my app and assign an image to the icon 
variable, but I need to scale down or make sure the image isn't any larger than 
15 x 15 pixels.

Is there a way to scale a class file?  I tried to load a png file then convert 
the png to Bitmap, tried BitmapData, and tried BitmapAsset and then scale the 
embedded image, but non of this worked.

So to recap embed and image (which is 50x50 pixels) and shrink it down to 
(15x15 pixels) and assign it to a linkButtons icon. 

Anyone know of a solution?



[flexcoders] Re: BitmapData and Matrix: teach a man to fish (aka matrix).

2009-08-13 Thread flexaustin
So I made the following changes:

FROM THIS:-

numberOfPDFPanelsHigh = Math.max( 1, Math.round(( (_bounds.height *
_percentageToScalePrintOut) / imageHeight) + 2.5) );
numberOfPDFPanelsWide = Math.max( 1, Math.round(( (_bounds.width *
_percentageToScalePrintOut) / imageWidth) + 15.5) );

TO THIS: ---
numberOfPDFPanelsHigh = Math.max( 1, Math.round( (_bounds.height / imageHeight) 
)  );
numberOfPDFPanelsWide = Math.max( 1, 
Math.round( (_bounds.width  / imageWidth)  )  );

I get all the pages, but it is copying a lot of extra whitepages which then 
need to be removed, not efficient, but it is quick.



[flexcoders] BitmapData and Matrix: teach a man to fish (aka matrix).

2009-08-12 Thread flexaustin
Apparently I don't quite get how to use a matrix yet. I thought I did.
So I have on stage of my Flex project a custom object that is 10,000 px wide by 
6,000 px tall. I need to be able to print this so what I have done or tried to 
do is cut up the custom object into chunks of bitmapdata 1000px by 1000px, via 
a matrix object, that I then send to a pdf generator (alivepdf). All is fine, 
but one minor issue that I had to hack my way around.  

So as you will see in the code, I pass an displayobject and get its 
measurements, which then I find out how many snapshots it will take to capture 
the entire displayobject. I couldn't get this to work so what I had to do is 
put in this little hack. Specifically the "+ 2.5" and the "+ 15.5" to add on 
additional 2.5 pages to the height and 15.5 extra pages to width to be sure I 
capture the entire displayObject passed in. If I don't then I don't end up 
getting all of it, usually the lower right corner of the displayobject gets 
cutoff in my bitmapdata/matrix capture function below.

Anyone will to teach a man to fish (aka where am I going wrong with the 
matrix?)  

numberOfPDFPanelsHigh = Math.max( 1, Math.round(( (_bounds.height * 
_percentageToScalePrintOut) / imageHeight) + 2.5) );
numberOfPDFPanelsWide = Math.max( 1, 
Math.round(( (_bounds.width * _percentageToScalePrintOut) / imageWidth) + 15.5) 
);





CODE 

private function willPrepareToPrint(event:Event=null):void{
willSetPrintInContextMenuToDisabled();
CursorManager.setBusyCursor();
if(event){ event.stopImmediatePropagation() };
 
callLater(willEstablishPDFPanels, [event]);
}
private function willEstablishPDFPanels( event:Event=null ):void {

_bounds = 
this.vis.visualization.getBounds(DisplayObject(this.vis.visualization));
trace("this.vis.visualizations bounds are " + 
_bounds);

numberOfPDFPanelsHigh = Math.max( 1, 
Math.round(( (_bounds.height * _percentageToScalePrintOut) / imageHeight) + 
2.5) );
numberOfPDFPanelsWide = Math.max( 1, 
Math.round(( (_bounds.width * _percentageToScalePrintOut) / imageWidth) + 15.5) 
);
callLater( willMakeABitmap, [ event, 
numberOfPDFPanelsWide, numberOfPDFPanelsHigh] );
}

public function willMakeABitmap( event:Event, 
numOfXPanels:int, numOfYPanels:int ):void {   

generator = new PdfGenerator("Map.pdf", null);  

generator.addEventListener(PdfGeneratorEvent.PDF_GENERATOR_COMPLETE, 
this.onPdfComplete);

generator.addEventListener(PdfGeneratorEvent.PDF_GENERATOR_PAGE_COMPLETE, 
this.onPdfPageComplete);  

generator.addEventListener(PdfGeneratorEvent.PDF_GENERATOR_STOPPED, 
this.onPdfGenStopped);
generator.generate();   
createProgressBox();

recForPrinting = 
this.vis.visualization.getBounds( DisplayObject(this.vis.visualization) );
allWhiteBMPD = new BitmapData(imageWidth, 
imageHeight, false, 0x);
_columnsCompleted = 0;
_rowsCompleted = 0;
_images = [];
nextPageCapture();
}

private function nextPageCapture() : void
{
if(_columnsCompleted >= numberOfPDFPanelsWide){ 
onPdfComplete();
return 
}

if(bitmapProgress){ 

progress.progBar.setProgress(_columnsCompleted, numberOfPDFPanelsWide);
progress.progBar.label = 
_columnsCompleted + " of " + numberOfPDFPanelsWide + " images captured";
}

trace(' ');
trace('STARTING NEW PAGE  ||   
');

// this always sets us back to 0,0 point
initRecX = -(recForPrinting.x + -50);
initRecY = -(recFor

[flexcoders] Cut DisplayObject into bitmapdata squares

2009-07-31 Thread flexaustin
So I am trying to cut a DisplayObject (DO) into bitmapdata chunks that are 
roughly 1000 by 1000 pixels. When I get the initial bounds of the DO I they are 
x=-396, y0, w=1110, h=1633.

I think the x of -396 is throwing me off. Plus, I feel like I am fighting 
myself on the Matrix vs. Rectangle in the 
hugeBmp.draw(DO, mtrx, null, null, rec, false );

If I do this mtrx.translate( initRecX, initRecY ); all is fine it works.
(the above is moving the DO to x=0 and y=0 when it grabs the bitmapdata).

But I also need to scale via mtrx.scale( .5, .5), which is where things stop 
working.

I need to slide over via translate then scale down the section of DO I am 
trying to grab a snapshot of.

Any ideas or examples out there?

J



[flexcoders] BitmapData and bytearray: find white area?

2009-07-30 Thread flexaustin
So, I have an app that creates a very large drawing of Sprites and randomly 
places them in a DisplayObject (mainHolder) on stage.

I am trying to create a print option that will print the mainHolder by breaking 
it up into chunks of 1000 by 1000 pixels per page. I am able to do this and 
then put it into a multi-page PDF. 

THE PROBLEM:
The issue is because the DisplayObject is larger than the area taken by Sprites 
I end up with blank white pages (4 extra pages of nothing).  Is there a way to 
create a mask or something and then compare the mask to the bitmapdata 
underneath to see if any pixel data is any color but white? Or go over the 
entire page to see if any pixels are colored, pixel by pixel and if not then 
throw the page out?

Jason



[flexcoders] Combobox emtpy inside of tabNavigator

2009-07-22 Thread flexaustin
So I have a tabNavigator with 3 tabs. I have set creationPolicy ="all" so that 
to the user it displays quickly. 

The issue that I have a combobox on tab#3 of the tabNav. and when I set 
creation="all" and tab#3 is selected the combobox is empty. If set the 
creationpolicy="auto" the data shows up in the combobox.

I assume that what is happening is that tab#3 is getting created imeediately 
before the data arrives. FYI the data is requested the minute the entire tab is 
shown, which when creation is complete always shows tab #1. Thus I think the 
vbox and its children are getting created without the data.

So I assume some how I need to invalideSize and invalidateProps on the combobox 
when tab#3 is clicked so it will pull in the data?

TIA, J





[flexcoders] Custom datagrid styling

2009-07-17 Thread flexaustin
So I have a custom datagrid named "EdgeEditDataGrid", which i am trying to 
style via my main css file, but it won't style in order to get it to style I 
have to put the styling in locally such as 


  customstyle1:blah
  customstyle2:blah
>
...





Do I need to important the css into my EdgeEditDataGrid.as file or override 
updateDisplayList?





CUSTOM DATAGRID ===

package com.myapp.view.components
{
import mx.controls.DataGrid;
import mx.controls.listClasses.IListItemRenderer;
import flash.display.Sprite;
import mx.controls.dataGridClasses.DataGridColumn;

public class EdgeEditDataGrid extends DataGrid
{
public function EdgeEditDataGrid()
{
super();
}

override protected function 
drawSelectionIndicator(indicator:Sprite, x:Number, y:Number, width:Number, 
height:Number, color:uint, itemRenderer:IListItemRenderer):void
{
   return;
} 
}
}

CUSTOM STYLE IN CSS: ==
EdgeEditDataGrid 
{
   color: #2F2F2F;
   alternatingItemColors: #ff, #efefef;
   headerColors: #CC, #CC;
   horizontalGridLines: true;
   verticalGridLineColor: #cc;
   rollOverColor: #aadeff;
   useRollOver: false;
   verticalGridLines: true;
   
headerBackgroundSkin:ClassReference("assets.style.skins.EdgeEditDataGridHeaderSkin");
   headerStyleName: "mydataGridHeaderStyle";
}

.mydataGridHeaderStyle {
   fontWeight: bold;
   fontSize: 13;
   fontStyle: normal;
   textDecoration: none;
   color: #2F2F2F;
}



[flexcoders] Re: Custom DataGrid with Form for itemeditor (any examples)???

2009-07-13 Thread flexaustin
Any examples of the fake dataGrid?

TIA, J



--- In flexcoders@yahoogroups.com, "Tracy Spratt"  wrote:
>
> Peter Ent did a renderer for list that does something similar:
> 
> http://weblogs.macromedia.com/pent/archives/flex_2/index.html
> 
>  
> 
> But making such a thing for a dataGrid will be harder.  Do you actually need
> the DataGrid(column resize, move, column sort, etc).  If not, you can fake a
> dataGrid using an item renderer in a list.
> 
>  
> 
> Tracy Spratt,
> 
> Lariat Services, development services available
> 
>   _  
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
> Behalf Of flexaustin
> Sent: Friday, July 10, 2009 9:49 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Custom DataGrid with Form for itemeditor (any
> examples)???
> 
>  
> 
> 
> 
> 
> 
> 
> I would prefer not to use a popup, but rather an inline form in the actual
> datagrid row. Just not sure how I would get the inline form to expand across
> all the columns.
> 
> --- In flexcod...@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com,
> niamath basha  wrote:
> >
> > you mean
> > when we click on datagrid row display a popup with a form containing
> details
> > of the selected row
> > and then you can edit, delete the details.
> > 
> > With Regards,
> > Niamath Basha
> > www.niamathbasha.wordpress.com
> > 
> > 
> > 
> > On Thu, Jul 9, 2009 at 10:08 PM, flexaustin  wrote:
> > 
> > >
> > >
> > > Wondering if anyone has ever seen and example of a custom DataGrid
> > > component where you click a row in the DataGrid to edit it and instead
> of
> > > showing a combobox or textfield as an itemeditor you replace the entire
> row
> > > with a form.
> > >
> > > So any row or columns lines would be removed or the form would be
> > > positioned overtop of the row.
> > >
> > > TIA
> > >
> > > 
> > >
> >
>




[flexcoders] Re: Custom DataGrid with Form for itemeditor (any examples)???

2009-07-10 Thread flexaustin
I would prefer not to use a popup, but rather an inline form in the actual 
datagrid row. Just not sure how I would get the inline form to expand across 
all the columns.




--- In flexcoders@yahoogroups.com, niamath basha  wrote:
>
> you mean
> when we click on datagrid row display a popup with a form containing details
> of the selected row
> and then you can edit, delete the details.
> 
> With Regards,
> Niamath Basha
> www.niamathbasha.wordpress.com
> 
> 
> 
> On Thu, Jul 9, 2009 at 10:08 PM, flexaustin  wrote:
> 
> >
> >
> > Wondering if anyone has ever seen and example of a custom DataGrid
> > component where you click a row in the DataGrid to edit it and instead of
> > showing a combobox or textfield as an itemeditor you replace the entire row
> > with a form.
> >
> > So any row or columns lines would be removed or the form would be
> > positioned overtop of the row.
> >
> > TIA
> >
> >  
> >
>




[flexcoders] Custom DataGrid with Form for itemeditor (any examples)???

2009-07-09 Thread flexaustin
Wondering if anyone has ever seen and example of a custom DataGrid component 
where you click a row in the DataGrid to edit it and instead of showing a 
combobox or textfield as an itemeditor you replace the entire row with a form.

So any row or columns lines would be removed or the form would be positioned 
overtop of the row.

TIA



[flexcoders] Modules and Memory usage.

2009-06-29 Thread flexaustin
So I have built a fairly large application that is an extreme memory usage due 
to the graphics it contains (large quantity and high res). 

Right now the app has a single view, but allows the user to switch between two 
views. When the user switches views I wipe out the contents of the first view 
(remove most of the items from memory, but a a few still hang around an wait 
for the GC to remove them). 

I am thinking about making the app be document based, so several views up at 
the same time in a tab navigator. 

My question is, if I use modules for each document view will the document views 
not current displayed, not on the selected tab of a tab navigator use any 
memory or any of the cpu if they are not being displayed and if nothing is 
happening while they are not displayed?

Or would it be better to stick with the single document view I have now?

Also, somewhat related. I learned OOP via Adobe > Flash > Actionscript and have 
recently started learning Obj-C for iPhone development. They say its best 
practice to delete all your vars of object instance from within your functions 
to remove them instead of letting GC remove them.

So something like this in AS3:

public function myASFunction() : void
{
private var house:Object;
private var str:String;
public var txt:TextField;

...do something with the above vars...
house = null;
str = null;
txt = null;

}

Not sure if this is the correct way to remove the vars, but the idea is clean 
up after yourself in each function so the GC doesn't have to do it and then 
that frees up the GC to handle the really important stuff?

TIA



[flexcoders] Datagrid sort function

2009-06-19 Thread flexaustin
Wondering if any has built a custom sort function that can handle a mix of IP 
Addresses and names like so?

Alpha
Beta
Zulu
0.0.0.0
192.168.168.1
192.168.168.11
192.168.168.23
192.168.168.231



[flexcoders] Keydown and IE

2009-06-15 Thread flexaustin
Does anyone happen to know how to shut off keydown events in Javascript if my 
swf has focus? FF works fine, but I can't seem to shut onkeypress or onkeydown 
events off?  Ideally I would like the onkeydown events to not be heard by 
window or document if the swf has focus be hear them if the swf doesn't have 
focus.

TIA



[flexcoders] Dynamic linkbutton icon and embed?

2009-06-15 Thread flexaustin
Wondering if anyone has ever done an a dynamic @Embed for the icon of 
Linkbutton used as an itemrenderer in a DataGrid (DatagridColumn)?







[flexcoders] Re: Sort: Datagrid sorting numbers and strings

2009-06-12 Thread flexaustin
Ok, so I am closer.

If I have this: 

192.168.168.12
192.168.168.129
192.168.168.24
hellokitty
bigsmelly

When sorting I get this (with the normal flex sorting):

192.168.168.129
192.168.168.12
192.168.168.24
bigsmelly
hellokitty


And if I use my own sort function and perform several sorts quickly I get an 
Error:

"Find criteria must contain at least one sort field value "

My sort function:
 
private function testCompareFunc(itemA:Object, itemB:Object):int {
var valueA:String = itemA;
var valueB:String = itemB;
return ObjectUtil.stringCompare(valueA, valueB);
}

Any suggestions? Not sure how to do a string and number comparison.

TIA




--- In flexcoders@yahoogroups.com, "flexaustin"  wrote:
>
> Also the 192.12 are from xml so probably seen as Strings, not numbers. Would 
> that affect it?
> 
> 
> 
> --- In flexcoders@yahoogroups.com, "flexaustin"  wrote:
> >
> > Using the built in sort I get 
> > 
> > angus
> > 192.12
> > 187.34
> > hello 
> > range
> > zoolu
> > 
> > Wonder if their is a space or return before it in the data I am given? Not 
> > sure if that would affect it.
> > 
> > 
> > 
> > 
> > --- In flexcoders@yahoogroups.com, Alex Harui  wrote:
> > >
> > > The standard sort should sort those as:
> > > 
> > > 192.12
> > > angus
> > > hello
> > > range 39.30 - 34.50
> > > zoolu 12
> > > 
> > > What did you want instead?  It will probably require a custom sort 
> > > function
> > > 
> > > Alex Harui
> > > Flex SDK Developer
> > > Adobe Systems Inc.<http://www.adobe.com/>
> > > Blog: http://blogs.adobe.com/aharui
> > > 
> > > From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
> > > Behalf Of flexaustin
> > > Sent: Wednesday, June 10, 2009 8:43 AM
> > > To: flexcoders@yahoogroups.com
> > > Subject: [flexcoders] Sort: Datagrid sorting numbers and strings
> > > 
> > > 
> > > 
> > > 
> > > 
> > > So I have a datagrid that has columns that can contain a number or string 
> > > or both. I was wondering if anyone has seen a sort function that can 
> > > handle this. Below is a sample of the types of data that can be in a 
> > > column.
> > > 
> > > 192.12
> > > hello
> > > angus
> > > range 39.30 - 34.50
> > > zoolu 12
> > > 
> > > Anyway to sort these?
> > >
> >
>




[flexcoders] Re: Sort: Datagrid sorting numbers and strings

2009-06-10 Thread flexaustin
Also the 192.12 are from xml so probably seen as Strings, not numbers. Would 
that affect it?



--- In flexcoders@yahoogroups.com, "flexaustin"  wrote:
>
> Using the built in sort I get 
> 
> angus
> 192.12
> 187.34
> hello 
> range
> zoolu
> 
> Wonder if their is a space or return before it in the data I am given? Not 
> sure if that would affect it.
> 
> 
> 
> 
> --- In flexcoders@yahoogroups.com, Alex Harui  wrote:
> >
> > The standard sort should sort those as:
> > 
> > 192.12
> > angus
> > hello
> > range 39.30 - 34.50
> > zoolu 12
> > 
> > What did you want instead?  It will probably require a custom sort function
> > 
> > Alex Harui
> > Flex SDK Developer
> > Adobe Systems Inc.<http://www.adobe.com/>
> > Blog: http://blogs.adobe.com/aharui
> > 
> > From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
> > Behalf Of flexaustin
> > Sent: Wednesday, June 10, 2009 8:43 AM
> > To: flexcoders@yahoogroups.com
> > Subject: [flexcoders] Sort: Datagrid sorting numbers and strings
> > 
> > 
> > 
> > 
> > 
> > So I have a datagrid that has columns that can contain a number or string 
> > or both. I was wondering if anyone has seen a sort function that can handle 
> > this. Below is a sample of the types of data that can be in a column.
> > 
> > 192.12
> > hello
> > angus
> > range 39.30 - 34.50
> > zoolu 12
> > 
> > Anyway to sort these?
> >
>




[flexcoders] Re: Sort: Datagrid sorting numbers and strings

2009-06-10 Thread flexaustin
Using the built in sort I get 

angus
192.12
187.34
hello 
range
zoolu

Wonder if their is a space or return before it in the data I am given? Not sure 
if that would affect it.




--- In flexcoders@yahoogroups.com, Alex Harui  wrote:
>
> The standard sort should sort those as:
> 
> 192.12
> angus
> hello
> range 39.30 - 34.50
> zoolu 12
> 
> What did you want instead?  It will probably require a custom sort function
> 
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.<http://www.adobe.com/>
> Blog: http://blogs.adobe.com/aharui
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
> Behalf Of flexaustin
> Sent: Wednesday, June 10, 2009 8:43 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Sort: Datagrid sorting numbers and strings
> 
> 
> 
> 
> 
> So I have a datagrid that has columns that can contain a number or string or 
> both. I was wondering if anyone has seen a sort function that can handle 
> this. Below is a sample of the types of data that can be in a column.
> 
> 192.12
> hello
> angus
> range 39.30 - 34.50
> zoolu 12
> 
> Anyway to sort these?
>




[flexcoders] Sort: Datagrid sorting numbers and strings

2009-06-10 Thread flexaustin
So I have a datagrid that has columns that can contain a number or string or 
both. I was wondering if anyone has seen a sort function that can handle this.  
Below is a sample of the types of data that can be in a column.

192.12
hello
angus
range 39.30 - 34.50
zoolu 12

Anyway to sort these?





[flexcoders] Itemrenderers style?

2009-06-09 Thread flexaustin
Below is my custom item renderer, but the styles in my style source do not show 
up when the itemrenderer is used in a datagrid.  I have a tootlip style and it 
shows up every where in the app, but inside the itemrender.

TIA


http://ns.adobe.com/mxml/2009";
styleName="callOutHeader"
color="#00"
maxWidth="270" 
label="{da...@name}"
labelPlacement="left"
toolTip="IP Adress : {da...@ip}"
left="5" 
rollOver="{event.target.setStyle('textDecoration', 'underline') }"
rollOut="{event.target..setStyle('textDecoration', 'none')}">











[flexcoders] httpservice to arraycollection?

2009-06-08 Thread flexaustin
Ok, its late and I am falling asleep.

Can someone be another pair of eyes for me?

If httpservice call with IResponder how can I turn my result object which is 
this:


  \
  
  



to an array or arraycollection?

TIA



[flexcoders] SWOBJECT: no action responded to swfobject

2009-06-05 Thread flexaustin
Not sure if anyone is using ruby on rails and flex, but has anyone see this 
error ( No action responded to swfobject) before?

Can't seem to find anything?  Here is how I am using swfobject.






swfobject.embedSWF(<%= "#...@swf_path}?#{time.now.to_i}".to_json 
%>, "flashDiv", "100%", "696", "10.0.0","/flash/expressinstall.swf" ,   
   {},{wmode: 'transparent'}, {id: "network_map", name: "network_app"} 
);




[flexcoders] Re: cannot convert flash.display::Bitmap to mx.core.IUIComponent.

2009-06-04 Thread flexaustin
thanks again Alex. Yeah, duh, I have to put in an image.




--- In flexcoders@yahoogroups.com, Alex Harui  wrote:
>
> Flex container children must be IUICOmponents.  Bitmap is not.  You can make 
> it a child of a UIComponent or the  source to Image if you want.
> 
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.<http://www.adobe.com/>
> Blog: http://blogs.adobe.com/aharui
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
> Behalf Of flexaustin
> Sent: Thursday, June 04, 2009 9:13 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] cannot convert flash.display::Bitmap to 
> mx.core.IUIComponent.
> 
> 
> 
> 
> 
> Why would I be getting this error?
> 
> http://ns.adobe.com/mxml/2009";
> width="100%" height="100%"
> maxHeight="125" maxWidth="125">
> 
> 
> 
> <![CDATA[
> 
> import flare.util.Displays;
> import flash.display.BitmapData;
> 
> // Take a bitmapdata object and shove it in the bitmapholder canvas
> public function shoveInBitmap( bm:BitmapData) : void
> {
> bitmapHolder.addChild( new Bitmap(bm) );
> }
> // Clear out all children from bitmapholder canvas
> public function clearBitmap() : void
> {
> bitmapHolder.removeAllChildren();
> }
> 
> ]]>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  left="{ (backGroundForZP.parent.width - mainBMPHolder.width) / 2}"
> top="{ (backGroundForZP.parent.height - mainBMPHolder.height) / 2}">
> 
> 
>  height="100%">
> 
> 
> 
>




[flexcoders] cannot convert flash.display::Bitmap to mx.core.IUIComponent.

2009-06-04 Thread flexaustin
Why would I be getting this error?

http://ns.adobe.com/mxml/2009"; 
width="100%" height="100%" 
maxHeight="125" maxWidth="125">



















 








[flexcoders] Re: Text stuck on screen BUG in FP10 or IE7????

2009-06-04 Thread flexaustin
Thanks Alex. Here is what I get. Not sure what this tells me or if I can make 
refresh quicker?

56408
56446
56487
56527
56586
56625
56668
56708
56748
56788
56830
56869
56910
56951
56991
57031
57072
57114
57155
57193
57252
57292
57332
57374
57415
57454
57494
57535
57579
57620
57670
57693
57752
57779
57827
57863

Thanks, J



--- In flexcoders@yahoogroups.com, Alex Harui  wrote:
>
> Doesn't sound familiar.  I'm not sure how you're moving the main sprite and 
> whether the text is within the stage or not.  Trace getTImer() on enterFrame 
> to see how fast the player is refreshing the screen.
> 
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.<http://www.adobe.com/>
> Blog: http://blogs.adobe.com/aharui
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
> Behalf Of flexaustin
> Sent: Wednesday, June 03, 2009 3:48 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Text stuck on screen BUG in FP10 or IE7
> 
> 
> 
> 
> 
> So I have an app that has upto 300 sprites on screen at once and inside each 
> sprite is a textfield with embedded font (all Arial font).
> 
> In IE7, when you move the main Sprite around the sprite/textfield text gets 
> stuck on the screen then eventually disappears. Its like the browser isn't 
> refreshing fast or something. The amount of time it takes for the 
> sprite/textfields to all go away varies sometimes 5 seconds sometimes 30 
> seconds.
> 
> Wondering if its because of the way FP10 handles text now or ???
> 
> TIA
>




[flexcoders] Text stuck on screen BUG in FP10 or IE7????

2009-06-03 Thread flexaustin
So I have an app that has upto 300 sprites on screen at once and inside each 
sprite is a textfield with embedded font (all Arial font).  

In IE7, when you move the main Sprite around the sprite/textfield text gets 
stuck on the screen then eventually disappears. Its like the browser isn't 
refreshing fast or something.  The amount of time it takes for the 
sprite/textfields to all go away varies sometimes 5 seconds sometimes 30 
seconds.

Wondering if its because of the way FP10 handles text now or ???

TIA  



[flexcoders] ZOOM PANEL: like google maps

2009-06-03 Thread flexaustin
Wondering if anyone knows of a tut or component or ??? that I can use to learn 
how to build a Zoom Panel like in google maps (see google maps lower right 
corner).

I am assuming its would be implemented by taking a bitmap snapshot of whats on 
screen and then use a rectangle object in scroll rect or something?

TIA



[flexcoders] Re: httpservice error #2032

2009-05-26 Thread flexaustin
Not sure what the issue is but if I try POST it always goes across as as a GET. 
So I went with GET and I return 'true' as render :xml and it comes back with a 
good result.  And I stuck with the relative URL and it works like a champ now.

Thanks for everyones help.



--- In flexcoders@yahoogroups.com, "Tracy Spratt"  wrote:
>
> I would suspect the URL as well.  Try a full url, I have had a lot of
> problems using relative urls
> 
>  
> 
> And I have never used an http service that did not return something.  It
> would concern me.
> 
>  
> 
> Tracy Spratt,
> 
> Lariat Services, development services available
> 
>   _  
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
> Behalf Of flexaustin
> Sent: Tuesday, May 26, 2009 10:36 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: httpservice error #2032
> 
>  
> 
> 
> 
> 
> 
> 
> --- In flexcod...@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com,
> Dave Cragg  wrote:
> >
> > 
> > On 26 May 2009, at 05:35, flexaustin wrote:
> > 
> > 
> > > _httpservice.url = "/ditto/myfunction";
> > 
> > Shouldn't that be
> > 
> > _httpservice.url = "ditto/myfunction";
> > 
> > Cheers
> > Dave Cragg
> >
> 
> No its /ditto/myfunction. For kicks I tried your idea, but didnt' work.
>




[flexcoders] Re: httpservice error #2032

2009-05-26 Thread flexaustin
--- In flexcoders@yahoogroups.com, Dave Cragg  wrote:
>
> 
> On 26 May 2009, at 05:35, flexaustin wrote:
> 
> 
> > _httpservice.url = "/ditto/myfunction";
> 
> Shouldn't that be
> 
>_httpservice.url = "ditto/myfunction";
> 
> Cheers
> Dave Cragg
>


No its /ditto/myfunction. For kicks I tried your idea, but didnt' work.



[flexcoders] Re: httpservice error #2032

2009-05-26 Thread flexaustin
Not sure if it matters but my app is a rails app and I am doing a POST with the 
httpservice.  I am not returning anything after the call would that appear as a 
fault to my httpservice?  Should I send something back?

TIA

--- In flexcoders@yahoogroups.com, "[p e r c e p t i c o n]"  
wrote:
>
> If you are using a windoze machine you can see the request being handled in
> the command window..i don't think the url is correct
> 
> On Mon, May 25, 2009 at 9:35 PM, flexaustin  wrote:
> 
> >
> >
> > I cannot seem to get my SWF to talk to my rails app. i am getting the
> > following error code:
> >
> > Fault: increment node clicked stat fault[FaultEvent fault=[RPC Fault
> > faultString="HTTP request error" faultCode="Server.Error.Request"
> > faultDetail="Error: [IOErrorEvent type="ioError" bubbles=false
> > cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL:
> > http://localhost:3000/ditto/myfunction";]. URL:
> > http://localhost:3000/ditto/myfunction";]
> > messageId="87ECB54A-4BDB-CF5B-41F0-7B2DEF12A2F7" type="fault" bubbles=false
> > cancelable=true eventPhase=2]
> >
> > Here is my crossdomain.xml file (not sure I need one as my swf is in the
> > app running on localhost:3000).
> >
> > 
> >  > http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd";>
> > 
> > 
> > 
> >
> > Here is my httservice:
> > _httpservice = new HTTPService();
> > _httpservice.url = "/ditto/myfunction";
> > _httpservice.method = "POST";
> > _httpservice.useProxy = false;
> > _httpservice.addEventListener( ResultEvent.RESULT, itemClickedStatsResult
> > );
> > _httpservice.addEventListener( FaultEvent.FAULT, itemClickedStatsFault );
> >
> > Always comes back as a FAULT?
> >
> > Anyone have any advice?
> >
> > TIA
> >
> >  
> >
>




[flexcoders] Re: httpservice error #2032

2009-05-26 Thread flexaustin
Do I need a services-config.xml file as well?


--- In flexcoders@yahoogroups.com, "valdhor"  wrote:
>
> HIn my testing relative URL's don't appear to work. The only way I 
> can get it to work is if I put a complete URL in the url property of the 
> HTTPService object. eg.
> 
> _httpservice.url = "http://127.0.0.1/ditto/myfunction";;
> 
> 
> --- In flexcoders@yahoogroups.com, "flexaustin"  wrote:
> >
> > I don't have a services-config.xml file.
> > 
> > 
> > 
> > 
> > --- In flexcoders@yahoogroups.com, "valdhor"  wrote:
> > >
> > > What does your services-config.xml file look like.
> > > 
> > > According to the documentation "If you specify the url and a non-default 
> > > destination, your destination in the services-config.xml file must allow 
> > > the specified URL"
> > > 
> > > 
> > > --- In flexcoders@yahoogroups.com, "flexaustin"  wrote:
> > > >
> > > > I cannot seem to get my SWF to talk to my rails app. i am getting the 
> > > > following error code:
> > > > 
> > > > Fault: increment node clicked stat fault[FaultEvent fault=[RPC Fault 
> > > > faultString="HTTP request error" faultCode="Server.Error.Request" 
> > > > faultDetail="Error: [IOErrorEvent type="ioError" bubbles=false 
> > > > cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: 
> > > > http://localhost:3000/ditto/myfunction";]. URL: 
> > > > http://localhost:3000/ditto/myfunction";] 
> > > > messageId="87ECB54A-4BDB-CF5B-41F0-7B2DEF12A2F7" type="fault" 
> > > > bubbles=false cancelable=true eventPhase=2]
> > > > 
> > > > 
> > > > Here is my crossdomain.xml file (not sure I need one as my swf is in 
> > > > the app running on localhost:3000).
> > > > 
> > > > 
> > > >  > > > "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd";>
> > > > 
> > > > 
> > > > 
> > > > 
> > > > Here is my httservice:
> > > > _httpservice = new HTTPService();
> > > > _httpservice.url = "/ditto/myfunction";
> > > > _httpservice.method = "POST"; 
> > > > _httpservice.useProxy = false;
> > > > _httpservice.addEventListener( 
> > > > ResultEvent.RESULT, itemClickedStatsResult );
> > > > _httpservice.addEventListener( 
> > > > FaultEvent.FAULT, itemClickedStatsFault );
> > > > 
> > > > 
> > > > 
> > > > Always comes back as a FAULT?
> > > > 
> > > > Anyone have any advice?
> > > > 
> > > > TIA
> > > >
> > >
> >
>




[flexcoders] Re: httpservice error #2032

2009-05-26 Thread flexaustin
Do I need a services-config.xml file as well?


--- In flexcoders@yahoogroups.com, "valdhor"  wrote:
>
> HIn my testing relative URL's don't appear to work. The only way I 
> can get it to work is if I put a complete URL in the url property of the 
> HTTPService object. eg.
> 
> _httpservice.url = "http://127.0.0.1/ditto/myfunction";;
> 
> 
> --- In flexcoders@yahoogroups.com, "flexaustin"  wrote:
> >
> > I don't have a services-config.xml file.
> > 
> > 
> > 
> > 
> > --- In flexcoders@yahoogroups.com, "valdhor"  wrote:
> > >
> > > What does your services-config.xml file look like.
> > > 
> > > According to the documentation "If you specify the url and a non-default 
> > > destination, your destination in the services-config.xml file must allow 
> > > the specified URL"
> > > 
> > > 
> > > --- In flexcoders@yahoogroups.com, "flexaustin"  wrote:
> > > >
> > > > I cannot seem to get my SWF to talk to my rails app. i am getting the 
> > > > following error code:
> > > > 
> > > > Fault: increment node clicked stat fault[FaultEvent fault=[RPC Fault 
> > > > faultString="HTTP request error" faultCode="Server.Error.Request" 
> > > > faultDetail="Error: [IOErrorEvent type="ioError" bubbles=false 
> > > > cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: 
> > > > http://localhost:3000/ditto/myfunction";]. URL: 
> > > > http://localhost:3000/ditto/myfunction";] 
> > > > messageId="87ECB54A-4BDB-CF5B-41F0-7B2DEF12A2F7" type="fault" 
> > > > bubbles=false cancelable=true eventPhase=2]
> > > > 
> > > > 
> > > > Here is my crossdomain.xml file (not sure I need one as my swf is in 
> > > > the app running on localhost:3000).
> > > > 
> > > > 
> > > >  > > > "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd";>
> > > > 
> > > > 
> > > > 
> > > > 
> > > > Here is my httservice:
> > > > _httpservice = new HTTPService();
> > > > _httpservice.url = "/ditto/myfunction";
> > > > _httpservice.method = "POST"; 
> > > > _httpservice.useProxy = false;
> > > > _httpservice.addEventListener( 
> > > > ResultEvent.RESULT, itemClickedStatsResult );
> > > > _httpservice.addEventListener( 
> > > > FaultEvent.FAULT, itemClickedStatsFault );
> > > > 
> > > > 
> > > > 
> > > > Always comes back as a FAULT?
> > > > 
> > > > Anyone have any advice?
> > > > 
> > > > TIA
> > > >
> > >
> >
>




[flexcoders] Re: httpservice error #2032

2009-05-26 Thread flexaustin
I don't have a services-config.xml file.




--- In flexcoders@yahoogroups.com, "valdhor"  wrote:
>
> What does your services-config.xml file look like.
> 
> According to the documentation "If you specify the url and a non-default 
> destination, your destination in the services-config.xml file must allow the 
> specified URL"
> 
> 
> --- In flexcoders@yahoogroups.com, "flexaustin"  wrote:
> >
> > I cannot seem to get my SWF to talk to my rails app. i am getting the 
> > following error code:
> > 
> > Fault: increment node clicked stat fault[FaultEvent fault=[RPC Fault 
> > faultString="HTTP request error" faultCode="Server.Error.Request" 
> > faultDetail="Error: [IOErrorEvent type="ioError" bubbles=false 
> > cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: 
> > http://localhost:3000/ditto/myfunction";]. URL: 
> > http://localhost:3000/ditto/myfunction";] 
> > messageId="87ECB54A-4BDB-CF5B-41F0-7B2DEF12A2F7" type="fault" bubbles=false 
> > cancelable=true eventPhase=2]
> > 
> > 
> > Here is my crossdomain.xml file (not sure I need one as my swf is in the 
> > app running on localhost:3000).
> > 
> > 
> >  > "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd";>
> > 
> > 
> > 
> > 
> > Here is my httservice:
> > _httpservice = new HTTPService();
> > _httpservice.url = "/ditto/myfunction";
> > _httpservice.method = "POST"; 
> > _httpservice.useProxy = false;
> > _httpservice.addEventListener( ResultEvent.RESULT, 
> > itemClickedStatsResult );
> > _httpservice.addEventListener( FaultEvent.FAULT, 
> > itemClickedStatsFault );
> > 
> > 
> > 
> > Always comes back as a FAULT?
> > 
> > Anyone have any advice?
> > 
> > TIA
> >
>




  1   2   3   >