Re: [flexcoders] Re: I just ran software update on Mac OS X, now FB cannot locate the debugger

2008-10-21 Thread Troy Gilbert
 it actually runs MyApp.swf?debug=true
 isnt it supposed to be MyApp-debug.swf ?

In Flex Builder 3, both SWFs have the same name but debug includes
?debug=true.

Troy.


Re: [flexcoders] I just ran software update on Mac OS X, now FB cannot locate the debugger

2008-10-21 Thread Troy Gilbert
 I just ran Software Update, and I am not sure what updates occured,
 but I believe Firefox might have.

No, it's whenever iTunes updates. They use Safari + Flash plug-in for
browsing the iTunes Store. Whenever iTunes updates it forcibly updates
the Flash player (bad updater!). Very frustrating.

Troy.


Re: [flexcoders] Re: I just ran software update on Mac OS X, now FB cannot locate the debugger

2008-10-21 Thread Troy Gilbert
 3) I installed Flash Player 10, and I am getting that error, as well

I've not been able to find a link to a debug Flash Player 10... a blog
I saw suggested that Flash Player 10 is both regular and debug, but I
kinda doubt it (since there's a reference to a debug player for CS4).

I'm guessing we have to wait for the coming FB update to get the debug player?

Troy.


Re: [flexcoders] Re: Every second time I debug my app, Flex closes Safari :(

2008-10-15 Thread Troy Gilbert
 FB on OSX has a lot of drawbacks - on win, the help gets its own
 window (so it doesn't get killed by the debugging), syntax colouring
 works better, images actually appear in design mode all the time, it
 builds a lot faster (iMac in BC spanks my mac pro in OSX), the text
 editor doesn't lag when doing fundamental things like selecting text.
 Oh and I love it when FB seems to get confused and tries to launch a
 debug session but in reality it's just sitting there and waiting to
 time out. At least embedded fonts still disappear on both platforms
 in between compiles for no apparent reason so I don't feel completely
 screwed over.

Just wanted to say, yes. I experience all these issues as well on
OSX. All of my other development tools tend to work better on OSX, but
Flex... nope. I used it for a long time under Parallels, but switching
back and forth between Windows-style keyboard shortcuts and  OSX-style
keyboard shortcuts was driving me crazy. So, I *like* having a native
OSX app... I just don't understand why it has to be crappier than the
Windows version?

And, to add insult to injury, I found that FB3 was *worse* on OSX than
FB2 was... very frustrating!

Troy.


Re: [flexcoders] Re: Efficiency and objects in the display list

2008-10-15 Thread Troy Gilbert
 I've also tried making the components UIComponent based instead of
 using Canvas (as I believe it's a little more lightweight) but it
 doesn't seem to make a huge difference.

I'd have one UIComponent-derived object (Canvas would be fine) as the
parent, and have your 50-60 dynamic objects be Sprites. UIComponent
will bring in a decent chunk of memory per-object for all of it's
management overhead.

If you're having framerate issues, I'd look at
blitting/double-buffering... but if memory is your chief concern, move
higher up the class hierarchy.

Troy.


Re: [flexcoders] Re: Every second time I debug my app, Flex closes Safari :(

2008-10-15 Thread Troy Gilbert
 It would be really nice to have FlexBuilder truly cross-platform.
 Eclipse itself seems to do it reasonably well.

You know, if someone ported FlashDevelop to OSX/Linux, it would really
put the pressure on Adobe to improve their game.

Also, I never use FB as a plug-in to Eclipse. But if I did, are there
features of FB I'd lose as compared to the FB IDE? And if there's not,
how difficult would it be to create an open-sourced FB eclipse plug-in
that accomplished the same stuff (while fixing some of these problems)
since MXML is freely available (and source)?

Troy.


Re: [flexcoders] URLRequest, ByteArray, and the 0 byte

2008-09-30 Thread Troy Gilbert
 Ah, interesting. This seems related, but different. I was just setting
 URLRequest.data to a ByteArray directly. In your case, if I understand
 application/x-www-form-urlencoded correctly, then zero bytes should just
 be replaced with %00. Have you filed a bug? I'd like to add that to my
 Adobe JIRA watch list if so.

It does work correctly if you set URLRequest.data to a ByteArray, but
in my example I was setting URLVariables.data (which could be called
anything, it's just a named property) to a ByteArray, and URLVariables
(apparently) calls toString on each property's value *before*
URL-encoding them, which is the problem. So, not necessarily a bug,
just an undocumented feature of the implementation. Since
URLVariables does the encoding, I expected/assumed (since it wasn't
explicitly documented) it would it encode the ByteArray as bytes, %00
and all.

Troy.


Re: [flexcoders] Loading images fron cache ?

2008-09-30 Thread Troy Gilbert
 Does the URLLoader or URLStreamLoader be able to extract the image
 directly from cache , when images are in cache with expires date in
 the future ?

When the Flash Player is running in the browser it uses the browser's
network stack for all HTTP requests. So, it's up to the browser
whether or not the cache is utilized.

When you use the stand-alone Flash Player, no caching is done.

Troy.


Re: [flexcoders] URLRequest, ByteArray, and the 0 byte

2008-09-29 Thread Troy Gilbert
 The byte array seems to be truncated to the location of that byte. In
 general, any ByteArray sent as a data property payload of a URLRequest
 seems to be truncated to the location of the first zero byte. I've
 confirmed this by checking the Content-Length header of the POST request
 (in fact, if the *first* byte is zero, the request seems to be turned
 into a GET--which is even weirder).

Just ran into a similar issue under OSX/Windows. If I tried to stick a
ByteArray into a URLVariables, no matter what combination of
operations I'd make, somewhere along the line it got converted to a
String and thus truncated at the first zero byte (because I assume
Flash uses null-terminated strings internally).

To fix it, I ended up encoding the data in Base64 before sticking it
into the URLVariables, which I think was actually a win over the
URL-encoding (e.g. %03%38%99...) anyway.

In regards to your POST/GET issue, Flash Player appears to convert
empty POSTs to GETs, which would explain why 0 has the first byte
(thus a zero-length data) would turn your POST into a GET.

Troy.


Re: [flexcoders] URLRequest, ByteArray, and the 0 byte

2008-09-29 Thread Troy Gilbert
 We're also working around this by Base64-encoding, but this is clearly
 less than ideal. It definitely seems like a Flash Player bug. We ran
 into this when doing AlivePDF REMOTE saves (i.e., bouncing the file off
 the server). Do you know when you ran into this, Troy? I tested our
 particular problem on Windows and on OS X last week, and neither had the
 issue.

// this byte array probably needs to be bigger to actually end up
// with a zero-byte in the compressed data
var bytes:ByteArray = new ByteArray();
bytes.writeUTFBytes(This is just some filler text.);
bytes.compress();

// URLVariables automatically encodes its dynamic properties
// using a www-form-url-encode format, i.e. %12%34%56%78%90
var variables:URLVariables = new URLVariables();
variables.username = troy;
variables.action = save;
variables.data = bytes;

// when the request is made, 'variables' is converted to a string
// the nulls in the ByteArray are not escaped, so they truncate the data
var request:URLRequest = new URLRequest(http://mywebserver/myscript.php;);
request.method = URLRequestMethod.POST;
request.data = variables;

// Troy.


Re: [flexcoders] Programming 101: event target

2008-09-24 Thread Troy Gilbert
 I am just wondering why, in ActionScript, the subject of an event is
 called a target? Is it kind of counter intuitive? In Java, it is
 called source, which sounds much more understandable to me.

Best I can figure is it came from some events like mouse clicks which
are targets, but that's certainly outnumbered by events that don't
fit that mold.

Troy.


[flexcoders] Flex Builder Help on Mac falls a bit short

2008-09-11 Thread Troy Gilbert
I began using Flex Builder under Windows (v2) and found the
context-sensitive help, like in all good IDEs, a lifesaver. Under
FB/Win, if I put the cursor under an API function and hit F2, the help
would take me right to the function. And, the help was launched in its
own app/process. Finally, when using the help, if I searched for a
class name the class reference was almost *always* the first hit.

Now, I'm using FB on Mac (v3). The help is far less useful. When I hit
F2, the help goes to the class's page, but doesn't jump to the
function/property/style. Worse, the help uses my default web browser,
so if I'm in the middle of debugging (a common time to need help!)
nothing happens as FB has paused my browser's process (thus new
windows don't pop up). Finally, if I search for something from within
the help I get dozens of results before getting the actual class
(e.g., search for DisplayObject doesn't show the DisplayObject class
until many, many, many pages of results later (I assume... I actually
gave up looking for it in the list).

Is there anything I can do preferences-wise to fix this? It really
strips away this as a feature... It's actually faster for me to google
DisplayObject (which returns the Flex 2 API reference for that class
as the first hit) than it for me to use the built-in help!

Troy.


Re: [flexcoders] Jigsaw Puzzle Component

2008-09-05 Thread Troy Gilbert
 Hi! Im trying to build a jigsaw but Im not very successfull.
 What I tried to do was to load a Bitmap and then use BitmapData and
 FlexSprite.
 Unfortunelly the way I was using (Graphics API), didn't worked, so, I
 would like to ask a few sugestions about it.
 Thanks in advance

I can't find a link right now, but if you google for Flash and Jigsaw
puzzles you'll find a tutorial on building a jigsaw puzzle in Flash.
It's not Flex, but the logic would be the same. I successfully used it
to jumpstart a more robust jigsaw puzzle engine (in AS3). I'd share,
but it was for a client.

Troy.


Re: [flexcoders] Drawing shapes with holes and applyng them as mask in AS3

2008-08-29 Thread Troy Gilbert
 I need to draw a shape with a hole, and need to apply it as a mask to
 an image. Im doing this with Flex. The hole in the mask is
 dynamically created, thats why Im not using flash to draw a movieclip
 as my mask.

I guess the follow-up you posted answers your question, but wanted to
throw in this secret that doesn't seem to be documented anywhere
(that I've seen):

If you draw multiple shapes as part of a single fill operation
(multiple shapes between a beginFill and endFill) the shapes
intersect. This is useful, for example, if you need to create a box
with a circle cut out of it:

graphics.beginFill(0xff);
graphics.drawRect(0, 0, width, height);
graphics.drawCircle(width / 2, height / 2, Math.min(width, height) / 4);
graphics.endFill();

Troy.


Re: [flexcoders] Re: Drawing shapes with holes and applyng them as mask in AS3

2008-08-29 Thread Troy Gilbert
 It works until you apply it as a mask...

It must work as a mask because that's exactly how I use it in my code,
to cut a circle out a box. What results do you get when you use it as
a mask?

Troy.


Re: [flexcoders] Button Rounded Corners TL, BR

2008-08-26 Thread Troy Gilbert
 There's no style for that.  You can create your own skin.

And Flexlib includes an EnhancedButtonSkin that does exactly this
(plus tons of other things):

http://code.google.com/p/flexlib/

Troy.


Re: [flexcoders] Re: Vote or loose! MXML diff sucks, let's change it!

2008-08-26 Thread Troy Gilbert
I'm a bit confused by those telling the original poster to go complain
to Eclipse... Flex Builder is not free. If there's a bug in Flex
Builder, even if it relates to something Adobe didn't develop, Adobe
is certainly responsible for the bugs because they took our money for
an application with a specific set of features (I didn't pay a
discounted price for just a plug-in to Eclipse, I bought a whole app
-- the fact that it's based on Eclipse should make Adobe's job easier,
not my job harder...).

And as evidence that it's not just an Eclipse thing in a component
Adobe didn't develop: the MXML diff is *orders* slower than the AS (or
plain text) compare (another bug that needs to get fixed ASAP) so that
definitely relates to Adobe...

Troy.


Re: [flexcoders] Re: Vote or loose! MXML diff sucks, let's change it!

2008-08-26 Thread Troy Gilbert
 I'm a bit confused by those telling the original poster to go complain
 to Eclipse...

 It sounds to me like you aren't confused, you just disagree. :-)

Touche...

Troy.


Re: [flexcoders] No Scroll Bar in Browser

2008-08-26 Thread Troy Gilbert
 No comment on the wisdom of the default setting.

I agree. I think it's much more appropriate to have your Flex app
scroll with the browser's scroll bars than with a built-in Flex scroll
bar (for full-app scrolling). It's not only a faster/smoother
scrolling experience, it's more in-line with user expectations.

Troy.


Re: [flexcoders] Get all class definitions in a loaded swf ?

2008-08-26 Thread Troy Gilbert
 There is no way to find out the classes in a SWF (not without a lot of
 work).

Really? That's very disappointing. The information is there (the
Player finds it, obviously), and is *far* easier for the Player to
grab than whatever hoops I'd have to jump through... kinda feels like
a hole that needs to be filled. Any chance the API for Flash 10 could
be updated to include this?

Just curious, what would be the lot of work? Do you mean I'd
basically have to parse the SWF's bytecode to grab the info?

 Best option is to put something in each SWF that describes what is
 in it.  You will probably always have to use getDefinition though

I've done this in the past... I had hoped there was a better path I
had just been too lazy to find.

Another route I've taken for SWFs generated by the Flash IDE is to
have a known MovieClip (or the stage) contain instances of the
classes I'm looking for and then just do a reverse look-up on the
children...

Damn, that seems like I'm doing a *lot* of work that would be
incredibly trivial for the Player to do natively (and in fact, must
already do to some degree). What a shame...

Troy.


Re: [flexcoders] Get all class definitions in a loaded swf ?

2008-08-26 Thread Troy Gilbert
 I think it will always be more efficient to do the legwork and put
 descriptions in the SWFs.  Introspection/Reflection APIs generally aren't
 fast.

Reflection APIs generally aren't fast because they're written in the
same language (or run in the same machine, virtual or otherwise) as
the code they're reflecting on. For a *virtual* machine, the host
(i.e. Flash Player) already has to do the minimum reflection work of
getting class names from the SWF before your bytecode is even
executed...

Troy.


Re: [flexcoders] The end of ActionScript 3 as an EcmaScript 4 implementation

2008-08-14 Thread Troy Gilbert
It may not be an EcmaScript4 implementation, but that's just
semantics. ES4 is becoming Harmony, which is a new project with a
unified working group, but it is the continuation of what we know as
ES4.

So, if it makes you feel better, think of AS3 as an early preview of
Harmony! ;-)

Troy.


Re: [flexcoders] Re: Observing collections

2008-08-14 Thread Troy Gilbert
To repeat what someone said earlier, this exact issue is already
addressed quite cleanly by the aforementioned Observe tag (and it's
more advanced version ObserveValue).

I think the Observe/ObserveValue tags are easily useful enough that
their inclusion in BindingUtils (or wherever mx:Binding is kept) would
be an excellent update to the Flex SDK.

Troy.


Re: [flexcoders] The end of ActionScript 3 as an EcmaScript 4 implementation

2008-08-14 Thread Troy Gilbert
 This is not true. Much of ES4, things like packages and lots of other stuff
 is going away.

Sorry, wasn't aware of that. I guess that makes since, though, since
Crockford's focus seems to be on the script focus of JavaScript and
less on developing it as a large scale language (hence the removal of
packages, etc.).

 It is a big step backward caused by microsoft's unwillingness to support ES4
 in Internet Explorer.

I don't quite see how it's a big step backward *or* a black eye for
Adobe (as your blog argued). There are dozens of languages in
widespread use out there... AS3 being (approximately) based on a
standard, while a good bullet point for marketing, never yielded any
advantage as far as I could see.

Troy.


Re: [flexcoders] Re: Observing collections

2008-08-14 Thread Troy Gilbert
 I don't believe either of them would call a function when the contents of a
 collection changes (as opposed to the collection itself). The modification
 Dennis offered would.

Sorry, completely missed the point, didn't I? ;-) You're right, what
you're looking for would be useful as well! ;-) I'll have to take a
look at Dennis' code.

Troy.


Re: [flexcoders] The end of ActionScript 3 as an EcmaScript 4 implementation

2008-08-14 Thread Troy Gilbert
 To me #4 the idea that classes work the old way is also a big deal,
 though exactly what that means I am not entirely sure. AS3 changed its
 class model in what I think was a good way. I'd hate to go back.

I think Harmony is a move in the right direction for moving forward
JavaScript (I agree with Crockford) in the browser. I also agree that
if AS was to blindly follow suit it would be a mistake as well.

Fortunately, I don't see any reason why AS would do such a thing. AS3
has more in common with C# and Java, which is the right way to go for
the direction the product line is headed (Flex, etc.). AS2 mirrors
JavaScript, which I think was appropriate at the time (inside the
Flash IDE).

Troy.


Re: [flexcoders] Re: Observing collections

2008-08-14 Thread Troy Gilbert
 I'm fascinated by what makes sense declaratively, and what doesn't. Flex is
 a great playground for the two styles.

That's exactly why I (and likely you) found the AS3-based event
handler method distasteful (from your original post): you're forced to
do something best expressed declaratively in the imperative language.
I'd like to see Flex become even stricter in this distinction:

- MXML is declarative and best represents *structure*.
- AS3 is imperative and best represents *behavior*.
- CSS best represents *styling*.

The closer we can get to not being forced to muddy the 3 the better
our code will be. This thread touches on a big place where I often
have to muddy MXML and AS3 (view elements reacting to nested and/or
complex model changes).

While I'm on the subject (though it's unrelated to this thread), I'd
love to see Flex really beef up the CSS, allowing for things like
applying multiple styles to a single component (e.g. style=redBox
bigFont instead of just styleName=redBoxWithBigFont), style
shorthands (e.g. padding: 1 2 3 4 instead of paddingTop: 1
paddingRight: 2, etc...), and making more layout properties stylable
(width, height, x, y, left, right, etc.).

Troy.


Re: [flexcoders] Design Patters For Loading Data?

2008-08-12 Thread Troy Gilbert
Check out BulkLoader: http://code.google.com/p/bulk-loader/

It's designed for doing exactly this, as well as handling a lot of
other common cases (like loading SWF, images, etc. and automatically
returning the DisplayObject, etc.). It includes accumulated progress
information, etc. Pretty complete solution for what you're looking for
(and active discussion group).

Troy.


Re: [flexcoders] Re: Filter an ArrayCollection into an ItemRender

2008-07-22 Thread Troy Gilbert
 You need to call collectionData.refresh() when the data property changes for
 the itemRenderer. One way to do it would be:

I always wonder what's the best practice for this. I would think that
collections would have this built into them... why would one want to
put a filter function on a collection and not use it when the
collection was updated/changed? At the very least, it seems like a
good candidate for a flag (refreshOnChange, for example).

 mx:Binding source=data destination=dataChanged/

 then add the method:

 private function dataChanged(data:Object):void {
 collectionData.refresh();
 }

I thought I had seen something like this but couldn't find a mention
of it in the docs for the binding tag... so, destination can be a
method that's called when data is changed? Does it need to be a setter
(like BindingUtils)?

Troy.


Re: [flexcoders] Re: Filter an ArrayCollection into an ItemRender

2008-07-22 Thread Troy Gilbert
 In theory, if you have [Bindable] or [Managed] items in the collection, or
 call itemUpdated appropriately, you do not need to call refresh() again when
 an item's properties change.

I was wondering about the binding of the ArrayCollection itself, not
the elements it contains (which works as expected). I'm wondering if
folks just do what Scott suggested, i.e. add a mx:Binding statement on
the collection and have it call refresh, or is there a different
pattern, something more concise?

For example, if I have a component that needs a filtered view of a
collection, I just pass the collection through a mx:ListCollectionView
first:

mx:ListCollectionView id=filteredCollection
source={myBigCollection} filterFunction={myCustomFilterFunc} /

mx:List dataProvider={filteredCollection} /

The annoyance is that with just that code my filter function never
gets called and my list gets the whole, unfiltered collection. In
other words, refresh() doesn't get called when the source property of
a ListCollectionView changes, just when the *contents* of a
ListCollectionView's source changes.

And that just seems odd to me... and feels like a bad abstraction/API
as it requires me to always wire up some method for calling refresh
when the view's source changes. When would I ever *not* want to
refresh my collection in that scenario? I'd think that specifying a
filter function *implies* you want the view to be filtered, always.

Is Scott's approach the most common idiom for this?

Troy.


Re: [flexcoders] Re: Anyone have a good resource on singletons?

2008-07-21 Thread Troy Gilbert
 I'm trying to find information on using singletons in AS3/Flex. I've
 got an .AS file set up but I'm having issues calling the data/functions
 within that function in other classes. Does anyone have a good resource
 on the web for creating and using singletons?

As others have probably pointed out, it sounds like you may be trying
to use a singleton to solve an architectural issue possibly not best
solved with a singleton. But, if singleton is appropriate...

Don't make it more complicated than it needs to be. Everyone seems to
do that with singletons, which is unfortunate since singletons should
be so rarely used anyway. Just create a class that creates and returns
an instance on first access, then returns that instance on further
access. If you're worried about other developers constructing multiple
instances of your class, then just include a test in the constructor
and have it throw an error or assert.

Don't worry about making it *impossible* to create multiple
instances... it's just not worth the effort. If people are determined
to use your classes incorrectly and disregard warnings and errors,
etc, then they're digging their own grave.

Here's the implementation I use:

public class Singleton {

  private static _instance:Singleton;

  public function get instance():Singleton {
if (_instance == null) _instance = new Singleton();
return _instance;
  }

  public function Singleton() {
if (_instance != null) throw new Error(This class is a singleton.
Instance already created.);
  }
}

Troy.


Re: [flexcoders] Customizing TreeItemRenderer

2008-07-10 Thread Troy Gilbert
So, is TreeItemRenderer really that much of a black art? Has no one
done any interesting modifications of that component? Maybe a good
indicator that it's a hard to customize component?

Maybe this would be a good opportunity for a solid Adobe tut on the subject...

Troy.


Re: [flexcoders] Why are icons typed as Classes and not just class factories?

2008-07-09 Thread Troy Gilbert
 Factories came late to the party and we couldn't retrofit everything.  One
 of the things we wish we could do-over.

Understood. Anyone done the dirty work of allowing dynamic classes
to be created? Seems like it'd be entirely doable by generating the
bytecode for a class, giving it a unique name, and de-serializing it
with a ByteArray (kinda like the tricks folks employed for dynamic
sounds in v9 player).

Also, as a complete aside, if there a way to get the Class of an
instance? I'm thinking something like this:

var c:Class = ClassUtils.getClass(someVar);

Troy.


Re: [flexcoders] Using Flex as a Flash IDE

2008-06-13 Thread Troy Gilbert
To all those suggesting FlashDevelop... yes, if I were using Windows
I'd be using it, no doubt. But I'm on a Mac. I've been using TextMate
and love its editing, but miss code-completion and automatic imports,
etc.

Troy.

On Thu, Jun 12, 2008 at 9:32 PM, Fajar S [EMAIL PROTECTED] wrote:
 if you using a Widows you can try flashDevelop its free IDE for Flash, Flex
 and other related programming language. http://www.flashdevelop.org/

 Fajar Sylvana
 New Media  Motion Graphic Artist
 http://fajarsylvana.wordpress.com/


 --- On Fri, 6/13/08, Hemadri S [EMAIL PROTECTED] wrote:

 From: Hemadri S [EMAIL PROTECTED]
 Subject: Re: [flexcoders] Using Flex as a Flash IDE
 To: flexcoders@yahoogroups.com
 Date: Friday, June 13, 2008, 2:46 AM

 Hey Troy,

 Using FlexBuilder 3 to debug  edit Flash CS3 projects Check out this link
 http://hemadri. info/tutorials/ FlashCS3FlexBuil der3Demo. htm
 --
 Hemadri

 On Fri, Jun 13, 2008 at 1:07 AM, thirtyfivemph troy.gilbert@ gmail.com
 wrote:

 So, I've been doing some contract work lately that requires that I use
 Flash instead of Flex (the deliverables have to be FLAs that they can
 hand off the designers to re-skin, publish, etc.). Surprise, surprise,
 I'm finding the Flash IDE to be a little less than ideal.

 Does anyone have any recommendations (or any blog posts to point me
 at) that may describe a pretty functional setup where
 building/publishing is done and Flash but editing of AS3 is done in
 Flex? I wish Adobe would just do a clean integration between the two
 (you know, something like a preference in Flash to designate Flex as
 the IDE instead of its built-in IDE) -- it'd certainly sell more
 copies of the two!

 Troy.



 


Re: [flexcoders] Re: Extra pixels on right side of TileList.

2008-06-13 Thread Troy Gilbert
I'm not sure if it applies in this case, but TileList definitely has
some bugs in its measuring and layout code (or at least did in Flex 2
-- not sure if they fixed it). In particular, when calculating its
preferred width it basically does (itemRenderer.width + horizontalGap)
* numColumns. That's one extra horizontalGap in there... possible the
extra space you're seeing on the end?

In several pixel-perfect layouts I've had to actually *not* use
TileList because of the bug... though at the time I wasn't aware of
the technique of monkey-patching (where if you create a class in the
project that matches a class in the SDK the project class overwrites
it), which would eliminate the need to modify the SDK source (which I
generally avoid).

Troy.


On Fri, Jun 13, 2008 at 7:31 AM, Amy [EMAIL PROTECTED] wrote:
 --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 MXML is not HTML. I don't remember seeing a specification of
 columnCount or width of the TileList in pixels. You could be seeing
 round-off error or simply that the computed width of the tile doesn't
 fully cover the TL.

 The columncount is 7. Would tweaking the size of the itemrenderer help?

 


Re: [flexcoders] Re: Flex Credit Card Processing

2008-06-13 Thread Troy Gilbert
Flex using HTTPS is as secure (and is equivalent) to an HTML page
using HTTPS. So, if you're basically creating the equivalent of an
HTML FORM in Flex, then it's perfectly suite (and is equivalent as far
as the backend is concerned) to doing the same thing in HTML.

So, for example, if you use something like PayPal's API (which they
PHP bindings for) and basically just submit a bunch of post vars (over
HTTPS) to your backend PHP, it would operate identically to the
equivalent HTML FORM.

Troy.


On Fri, Jun 13, 2008 at 8:08 AM, tspyro2002 [EMAIL PROTECTED] wrote:
 Thanks Pat,

 I would be processing the payments via PHP as the rest of the site
 utilizes it and a mySQL DB. Is it enough then for the Flex app to be
 accessed via HTTPS - will this make it secure enough?

 Sorry if I'm asking stupid questions - although I have developed Flex
 applications in the past I have never incorporated or used a Payment
 System in a site before.

 I agree that the pop up window is a bad idea and didn't want to go
 down that route. Wherever possible I want to keep the user in the Flex
 sandbox.

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

 I wouldn't use Flex to process credit card - I would use your
 backend server
 like ColdFusion or PHP. You send the CC info to the server over
 SSL/Encrypted and then the server will post to the processor. I use
 authorize.net and I have never had a problem. There are CF tags out
 there
 for doing it, and all you do is fill in the blanks. Some of the
 things you
 pass are the login and password, hence you don't want that stored in the
 Flex app that can be decompiled. When it comes to peoples money,
 you need
 to be as careful as possible.

 There are other solutions, where you can pop open up a webpage and
 pass info
 to it (like your account # and the amount to charge, etc) and the
 end user
 is filling out the CC info on a different site - then you get an
 email that
 it happened and you ship the product. However, this makes your
 company feel
 small and you lose orders because people get scared off.

 Anyway, use the server technology to do the processing, and never leave
 anything dangerous in your Flex app. Just my 2 cents.

 Thanks
 -Pat
 www.datanotion.com


 On Thu, Jun 12, 2008 at 12:00 PM, tspyro2002 [EMAIL PROTECTED]
 wrote:

  Hi,
 
  Can anyone point me in the direction on how to process Credit Card
 payments
  with Flex, Im I
  right in thinking that it will use an API, HTTPS and a Merchant
 Account
  with a bank?
 
  Would it be possible to create a custom script to post variables to a
  WorldPay or similar
  vendor.
 
  Cheers,
  David
 
 
 


 


Re: [flexcoders] Re: Using Flex as a Flash IDE

2008-06-13 Thread Troy Gilbert
 Is there any documentation on how to use [FlashDevelop] with Flex? I couldn't 
 find
 any.

Google flashdevelop flex... there's plenty of unofficial
documentation. Also search the flashdevelop.org website/forum and
you'll find plenty of discussion on it as well.

Troy.


Re: [flexcoders] Re: Extra pixels on right side of TileList.

2008-06-13 Thread Troy Gilbert
 I couldn't find a horizontalGap property on TileList, and trying to
 manually add a tag when the code hinting said no just resulted in a
 compiler error.

Sorry, strike all my FUD about TileList... I was think of Tile (which
I was using inside of a scrollable container to get a smooth,
fractional TileList).

 Could you tell me a bit more about monkey patching? Where does the
 file need to be, and how do you get it to be picked up as if it were in
 the mx namespace?

Google flex monkey patching and you'll find some good resources.
Basically, if you create a class with the same package structure as
the one in the SDK you want to replace (e.g.,
MyProject/src/mx/containers/TileList, or whatever) it'll override
anything in a linked library.

I had to do this with the DragManager (actually DragProxy) in order to
get it to respect the mouseEnabled flag and to handle it equivalently
to what the Flash Player does (which would make since, given that
DragEvents are sub-classes of MouseEvents).

Troy.


Re: [flexcoders] Thinking about going to the dark side....Apple Mac Book

2008-06-04 Thread Troy Gilbert
 How many Flex developers here are using a Mac for development?

I, too, was a diehard MS guy (not a fanboy, just used many of their
products) up until I got a MBP in June 2006 (first generation with
Intel chips). I used Parallels because many of my tools were Windows
licenses -- actually, it was just my Adobe tools, Flex 2 and CS2, and
I used them at home on a desktop machine.

But now, I basically do all of my dev work on my laptop and, with Flex
3 and CS3, moved all of my licenses to the Mac (which for Flex is
included, but for CS required some *very* painful steps). I couldn't
be happier.

Of course, I still play games on my desktop PC... I messed with
Bootcamp originally but haven't touched it in its final form
(Leopard), where I'm sure it works better.

I'd go with the MBP for any kind of dev machine: the faster hard drive
and additional memory are the two resources that will most benefit
your build times. I sometimes wish Flex Builder was more Mac-like on
the Mac, but I guess it's useful that it's virtually identical to
working under Windows (both the good and bad).

Troy.


Re: [flexcoders] The different between generial Flex 3 and Flex 3 Profesional?

2008-06-03 Thread Troy Gilbert
 It sounds very heroic. I'll keep and eye out for further enlightenment.

Is this forum a philosophical debate or a support list for a
technology? Come on, Paul... bothered by Scott's presence? Come on,
we're writing webapps, not planning federal monetary policy or
surgical regimens. There are no ethical dilemmas at play.

If Flash didn't have such a clear lead in the market (currently) I'd
swear you were suffering from an inferiority complex over your
technology loyalties. ;-)

I used to work as a technology evangelist / field engineer. I
certainly didn't have a *blind* loyalty to my company's technology
and, as a pragmatic programmer, accepted and admitted that it was not
the right fit for all users all the time (or even most of the users
most of the time). We're not marketing borg, we're engineers, we're
practitioners. All (most) of us are here on this list because we've
got a job to get done, not because we're drinking Adobe (or MS)
kool-aid.

Troy.


Re: [flexcoders] The different between generial Flex 3 and Flex 3 Profesional?

2008-05-31 Thread Troy Gilbert
 Overreacting maybe, but not silly. Microsoft has many years of playing
 nicely ahead of them before they get benefit of the doubt.

We don't have to give MS the benefit of the doubt... just Scott. And
over the last year or so, I've not seen anything from Scott that would
suggest we should give him anything *but* the benefit-of-the-doubt.

Looking over the thread what I see is Flex developers stating facts
about Silverlight that weren't true, the Silverlight PM correcting
those errors, and then multiple Flex developers accusing the PM of
marketing as well as directly insulting his employer and product.

Sorry to tell you guys, but MS is looking classy here, and Flex
(developers) is looking slummy.

We're better than that. Let's drop it.

Troy.


Re: [flexcoders] The different between generial Flex 3 and Flex 3 Profesional?

2008-05-30 Thread Troy Gilbert
 Just for a moment I thought this was the flex coders forum rather than an
 extension of the MS marketing effort..

Okay, be nice, it's on-topic... the thread had lead to a question of
whether it was possible to develop in Silverlight for free (in the
same way its possible to develop in Flex for free). Scott was able to
provide an authoritative answer on that, which is good, because it was
suggested that it was not an option and that one would have to
purchase Expression. I think the marketing effort in Scott's e-mail
was little to non-existent.

Troy.


Re: [flexcoders] The High Score Problem

2008-05-29 Thread Troy Gilbert
This has been debated *eternally* in game circles since the advent of
networked games, and I've followed these discussions for at least the
last decade. The conclusion is always the same and is not disputable:
in a broad-based, open competition (such as a web-based game for
prizes, e.g. a casino website) you *absolutely* cannot trust the
client no matter how many layers of encryption (which is designed for
and protects against man-in-the-middle attacks) and obfuscation (which
only slows, not stops) you apply.

Sure, those are a lot of suggestions for whacky obfuscation
techniques (the statistical stuff is not useful as Tom pointed out),
but ultimately that only slows. And really, if you're going to use
obfuscation *please* invent your own, otherwise it's ineffective as
obfuscation. Built it out of standard pieces (MD5 hashes, time
windows, etc.) to make the implementation easier -- because you'll
have to change it eventually.

With the web, if you have a game that's at all popular *and* has a
prize worth cheating for (or rather, worth *preventing* cheating for),
then your energy is best spent trying to (a) work out *some* way to
validate a score server-side that doesn't involve *trusting* the
client, and (b) plugging in an obfuscation system that can be swapped
out trivially and routinely.

If security is *critical* then you'll need to run all the
score-affecting logic on the server as I outlined earlier. If security
is merely *important* and/or it's not possible to run all the logic on
the server (such as an action game), then I'd go with a variation on
the rotating, randomized obfuscator module I outlined earlier. Here's
a variation on that:

1. Break out all of the score-centric game logic into an independent
module (SWF). Make sure that anything that can affect the score
(timing included!) is contained in that SWF. Hopefully this SWF will
be fairly compact (it won't contain art assets or a lot of UI code,
nor should it require any Flex framework stuff, etc.).

2. Write an obfuscation algorithm (encryption, hashing, shuffling,
zipping, ROT13, whatever...). In fact, write as many as you can (I'd
recommend at least a dozen). You'll need to create server-side
equivalents of these as well (to verify the results).

3. Compile one version of your scoring SWF for each obfuscation algorithm.

4. For each scoring SWF, run it through something like SWFEncrypt to
complicate decompiling as much as possible. It's not perfect, but
it'll lower the number of script-kiddies out there who can attempt to
crack it.

5. When the game loads up on the client-side it needs to connect to
the server when a new game is started (not a new session, but each new
game, i.e. each time the score is reset to 0). The server logs the new
game starting, selects one of your obfuscation algorithms, assigns it
a randomly generated unique ID, and passes it back to the client. Even
better -- and I don't know if this is possible, but it *should* be,
don't use SWFEncrypt on the scoring SWF until right before you send it
to the user and have SWFEncrypt use a different seed value for its
obfuscation; this ensures that the SWF's checksum (or any other
fingerprinting the user could do on the SWF) can't be used to detect
repeats in the selected scoring SWF.

6. The client uses the scoring module for the duration of their game.
At the conclusion of the game, the scoring system returns its
obfuscated result back to the server.

7. The server receives the response, looks up which obfuscation
algorithm was used for that client (based on the unique ID generated
in step #5), and it decodes the result.

This method has several advantages:

- The client can't prepare ahead of time to fake the obfuscation
because it's randomly selected and (ideally) unrecognizable in binary
form (CRC of the SWF, etc.).

- The hacker's only recourse is to attempt and reverse-engineer the
SWF during the game time window. If you've got a game that can't be
run on the server because it's too real time then it's likely your
time window is going to be small enough that reverse-engineering isn't
feasible.

- If the hacker hammers your server trying to collect all of the
possible obfuscation algorithms, you can attempt to only send a random
sub-set of your algorithms to any given IP to prevent/slow the hacker
from sharing their results. Ideally, you would SWFEncrypt on the fly
with a random seed so that the hacker would have to invest a large
amount of time not only determining which obfuscation algorithm each
new scoring module used but how many scoring modules there are in
total (which, without the random seed or IP subsets would be possible
without reverse-engineering).

Troy.


Re: [flexcoders] The High Score Problem

2008-05-29 Thread Troy Gilbert
 don't use SWFEncrypt on the scoring SWF until right before you send it
 to the user and have SWFEncrypt use a different seed value for its
 obfuscation; this ensures that the SWF's checksum (or any other
 fingerprinting the user could do on the SWF) can't be used to detect
 repeats in the selected scoring SWF.

Just checked SWFEncrypt's site... the algorithm they use produces a
differently encrypted SWF (and thus completely different
bytecode/checksums) each time you run it on a SWF, so this feature is
actually built into their product automatically.

Unfortunately, SWFEncrypt only runs on Windows/OSX, which rules it out
for the more common LAMP setup on the server, but shouldn't be too big
of a deal. If you're needing this kind of security (because you've got
cash prizes, for example), then having a secondary Windows/OSX machine
attached to the server that *only* handles encryption of SWFs would be
reasonable cost-wise and probably smart for the efficiency of the
server setup (since I'm sure encrypting is not an instantaneous
thing).

Troy.


Re: [flexcoders] The different between generial Flex 3 and Flex 3 Profesional?

2008-05-28 Thread Troy Gilbert
 I believe it has a 'non compete' clause, but we're not looking to use a single
 platform solution regardless of cost.

It may, it may not. Doesn't really matter, though. If you made a
product that competes with an MS product then realistically you can
afford to pay $150 to purchase a commercial version of the compiler.

 Isn't 'Expression studio' required for Silverlight, at some cost ?

I wasn't thinking specifically Silverlight (just .NET), and don't know
if Expression Studio is required. I'd doubt it, as that would slow
adoption down incredibly which would be counter to MS's goals. But I
was only speaking to .NET...

Troy.


Re: [flexcoders] Dictionary bug

2008-05-28 Thread Troy Gilbert
 XML read/write is much slower than access of other class instances.  If
 you're going to do lots of reading and writing, I would consider converting
 the XML data to object data.

As an aside, is there any reason why Adobe hasn't provided API for
serializing to/from XML and typed-objects? This certainly exists in a
lot of other major platforms (ahem, .NET), and it'd be incredibly
useful since we're dealing with web services all the time, etc...

Troy.


Re: [flexcoders] Dictionary bug

2008-05-28 Thread Troy Gilbert
 Dammit, why didn't I think of strings to one-entry dictionaries? Genius!
 Alex, that's why you're the judge, and I'm the law.. talking.. guy :)
 Collecting the empty dictionaries would be a pretty simple job to do on a
 timer using something similar to your background thread code too.

I think Grant Skinner may have create a general purpose weak reference
class that does just this. Go check out his blog...

Troy.


Re: [flexcoders] Dictionary bug

2008-05-28 Thread Troy Gilbert
 We have mx.rpc.SimpleXMLDecoder, and some undocumented decoders as well.

But those just convert to/from generic objects, right? I'm talking
about typed objects (for best performance). All the examples I see
with SimpleXMLDecoder go to/from generic objects.

I'd actually be cool with code generators, even (that's how .NET
addresses it). I think Flex is really needing these types of tools
(and was hoping Flex 3 would deliver them). I should be able to write
a single schema that then generates classes with XML serialization
automatically.

In fact, I *should* be able to write a single schema and then have a
code generator that creates the AS3 model classes, server-side classes
(Java, PHP, Ruby, etc.) *and* SQL queries to create the table. Kinda
like RoR's migrations (but with the necessity of client-side classes
as well). Basic DRY stuff.

I wish my job would afford me the time to write these tools myself! ;-)

Troy.


Re: [flexcoders] The High Score Problem

2008-05-28 Thread Troy Gilbert
 Take a screenshot with the score and base-encode it, take a digest
 (signature) of the whole of it with the score plus some 'secret sauce' as a
 seed value and then send the lot of it to your server and re-run the process
 to see if what you received is valid. To add an extra hurdle – you could
 watermark the image with the server time and limit the submission window to
 say… 5 minutes from the end of the game.

That wouldn't work at all. First, anything your Flash client code does
can be done by a hacker's client. The client cannot be trusted, no
matter how complicated you make it. Any of the aforementioned ideas
would be excellent deterrents for most hackers. The above technique
would require a great deal of RD on the server-side but would be even
easier to fake on the client-side.

 On the point of score validation… scores in any video game are inversely
 exponential – any score that deviates from the mean curve can, with a high
 degree of certainty, be flagged as invalid. In order to do this correctly
 you should be keeping total game time (y axis) and the total score (x axis).

I'm not sure how you can say that scores in any video game are
inversely proportional. What about a golf video game? ;-)

Troy.



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



Re: [flexcoders] Re: unable to bind to property warnings binding to read-only properties

2008-05-20 Thread Troy Gilbert
 We don't recommend putting curly braces around the values of event
 attributes like creationComplete... that makes it look like databinding even
 though it isn't.

And to finish Gordon's thought: event attributes are already
interpreted by the compiler as AS code, not values, so they're
unnecessary, whereas non-event attributes are interpreted as values.

Troy.


Re: [flexcoders] Re: Custom Cursors causing slowdown

2008-04-25 Thread Troy Gilbert
 Just getting back to this, would you recommend upping the framerate on
  the application then or just put up with the slow cursors. I'm just
  conscious that upping the framerate will up the CPU usage slightly
  with Flex but I haven't seen much research into how much difference it
  will make.

I'd up the framerate. If you're building a standard Flex app (built
largely with standard Flex UI components), then you shouldn't see much
of a bump in CPU usage as most the UI doesn't do any per-frame work
unless its animating.

Plus, if you're putting the results in a web browser, most of them
will already be throttling the Flash player, so it shouldn't make your
machine unresponsive (Flash's CPU usage is pretty low priority).

If I have any animated effects/transitions or a lot of drag-n-drop, I
up my Flex's framerate to 100. It won't run that fast under any
current platform/browser configuration (50 is about as high as I've
seen), but 100 is a nice round number. Others may have a better
educated reasoning for using a different number.

Troy.


Re: [flexcoders] Bindable metadata too smart for its own good!

2008-04-25 Thread Troy Gilbert
 [Bindable(someEvent)] then you can control what happens inside the setter.

Ah, so if specify the event name, then bindable truly is just
metadata, no code-generation, right? That sounds like the info I was
looking for...

Troy.


Re: [flexcoders] Bindable metadata too smart for its own good!

2008-04-25 Thread Troy Gilbert
  Ah, so if specify the event name, then bindable truly is just
  metadata, no code-generation, right? That sounds like the info I was
  looking for...

Which leads me to think, what exactly is bindable doing for me at that
point? If I'm firing the event (and thus creating it), is the metadata
just helping the compiler issue a warning about bindings not firing
for given properties? Is there anything else I'm getting? Do I get
code-complete on the bindable event or anything like that (like I'd
get if I added an Event metadata)?

Troy.


Re: [flexcoders] Bindable metadata too smart for its own good!

2008-04-25 Thread Troy Gilbert
 In that case, the bindable(someEvent') tells the binding code which event
 to listen for before updating anything depending on that property.

Gotcha. Good to know about the code generation.

Here's a question for ya:

If you let Flex fill-in all the binding code (if you don't specify an
event name), it dispatches a PropertyChangeEvent with all the details
(property name, oldValue, newValue). If you specify the event name, it
doesn't seem to require that the event dispatch actually be a
PropertyChangeEvent. Ergo, I'm guessing the binding the mechanism only
listens for a particular named event and doesn't actually care about
the data of that event, i.e. the property name, oldValue, newValue?
Obviously, those details are useful for more complex situations where
you're listening for a specific property change, but I'm guessing the
binding mechanism is just needing a trigger (which basically tells the
binder to get the property value again)?

Troy.


Re: [flexcoders] Event.MOUSE_MOVE poor performer

2008-04-22 Thread Troy Gilbert
 Why is Event.MOUSE_MOVE such a poor performer when trying to get a sprite
 follow the mouse?

Can you provide some more details on what poor performance you're
seeing? Is the event not firing often enough? Is it not firing when
you think it should be? How are you trying to get your sprite to
follow the mouse?

Troy.


Re: [flexcoders] flashvars issues

2008-04-19 Thread Troy Gilbert
  It seems to keep dying, any ideas?

Where does it die? Have you stepped through the code in a debugger?
Does it successfully connect and then fail, or does an exception get
thrown prior to that? Its much easier for you to see the problem on
your end when you step through the debugger.

A few issues, perhaps one of them addresses the problem:

  var service:HTTPService = new HTTPService;

In AS3, you really should use constructors like this:

var service:HTTPService = new HTTPService();

Constructors are functions, and as such should have open/close parens on them.

  service.url = {getsite()};

Binding doesn't work like that. Curly-brace binding { } can only be
used in MXML attributes, not inside of script blocks (or .as files).
That line should be rewritten as:

service.url = getsite();

In this situation, binding is probably not appropriate anyway (the
value doesn't change during the lifetime of the application) and
wouldn't work anyway as the binding would have no idea when it should
fire because you've just given it a function... it'll execute the
function once at startup (if used correctly in MXML), but after that
it won't know when the function would return a different value.

  service.addEventListener(result, httpResult);
  service.addEventListener(fault, httpFault);

You really should be used the ResultEvent.RESULT and FaultEvent.FAULT
constants for the event types instead of the string literals. Makes
the code easier to maintain, improves readability, etc.

  var result:Object = event.result;
  myXML = new XML(result);

FYI, you don't have to copy event.result into result:Object before
passing it to the XML constructor. You could just do:

myXML = new XML(event.result);

  var faultstring:String = event.fault.faultDetail;
  Alert.show(Unable to get site.);

If you don't want to mess with the debugger, you should at least
include the contents of the error message in your alerts:

Alert.show(Unable to get site:  + event.fault.faultDetail);

Troy.


Re: [flexcoders] Re: Custom Cursors causing slowdown

2008-04-16 Thread Troy Gilbert
  On that thought I was just wondering if it was possible to use the
  ExternalInterface to do this? By maybe setting a classname on the
  Flash object via JavaScript... hm

Already tried that (there's another thread where I raise this issue).
The Flash Player dictates it's own cursor and CSS doesn't seem to
apply. I thought it was a brilliant idea for a hack, though!

I was wondering if anyone knew of an official source of browser
cursors, say what Firefox uses across platforms (though they just may
be the native equivalents). CSS references always contain example
images, but I'm unsure about just snagging those for legal reasons.
Googling didn't really provide anything useful.

Troy.


Re: [flexcoders] Letting parents handle drag events

2008-04-16 Thread Troy Gilbert
 Is there a reason you can't use capture phase listeners?

I definitely can, and that's the solution I'm going to use. It just
didn't occur to me because:

a) I was working in MXML and was just attaching listeners using attributes.

b) DragEvent inherits from MouseEvent, which to me at least, implies
that it behaves like MouseEvent, which means a default of bubbling
(even though the MouseEvent constructor indicates the default is to
not bubble, which I assume is just in keeping with Event's
constructor's default arguments).

So, my problem is now solved... I just think both of these issues
should be raised somewhere officially so others don't bang their
head on it quite as much as I did. The two points that need to be
made:

- MXML event attributes are added with the defaults, which means *not*
the capture phase.

- DragEvents don't bubble like MouseEvents, so if you need to get them
higher up the hierarchy you have to capture them.

Troy.


Re: [flexcoders] Passing query vars to debug url?

2008-04-16 Thread Troy Gilbert
 Go menu, Run, Run, Other.  Select the app you want to work with. Uncheck
 UseDefault, and add your parameters to the Debug line.  Apply, then debug.

I remembered that dialog right after I posted... and made the changes
exactly as you described. Thanks.

 I would like a way to have multiple startup configurations for the same app,
 but have not found how to do that.  Maybe creating a wrapper for each
 configuration would wok.

You can do that, actually... when I ran across this dialog previously
I had unintentionally created some additional debug configurations...
can't remember how I did it, but there should be somewhere in the UI
that you can add a new configuration (and it then appears in the list
along-side each app).

Troy.


Re: [flexcoders] Re: Custom Cursors causing slowdown

2008-04-16 Thread Troy Gilbert
 Here's a gallery of the default cursors for Windows (IE  Firefox) for
  the various CSS properties:

Yeah, I've seen that one and various others. But they're screen
captures from actual apps, and I don't know what the legal issues may
be (however minor).

For now, I just grabbed the ones Adobe provided (I just needed an
open/closed hand) in their Flex Interface Guidelines example, Pan and
Zoom.

BTW, does anyone at Adobe know where you guys got those from? Just
re-created them from a screen capture or similar?

Troy.


Re: [flexcoders] Re: graphics object seems to degrade performance

2008-04-15 Thread Troy Gilbert
  I am wondering, though, if I would get this for free if I used
 DisplayObject and the built-
  in drag events. I am also wondering, if I am saving that much in terms of
 memory and
  speed, by rolling my own as it were.

If you make each draggable item (each shape) its own DisplayObject
then yes, you'll get some optimizations for free, such as bitmap
caching. You'll also get the benefit of the fact that the drawing
loop is at least written in native code (the display list), and may
even have some additional optimizations helping you depending on your
specific dataset (dirty rectangle lists, etc.).

Finally, by making each object a DisplayObject instead of managing the
shapes yourself, you get a huge amount of features for free, such as
alpha, filters, sort order, scaling, rotation... all those nice,
native things DisplayObjects do.

Troy.


Re: [flexcoders] Re: MVC - Philosophical question

2008-04-15 Thread Troy Gilbert
  I you're talking more generically about the Model of MVC, I do not
  agree.

If your URL is an *implementation* detail of your service (which they
are in most cases), then it should be part of your service layer and
*not* part of the model.

If your URL is a user-centric piece of data, i.e. a web browser's
address bar, bookmarks, or user-configurable endpoints for your
services, then it should be a part of the model.

Troy.


Re: [flexcoders] Custom Cursors causing slowdown

2008-04-15 Thread Troy Gilbert
  I wondered if anyone else had experienced similar issues?

What you're seeing is your app's actual framerate. Nothing is going
slower. Here's why...

If you don't specify any custom cursors, Flash just uses the OS's
cursor and let's the OS do its standard thing of drawing it (which all
modern OS's do as a very high priority process, usually part of the
video driver, so that the mouse is always responsive).

When you specify a custom cursor, the Flash Player actually does
something tricky (some may say hacky!). It hides the OS cursor (when
the mouse is over the Flash Player) and instead moves a DisplayObject
around the stage tracking the mouse's position.

So, with the default cursor you're using the OS to draw the cursor;
with any custom cursors, you're using the Flash Player API to draw it.
The most obvious effect (if you're app is not performance intensive)
is that the mouse will only update at your app's framerate, which for
Flex defaults to 24fps (much lower than any modern OS's mouse
refresh).

Personally, I think Adobe should provide a cursor API that's
implemented as a native OS cursor (provide a bitmap of a fixed
resolution, for example). At a minimum, I think the Flash Player
should expose a collection of native cursors that map to the browser's
native cursors. It's rather irritating that I have to track down and
embed a hand-grab image, a resize image, etc., in order to have what
are virtually universal cursors under any OS (and mine won't match the
OS!). This is one area where AJAX apps are superior.

Troy.


Re: [flexcoders] Re: MVC - Philosophical question

2008-04-15 Thread Troy Gilbert
  I've always viewed the service layer as part of the model. It exposes
  model functionality through an API.

I don't know if its right or wrong, but I tend to adhere more to a
MVCS style of architecture, or even Model-Presentation-Service
architecture.

I could certainly see the view that the service is part of the model,
particularly if your model deals with the service level as a first
class citizen -- like I mentioned about bookmarks, web browsers, etc.

But, if the service layer just exists as a practical element in order
to get bits from one box to another, then its not really part of your
model. For example, if you do all of the work of your app on the
client-side and basically just save/load your model to the server,
then it'd make no since to have the service info in the model.

I guess I'm talking about MVC in an ideal scenario: assuming that I
don't have to mess with the dirty details of getting bits from the
client to the server, would my app know/care about networking, URLs,
endpoints, etc? If so, then model; if not, then service.

Troy.


Re: [flexcoders] Letting parents handle drag events

2008-04-15 Thread Troy Gilbert
 Troy - drag events are dispatched to what _you_ attach them to. If you want
  the event to spawn from a child - but be handled by the parent... you
 should
  override addChild in the parent and attach the listener there. Your handler
  will be in the parent and each child will announce whatever event you
 attach
  to it at that level.

For my case, I can't actually do that because they're not direct child
components, their actually grandchildren, created and managed by the
container (which is the child). Sure, I'd still the get the addChild
events, and I could look for children of a specific type (since
they're a specific custom type in my case), but that's not very
robust.

And it doesn't fundamentally fix the problem. The problem is that
Adobe derives the DragEvents from the MouseEvent class but doesn't
dispatch it according to the same logic. If add a mouseDown event on a
grandparent component and the user clicks on a grandchild component,
unless the grandchild stops the event propogation the grandparent will
get a notification, and it can identify the grandchild through the
event.target property.

With drag events, they aren't dispatched through the DisplayList like
a MouseEvent, they're dispatched by hand by the DragProxy class. And
because they're dispatched by hand, the event's target and
currentTarget properties are always identical. Which is not like
MouseEvents at all...

Hmm... looking again at the DragProxy's event dispatch... we could
make it work by changing the constructor for the DragEvent, passing in
true for bubbles. This will actually fix the problem, and is probably
how it should work since mouse events bubble.

I could also use capture-phase event listeners, because even though
the event doesn't bubble, it should always go through the capture
phase (or at least that's the impression I get from the docs). This
hadn't even occured to me because I was using MXML and the event
attributes on components are not capture-phase event listeners, they
are target and bubbling-phase listeners (useCapture=false in their
addEventListener calls).

So, I guess I've fixed my problem.. I've already got a monkey-patched
DragProxy so that I could (properly) test for mouseEnabled when
finding drop targets. I'll just add the above fix so that the
DragEvents bubble. Adobe guys, is my reasoning here sensible?

Troy.


Re: [flexcoders] Letting parents handle drag events

2008-04-14 Thread Troy Gilbert
 So… are you _not_ using the dragSource, dragInitiator or draggedItem
 provided by your drag/drop events? I would recommend that first before you
 try to get list items to dispatch events…

Uhm, I think you're missing my question. I'm trying to use all of
those things, but I can't because I'm not getting the drag events. And
this isn't an actual list component, it's a canvas full of controls
(controls witch initiate the drag events) and another similar
container full of these controls, and I need to detect when controls
dragged from one are dragged onto controls in the other. And I'd
prefer for the parent's owner to handle this instead of building the
logic into the component itself. Just like I'd have it handle any
other event (at least any other event that traverses the DisplayList,
like a MouseEvent, which being the super class of DragEvent would
imply that DragEvent works similarly, but it doesn't...

 As for the second question, the mouse must participate in a drag/drop
 operation – but the actual functionality of dragging and dropping is a lower
 level operation that isn't directly tied to a components condition. If you
 wanted to turn drag/drop off based on mouse enabled or something similar…
 then all you had to do is check for myComponent.mouseEnabled with your drag
 start event… and if this fails… event.preventDefault().

The point is that the drag events don't fire correctly *because* they
don't work like mouse events, but they should. This is a known bug (in
Adobe DB and confirmed) and I've already fixed it to a degree.

Troy.



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



Re: [flexcoders] Storing object hierarchies in shared objects

2008-04-12 Thread Troy Gilbert
  - When serializing an object to the SharedObject, is the whole object
  hierarchy traversed? For example, if I have a model that stores a
  ParentObject which has an array of ChildObjects, and I stick the
  ParentObject in the SharedObject, when I retrieve it will I get back
  the ParentObject with a complete array of ChildObjects?

So, I ran some tests with writing objects to ByteArrays. It appears as
though all referenced objects are serialized as well, as deep as
necessary I assume. It also looks like it does the right thing and
only serializes any specific instance once, and when they're
reconstituted there's only one instance with potentially many inbound
references. Very cool.

Of course, unless there's something I'm missing, I'll have to manually
handle the case where I have two separately serialized object
hierarchies that had overlap... when they're reconstituted, there's no
linkage between the two hierarchies and the overlaps become duplicated
(and thus, no longer centralized/shared) data.

That scenario leads me to think that I may need to override the
default serialization to include an additional serialization of a
UUID, and then when the object is reconstituted register the UUID so
that if the object is reconstituted from another hierarchy it can be
located and references wired appropriately. Unless, of course, AS3
already does this for me (I wouldn't be surprised!). Any thoughts?

And for those with some AMF knowledge, what's the best way to store
AMF data on the server-side? For a lot of my data (that I don't need
indexed by the SQL database) I'd just assume not convert it to a PHP
object, translate it to its own row in the database, then reverse the
process. Do I just stick the AMF data in a BLOB (MySQL is my brand of
server if that matters)? Would I be better off dumping the blob to
disk and just storing its path in SQL? (Note: I realize this question
is veering a bit into DB admin territory -- we all wear multiple
hats!)

Thanks for the insights,

Troy.


Troy.


Re: [flexcoders] Drop anywhere to remove

2008-04-07 Thread Troy Gilbert
 that's what I was afraid of - anyone know of any other ways around it?

You'll have to create a new DragProxy class to change this behavior.
To do this, you'll need to monkey patch (google it, you'll find it)
the framework's DragProxy class. Once you do that, you can change the
logic it uses for allowing a drop, or simply insert your remove code
directly.

Another option is to simply do the checking in addition to the work
the DragManager does. So, when you start the drag operation, start
listening on the stage (or SystemManager) for the mouse up event. When
the mouse up event occurs, look at the currentTarget or target (or do
a hitTest) to figure out where the mouse up occurred. If its in a
trash it section of the screen, do the delete.

You can also listen for mouse move and update the drag proxy cursor as
it goes performing the same tests.

Its the beauty of the event system, and the fact that (as far as I can
remember) the DragProxy class isn't consuming the mouse events.

Troy.


Re: [flexcoders] Re: Export release build copying PHP files

2008-04-04 Thread Troy Gilbert
  None of Builder is open source.

So, Adobe folks... can someone tell me specifically what parameters
are being passed to the compiler for a release build? I'm guess
debug=false and optimize=true, anything else?

Troy.


Re: [flexcoders] Re: Changing a property inside of commitProperties?

2008-04-04 Thread Troy Gilbert
  Things done in commitProperties() are generally wrapped in a check to
  make sure the underlying data has changed since last time. So in your
  myCustomData setter you would set the value of _myCustomData and also
  set _myCustomDataChanged = true. Then in commitProperties() you would
  do something like this:

Yeah, the point of that pattern is to avoid unnecessary work (for
performance/efficiency reasons), which isn't a factor here.

  You also might try moving super.commitProperties() to the end of your
  override rather than having it at the beginning. I don't have any
  memorized rules for when each is better but it can make a difference
  in some circumstances.

I'll give that a shot... thinking about it, that will probably resolve
the issue for me in this situation as it will dirty the label *before*
FormItem handles it.

I'd still be curious about handling this more generally for
commitProperties, for example, if I was dependent on the updates
performed by my super class such that calling super.commitProperties()
before my code was necessary.

Troy.


Re: [flexcoders] Changing a property inside of commitProperties?

2008-04-04 Thread Troy Gilbert
 Why not just have the setter for myCustomData simply set 'label' and other
 properties rather than doing this in commitProperties()?

Yeah, I could definitely do that... I was more interested in doing
things the right way, at least in line with convention, and my
impression of the convention (from the docs on writing AS components)
was that overriding commit properties was the thing to do.

Of course, none of the examples address a derived component updating
an internal property, so maybe this scenario warrants a different
convention... but it didn't seem too far off the beaten path.

Calling super.commitProperties() at the end of my commitProperties()
does the trick. It still feels like I'm working around a potential
problem in the framework, though, or at least my weak understanding of
that part of the framework.

Troy.


Re: [flexcoders] Re: Changing a property inside of commitProperties?

2008-04-04 Thread Troy Gilbert
 Setting a label repeatedly could cause performance issues as
  remeasuring a textbox is said to be fairly expensive.

Sure, but the label property already performs this optimization for
me, hence why I was simply setting the property instead of tracking a
dirty flag.

Troy.


Re: [flexcoders] Export release build copying PHP files

2008-04-03 Thread Troy Gilbert
  Did you log a bug yet ? What was the number ?

Dmitri did:

https://bugs.adobe.com/jira/browse/FB-12306

Troy.


Re: [flexcoders] Re: Export release build copying PHP files

2008-04-03 Thread Troy Gilbert
 I think that I know why it is happening - when I do the Export release
  build this smart thing also copies ./php directory from bin-debug.

If you look through the bugs related to Export Release Version (the
component your bug is filed under) you'll see one from the beta period
(from an internal user who knows the source code) about exposing
properties for what files are copied during the export. Basically, it
reads as if they hard-coded some file types (probably those generated
by the db wizard, like PHP) and never got around to exposing it
properly.

Is this component of Flex Builder open-source? I found the class files
that relate to exporting the release build, but there's no source or
configuration files (other than localization xml).

Troy.


Re: [flexcoders] Export release build copying PHP files

2008-04-02 Thread Troy Gilbert
  *contents* ?!? Not the files themselves ? That's very weird.

You're telling me. And its not all files, it's only PHP files.

  Didn't someone* suggest that you should deploy to a sub-dir (like
  webroot/bin/) to prevent this happening again ?

Yeah, but my point is the bug, not whether or not I can avoid it by
doing something that breaks my own development.

Troy.


Re: [flexcoders] Re: Flex3: MXML file diffing is slow as a dog

2008-04-01 Thread Troy Gilbert
   While comparing mxml files Flex3 just kills itself - 50% CPU usage,
   takes about 30 seconds to compare 700 lines of code.
   It didn't happen in Flex2.

I've been experiencing the same thing, when comparing with repository
*or* local history files. All documents less than a 1000 lines and it
takes easily 30 seconds. This should be instant. Unlike what the forum
poster suggests in the link, Flex isn't doing any kind of
sophisticated XML diffing (which still shouldn't take as long), it's
doing a straight text-diff line-by-line.

I'm running Flex Builder 3 on OS X.

I love local history and use it all the time... or did... it's now
becoming quite a problem to deal with.

Troy.


Re: [flexcoders] Export release build copying PHP files

2008-04-01 Thread Troy Gilbert
This makes me so F*ING MAD! Flex Builder has once again *trashed* my
webroot with its helpful copying about of PHP files. All of my PHP
files are empty now... which, unsurprisingly, completely breaks
everything on my development machine. Sure, I can sync back up with
the test servers, but I've got to make a few changes to update paths
for my local machine and wait for everything to come over the wire
again... when I shouldn't have to!

I don't understand how *publishing* a release build of my SWF to my
webroot should ever, under any circumstance, delete the contents of
*all* PHP files. ADOBE! Please, for the love of all that is holy, give
me a hand here and point me to some config or JAR file I can hack to
change this behavior. I've lost *hours* of dev time on *multiple*
occasions recovering from this *heinous* bug.

Coupled with several of the other issues I've posted about over the
last month, I'm really starting to feel like I paid $400 for the
opportunity to beta test this software...

Troy.


Re: [flexcoders] Re: Flex Builder 3 debug builds broken, breakpoints all wrong

2008-03-28 Thread Troy Gilbert
I just encountered the issue again, and went through the process of
deleting all the build stuff manually, caches, etc., and nothing
helped. So this time I tried flushing the browser cache (actually,
disabling it with Firefox extension Web Developer). That worked, it
was a browser cache issue.

Anyone have any ideas why once in a blue moon the browser would serve
up a cached version of my SWF (served from my localhost, MAMP on OSX)
while debugging? I was under the impression that the browser wouldn't
cache documents that have queryvars (hence one reason for the
inclusion of ?debug=true when debugging a Flash app). Is there
something else I need to be doing (possibly MAMP configuration?) to
ensure that the browser always sees the latest SWF (without having to
always disable the cache... I am loading a lot of static assets and
its nice to take advantage of the cache for those)?

Thanks,

Troy.


Re: [flexcoders] Re: graphics object seems to degrade performance

2008-03-28 Thread Troy Gilbert
  Are you suggesting I choose a point in time, for instance, when 500
  vectors are drawn, then convert them, encode as png file, overlay as
  another child image, clear the graphics object and let user continue
  scribbling on newly cleared graphics object?.

Reading through this thread reminded me of a similar performance issue
I encountered. I have a component that allows the user to erase parts
of image. I originally implemented this by creating a mask for the
bitmap and drawing on the mask to erase. I ran into the same problem:
the more the user erased, the slower the app got.

I eventually switched to using a bitmap as the mask, but I lost my
nice soft brushes and easy, smooth resizing that the vectors gave me.
In thinking about Alex's suggestion I had a thought (that would help
you as well).

Instead of baking your lines to a bitmap, creating a new shape and
drawing on that, then baking that into your bitmap, repeat... which
has the problem of losing your vectors... could you keep an array (or
rather, a stack) of shape layers, and as the user draws a certain
amount of vectors on that shape (like you said, 500 lines or such),
you push another shape layer on the stack and set the previous shape
layer cacheAsBitmap to true. You'd then get the performance boost of
the bitmap without losing the fidelity of your vectors.

When the user is ready to finalize their drawing, you just start at
the bottom of the stack and draw the shapes into a bitmap at whatever
is the desired final resolution (scaling it up or down as needed).

That should be an excellent trade-off... the only drawback would be if
you were using the vector renderer to draw things that interact with
existing vectors, i.e. using fills with intersections, etc.

Troy.


Re: [flexcoders] Re: HitTest - Sprite and Shape

2008-03-27 Thread Troy Gilbert
 To clarify this a bit... It's the root Sprite (the one at the top of the
 DisplayObject hierarchy) that doesn't receive mouse events.

Wait... so, the stage receives mouse events, but the root Sprite
(which is a child of the stage, right?) (your main class in an AS3
project) does not receive mouse events?

Troy.


Re: [flexcoders] Flex Builder 3 OS X - debugger hangs on launch

2008-03-12 Thread Troy Gilbert
 I've encountered a really annoying quirk in FB3 on OSX... often, when
  I choose to debug my project FB hangs at 61% for a minute or so before
  finally launching the browser (Firefox) and connecting the debugger.

I've narrowed it down to putting my laptop to sleep (hibernate, deep
sleep) causes it. Something is going sideways when Flex Builder is
restored. Any ideas? Can anyone else confirm this?

Reproduce: Open Flex Builder. Debug a project, etc. Put your machine
into deep sleep (OSX-equivalent of Windows XP's hibernate, memory is
written to disk and all power is cut-off). Resume. Now try to debug...
launching the debugger will hang at 61% for about a minute (I'm
guessing until something times out) and will then finally launch. It
will do this until you exit FB and restart it, at which point it works
normally.

Troy.


Re: [flexcoders] Re: Strange Flex Builder 3 Plug in behaviour: ctrl-click / F3 broken

2008-03-11 Thread Troy Gilbert
  I had a similar problem where I had the Ctrl-Space functionality go
  wonky on me. It seems I'd just had Flex Builder open too long. When
  I closed and reopened it, the problem went away. Now I make sure I
  don't keep FB open more than a few hours at a time.

I've experienced the same thing with FB3 (OSX). In particular, I've
noticed that Ctrl+Click is inconsistent when it comes to MXML events.
Sometimes CTRL+CLICK works for function/variable names inside event
attributes, sometimes they don't. If the attribute is bound with
curly braces it seems to always work.

Troy.


Re: [flexcoders] FileReference.browse sometimes takes minutes for dialog to open

2008-03-11 Thread Troy Gilbert
 In debugging, I have the same issue on my Dell Laptop (WinXP), but not as
 bad. It normally only take 5 to 10 seconds for the dialog to open on my
 machine and this seems to only happen during debugging, which is what I
 wrote it off as…

This is on a machine that doesn't have the debug player installed and
basically represents a normal user machine.

No shell extensions that I'm aware of.

Troy.


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 


Re: [flexcoders] Global keyboard capture?

2008-03-05 Thread Troy Gilbert
 stage.focus = null;
  However, the FocusManager may fight to put the focus somewhere.

Ah, yes... I remember using that as my original attempt to fix this
last year... I put a stage.focus = null in my enterFrame event handler
and the FocusManager continually grabbed it back from me.

  Yeah, I recall that you were adding priority as int.MAX_VALUE. Did you
  try it with default priority? I'm not sure if there are issues using
  MAX_INT as priority.

Yeah, I originally had it with the default priority. I didn't see a
difference by changing the priority.

  Do you have default wmode or are you using some other wmode? Are there
  other focusable widgets in the HTML wrapper?

I'm loading the SWF directly in the browser, no wrapper HTML.

  When you only see keydown and no keyup, is the control with focus
  responding? If you put a target phase listener on that control is it
  reporting the KEY_UP event?

That's the quirky thing... when I see it, I've not longer got a
reference to the control that had the focus (a combo box). I've got a
popup (non-modal) that displays a form of controls (mainly sliders and
combo boxes). I occasionally had the problem that when the popup was
closed (PopUpManager.removePopUp(dialog); dialog = null;) I'd have to
click back onto my application to return the focus to it (no keybaord
events would fire).

But, I've recently added a new derived ComboBox class that displays
images as the item renderer (and has an overriden updateDisplayList to
display the image in place of the textinput). The code I added doesn't
add/remove any event listeners and does nothing keyboard related (just
rendering). And now I get keyDown's but not keyUp's (until I click
back on the app, at which time I get the keyUp's again).

Troy.


Re: [flexcoders] Global keyboard capture?

2008-03-05 Thread Troy Gilbert
 This is why Rick's suggestion of both a capture and non-capture phase
 listener on stage is correct.

Which is what I was doing originally, as per the source code in my first post.

If a display object has the focus, then is removed from the stage,
does it automatically lose the focus (I would think so) even if it
still has event listeners registered?

Troy.


Re: [flexcoders] Flex Builder 3 debug builds broken, breakpoints all wrong

2008-03-05 Thread Troy Gilbert
  I clean, shut down Flex Builder, manually go and clear all the cache
  files from my workspace's '.plugin' folder, rebuild... no good.

Ah, I didn't clear *all* the caches... I left one, the
searchCaches... which I thought was related to searching the help
files or used for quickly jumping between source files... but
apparently, the compiler uses this cache to do something clever (too
clever, apparently).

Are there any known bugs related to the searchCaches getting
corrupted, out of date, etc.? I'd like to avoid this problem in the
future!

Troy.


Re: [flexcoders] Re: Flex Builder 3 debug builds broken, breakpoints all wrong

2008-03-05 Thread Troy Gilbert
 Did you check whether or not:
  Menu:
  Project ---
  build Automatically is checked?

Like I said, I've been developing with Flex for the last 18 months...
I'm very aware of build automatically, clean and all of their
implications. It's definitely a bug in the caches...

Troy.


Re: [flexcoders] Flex Builder 3: *major* bug in deleting linked folders

2008-03-05 Thread Troy Gilbert
  F*CK! Even though the folder was definitely a linked folder (little
  icon and all), even though FB just told me it wasn't going to touch my
  file system, it deleted the contents of my document root. Zap.
  Instantly. And it didn't move it the trash like a decent human being,
  it just nuked it from the file system.

Wow, it really nuked the file system... I'm running on OSX, and my
htdocs folder (document root that got nuked) had all its permissions
reset to No Access (even though my user account is still the
owner/group). Wow, just wow.

Troy.


Re: [flexcoders] Flex Builder 3: *major* bug in deleting linked folders

2008-03-05 Thread Troy Gilbert
  Wow, it really nuked the file system... I'm running on OSX, and my
  htdocs folder (document root that got nuked) had all its permissions
  reset to No Access (even though my user account is still the
  owner/group). Wow, just wow.

Okay, FB... forgive me for getting upset. I've had a bad day. Very
stressful. Sorry if I got a little unhinged. We can get back together,
right?

Apparently, the only thing that FB did was to clear the permissions on
the file (which makes me think it's *definitely* a bug, because I
wouldn't expect FB to ever need to mess with permissions on files).
When I reset the permissions all of my files re-appeared (you know,
since I didn't have read-access on the directory I couldn't see its
contents!).

Apologies for the flaming nature of my previous e-mails... happy that
it worked out okay in the end, though there's still a bug in there!
;-)

Troy.


Re: [flexcoders] Flex Builder 3: *major* bug in deleting linked folders

2008-03-05 Thread Troy Gilbert
 Well… now we know not to keep our development and production versions in the
 same place. And moving stuff to the trash is a feature of whatever operating
 system you're using, Linux or Windows or Mac. Any decent programming
 language will actually *delete* stuff you tell it to.

 I personally have nothing but good experiences with Flex Builder, so there
 ya go.

Well, thanks for the warm remarks, but you'll notice that I quite
clearly stated that it was my *localhost* copy of my site, i.e. it was
my development version. It's a pain because restoring the development
version from a backup or the production version is time consuming...

And not deleting files when an app tells me hey, I'm not going to
delete these files is a feature that should work. It's a bug, plain
and simple. And a decent app that is *mirroring* the file system to
the user (which FB is doing which it links folders or shows the
directory tree) should *mirror* the file system's (i.e. OS's) feature
of moving items to the trash.

Oh, and I take back my previous apology. After looking at all my
documents I discovered that all of the php files (and only the php
files) were empty. Me thinks FB was trying to do something clever
related to it's db wizards, etc. and clean up files it *thought* it
had created.

So, now the restore from the production server is finished. Now I'll
(hopefully) get back to work. And for the record, I'm a *big* fan of
Flex Builder (mostly Flex/Flash, not so much Builder) and have praised
it on many occasions on my blog.

Troy.


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 


Re: [flexcoders] Flex Builder 3: *major* bug in deleting linked folders

2008-03-05 Thread Troy Gilbert
 However, I think there is a reason for FB to change file permissions.  I
 keep the output-bin folder in source control so it is easier to deploy to
 our internal servers.  Usually I keep the compiled files checked out but
 sometimes forget.  If FB did not clear the read-only attribute on the
 compiled files, the compile would fail.

Yeah, but in this case, FB changed file *permissions*... not just a
Windows read-only flag, but access permissions for user/group/other.
Oh, and it smashed the contents of my php files... something is fishy.

Troy.


Re: [flexcoders] Flex Builder 3: *major* bug in deleting linked folders

2008-03-05 Thread Troy Gilbert
  If you can please file a bug with a test project and detailed steps as to
 how to reproduce we can certainly take a look. Write back here with the bug
 number and maybe other folks who are seeing similar issues can vote on it to
 make sure we're aware of how much impact this is having on folks.

I went through the steps in a fresh project and the issue didn't occur
again. I'll try it again (later) with the project where it occurred
for me the first time. If I can reproduce it, I'll file a bug.

Apologies to everyone for the crudeness of my posts today... lots of
stressing going on, most of it not related to Flex Builder... sorry it
was the target! ;-)

Troy.


Re: [flexcoders] Flex Builder 3: *major* bug in deleting linked folders

2008-03-05 Thread Troy Gilbert
  Ah, my bad then. However, I assume you're not using version control
  software of any kind then.

I most certainly am using version control with my source code. The web
stuff is developed by an external group and I don't (routinely) access
their source control, so it wasn't a quick, easy option in my case.

Troy.


Re: [flexcoders] Global keyboard capture?

2008-03-04 Thread Troy Gilbert
 For Flex, use systemManager instead of stage from what i was told and the
 capture. no idea on combo sorry

Doesn't make a difference.

The stage should be as low-level as it gets... shouldn't all keyboard
events pass through the stage in either the capture or bubble phase?
Maybe I'm missing something about how keyboard events work...

Troy.


Re: [flexcoders] Global keyboard capture?

2008-03-04 Thread Troy Gilbert
  Keep in mind that something must broadcast the event. a TextInput
  will broadcast a keyboard event. A container or Application will not.

Keyboard events are broadcast by the player. I'm looking to grab (or
look at) all of them. It shouldn't be dependent on anyone broadcasting
them.

Troy.


Re: [flexcoders] Global keyboard capture?

2008-03-04 Thread Troy Gilbert
 So – in reality… your implementation may determine which is better to use.
 But I do have something for you that might help. If you are having problems
 with the capture/bubbling/target phases you probably need to add two
 listeners as…

You should've read all the way back to my original post... the code I
posted was adding exactly that to the stage (with the addition of
being highest priority as well).

@Alex: could I force keyboard focus to the stage using something like
stage.setFocus()?

Troy.


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 


Re: [flexcoders] Autocomplete in FlexBuilder 3

2008-02-29 Thread Troy Gilbert
  guess your project isn't built betwen the save of classA and the edits in
  classB ?

Autocomplete should still work within the same project. If the classes
are in two different projects, the autocomplete only shows up once the
other project is built.

Troy.


Re: [flexcoders] Re: Flex Application Size = 71KB

2008-02-29 Thread Troy Gilbert
 William hit the nail directly on the head by what he said. Simple ,
  light applications should be built in Flash, while more complex
  applications should be created in Flex.

And to be clear, because people often muddy this, there's Flex the
Framework and there's Flex the Compiler (or mxmlc, or the AS3
compiler, or whatever), and then there's the Flash IDE (and then
there's Flex (Builder) the IDE).

Simple, light applications can most certainly be built with Flex (as
in Flex Builder or the Flex compiler, mxmlc), just make an AS3-only
project. This would be identical to Flash CS3.

The mxmlc compiler is a great option for those on a shoestring budget:
it's free and doesn't require that you have Flash or Flex Builder.

Troy.


Re: [flexcoders] Flex Builder 3 vs SDK and Charting

2008-02-27 Thread Troy Gilbert
   It states that the Flex 3 SDK has more charting capabilities than the Flex
   Builder 3.

I came across with the same impression. AFAIK, the Flex SDK and Flex
Builder 3 Standard have the same capabilities (since Flex Builder 3
Standard uses the SDK!), and I believe Flex Builder 3 Pro has some
additional capabilities, which I assume to be design view related or
wizards, in regards to charting. Of course, my expectation until I saw
that was that the Flex SDK stand-alone (free) doesn't include any
charting, but who knows...

I'd chalk it up to bad writing/marketing...

Troy.


Re: [flexcoders] Re: HTTP Methods

2008-02-25 Thread Troy Gilbert
  Hum... so it does work with the normal HTTPService without using a proxy?

Nope, not at all. If you want the full HTTP verb set you've got to use
a proxy. Flash Player only speaks GET and POST, due to legacy issues
where browsers used to only speak GET and POST (and some still do as
far as I know) and the Flash Player uses the browser's network stack.

So, without a proxy, it's only GET and POST. With a proxy, it's
whatever HTTP supports.

Troy.


  1   2   3   >