Re: [flexcoders] SDK 3.2 upgrade to 3.4 issue

2009-09-23 Thread Jim Cheng
If you do hang back with 3.3 _AND_ are using Flex Builder's 
automatically generated HTML wrapper, you should be aware that there was 
a bug discovered in the express-install template files that can expose 
you to a cross-site-scripting (XSS) attack.  Adobe fixed this in 3.4, 
but with that revision, also introduced the nasty bug with HTTPService 
responders getting called twice.

If you are using the vanilla express-install templates to generate HTML 
for you, you might want to patch your 3.3 SDK while you wait for 3.5.

Here's the relevant links:

http://www.adobe.com/support/security/bulletins/apsb09-13.html

http://kb2.adobe.com/cps/495/cpsid_49530.html

Hope this helps,

Jim Cheng
EffectiveUI

Jake Churchill wrote:
>  
> 
> Thanks for the info. I was just upgrading to stay current, no particular
> reason so I'll hang back on 3.3 for a while until 3.5 is released.


Re: [flexcoders] SDK 3.2 upgrade to 3.4 issue

2009-09-22 Thread Jim Cheng
Yup, something did change for the worse in 3.4 in a show-stopping way.

There's a relatively easy workaround for this, just add your own 
listeners to HTTPService directly and those will only get called once 
(as opposed to the responder).

Try the 3.x branch on opensource.adobe.com if you've brave, or stick 
with 3.3 for the time being if you can afford to wait for them to roll 
out the next official build.

Here's the bug:

   http://bugs.adobe.com/jira/browse/SDK-22883

Jim Cheng
EffectiveUI

Jake Churchill wrote:
 >
> I just installed the 3.4 SDK (previously was using 3.2).  I have a 
> project which uses Cairngorm.  I switch the project to the new compiler 
> version and re-build without any errors.  However, whenever I run the 
> project, all my events get dispatched once (I’m breaking the code all 
> over to verify) but the result handler in the commands get hit twice. 
> 
>  
> 
> Did something change regarding event dispatching, AsyncTokens, etc that 
> would cause this? 
> 
>  
> 
> FYI, switching back to 3.2 and re-building makes the code run just fine 
> again.
>




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

<*> 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:flexcoders-dig...@yahoogroups.com 
mailto:flexcoders-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
flexcoders-unsubscr...@yahoogroups.com

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



Re: [flexcoders] Re: Reading compressed file in AS 3

2009-02-26 Thread Jim Cheng
I'm assuming you're using PHP based upon gzopen.

 From reading the zlib library documentation, you'll want to use the 
gzcompress function instead of gzopen to compress your string into the 
zlib data format (which corresponds to ByteArray's compress/uncompress 
methods).  Note that gzopen uses a slightly different data format, gzip, 
which is based upon, but incompatible with zlib.  This likely accounts 
for the slight difference in file size and your inability to decompress 
the file on the Flex side of things.

Hope this helps,

Jim

ACasualObserver wrote:
> 
> I create the compressed file by calling gzopen. I use wb9 for the
> mode. Should I used another mode?
> 


Re: [flexcoders] custom preloader

2008-06-04 Thread Jim Cheng

Take a look at the documentation:  Adobe provides a handful of examples 
for hiding, customizing and replacing the preloader's default download 
progress bar.  See:

   http://livedocs.adobe.com/flex/3/html/app_container_4.html


Jim Cheng
EffectiveUI

[EMAIL PROTECTED] wrote:
> 
> does anyone have any code examples of skinning the preloader? I just
> want a textbox with my site name, and a super thin bar with a bar
> holder. anyone? please?


Re: [flexcoders] How to remove space at the end of line chart when using disabledDays = "[6,0]"!

2008-03-27 Thread Jim Cheng
It's a Flex 3 charting bug alright.  This was originally reported about 
9 months ago during the beta cycle on the Flex bugbase and was later 
closed by Adobe with a resolution of Cannot Fix for what I believe to be 
a rather spurious reason, see:

https://bugs.adobe.com/jira/browse/FLEXDMV-963

Contrary to what's reported in the comments on that bug, the problem is 
actually not too difficult to fix provided you have access to the source 
code (e.g. using Flex Builder 3 Pro) and are willing to do a little bit 
of subclassing or monkey-patching to fix the issue.  Read on if you're 
interested.

The basic problem is that the DateTimeAxis class does not correctly 
calculate the total space available for charting when disabledDays 
and/or disabledRanges is enabled.  This is always taken to be the 
difference between computedMaximum and computedMinimum (as seen in the 
transformCache, buildLabelCache and buildMinorTickCache methods).

However, this calculation becomes wrong when there are disabled ranges, 
as it yields a total span that's now too large (not accounting for the 
ranges that have been removed).  The visual consequence of this is that 
the chart now appears to be condensed to the left.

The available space should instead be taken to be the difference between 
computedMaximum and computedMinimum, with the following term also 
subtracted (in the context of the DateTimeAxis class):

   dateRangeUtilities.calculateDisabledRange(computedMinimum,
 computedMaximum);

This additional term accounts for the space that is removed by the 
disabled ranges (or days), and consequently allows the chart's axis and 
elements to correctly take up the full available width.

To make a simple monkey-patch to fix this, you can copy the contents of 
Adobe's DateTimeAxis class into your own class path, doing a search and 
replace on all instances in the file like so (removing quotes and excess 
whitespace for formatting):

Find: "computedMaximum - computedMinimum"

Replace with: "computedMaximum - computedMinimum -
   dateRangeUtilities.calculateDisabledRange(computedMinimum,
   computedMaximum);"

You can also do this as a subclass, but that's somewhat trickier since 
the methods that you'll need to override make references to a number of 
private variables and methods of DateTimeAxis.

As an aside, perhaps someone at Adobe might want to consider evaluating 
this patch for possible inclusion into the Flex 3 Charting codebase.  I 
haven't found any other side effects in testing and my own use of this 
change, and it correctly handles the test case from the JIRA bug listed
at the top of message.

Jim



buithanhtuu wrote:

> I'm using chart of flex 3. When I use Linechart with DateTimeAxis
> tag, in this tag i used property disabledDays = "[6,0]" then weekend
> days did not show on chart, but a lot of white space are show at the
> end of chart. So, the width of line chart is not scale full the width
> of chart.
> 
> I used sample from this link 
> http://livedocs.adobe.com/flex/3/html/help.html?content=charts_displayingdata_04.html
>  
> 
> 
> 
> Could you please help me fix this problem or this is bugs of chart in
>  flex 3 ?


Re: [flexcoders] Complex chart application - general performance issues.

2008-02-18 Thread Jim Cheng
Hi Iain,

I've been working a project quite similar to yours for a while now have 
encountered the same issues, particularly when handling large data sets 
(e.g. 1000+ items) with the Adobe Flex charting components, even if only 
a small subset is being displayed.

The core performance issue that I've found is that some parts of the 
charting framework, particularly the axes and transforms, utilize rather 
inefficient algorithms that scale poorly with increasing data set size. 
As a result, while several series consisting of a handful of points 
can be drawn very quickly, the framerate becomes unacceptably slow if 
you are plotting multiple series consisting of hundreds of points of each.

For best performance with large data sets, you must either reduce the 
size of data that you're passing into the charts or replace these 
algorithms with more efficient implementations.  A lot of Adobe's code 
runs in O(n) or worse time.  You don't want this.  In my case, the 
solution isn't particularly pretty or fun.  I ended up with a blend of 
different approaches to reduce the total workload needed to calculate 
and render the charts.

First off, you'll realize the biggest gain by culling the number of data 
points passed to your chart(s), either by lowering the chart resolution 
with sparser data points or pre-culling the points that will not be 
displayed on the chart from its data provider rather than depending on 
the chart to do this via setting the minimum and maximum properties. 
The charting framework does not do this calculation in a very efficient 
manner, you're better off doing this yourself externally or overriding 
it in a subclass with a more efficient search scheme (e.g. a binary 
search tree).  The same is true for various other chart calculations, 
including the automatic calculation of minimum and maximum values for 
computing axial ranges--you can save quite a few cycles here if you can 
compute this more efficiently than iterating through the entire data 
provider (e.g. better selection algorithms).  Depending on how you're 
using the charting framework, you'll be best served by profiling your 
application using the Flex Profiler and looking for hotspots where you 
might be able to make overriding changes to reduce the magnitude of the 
calculation.

This being done, be very sure that you're not redrawing your charts more 
often than absolutely necessary.  This can't really be helped much if 
you're animating your chart, so you may want to reduce this to a minimum 
or perhaps drop down to a sparser data set when animating.  Also, if 
you're doing a lot of subclassing, be sure that you're only drawing what 
truly needs to be updated--in my case, I've found that my class may not 
always need a redraw even if it is notified as such.  In some cases, 
intelligent caching here may also help in reduce the computational load.

Last, if you need to do complex and time-consuming calculation loops 
that consume more than several dozen milliseconds or so (and will 
consequently pull down your framerate), consider breaking up your loop 
across multiple frames.  There are several ways you can do this, perhaps 
with a visitor pattern or by breaking out of your loop after so many 
iterations and storing your variables such that further execution can be 
resumed on the next frame.

Hope this helps,

Jim Cheng
EffectiveUI


Re: [flexcoders] Combination zipCode and state formatter

2007-10-02 Thread Jim Cheng
Patrick Lemiuex wrote:
> 
> 
> Hi:
> 
> Is there a way to get a state from a zipCode in flex, with a
> formatter or such?

While the default Flex zip code validator only checks whether the value 
looks like an acceptable US ZIP or Canadian postal code, it wouldn't be 
too hard to subclass it to emit the associated state/territory for a 
given zip code in a custom validation result event.  The range of ZIP 
codes mapping to each state or territory is relatively small and mostly 
contiguous, so you can probably get away with embedding it into a Flex 
class without a significant size overhead.

You can find a list of the mappings here:

http://en.wikipedia.org/wiki/List_of_ZIP_Codes_in_the_United_States#List_of_ZIP_code_ranges

Jim


Re: [flexcoders] Fw: output formats (excel/word)

2007-05-15 Thread Jim Cheng
Tom Chiverton wrote:

>> if i want to allow users to export data into excel and send it directly to
>> their desktop (like cfcontent does),  would it be worth getting into?  are
> 
> You might want to look at Apollo, though of course XLS can be just a HTML 
> file 
> with a table tag in, in which case you could go that route - but Flash can't 
> talk to the network and the local filesystem from the same file.

Apollo is an excellent tool for outputting data in Excel-friendly 
formats.  The only caveat for now is that there's a dearth of libraries 
that'll do this, so you'll probably need to write your own emitter.

I actually did just this by rolling a minimal SpreadsheetML emitter over 
the course of a few hours just in time for the eBay Desktop demo that 
Mike Downey was showing at the DEMO '07 conference a few months ago. 
That's part of the magic underneath the hood that allowed him to show 
dragging the data grid straight to the desktop where it saved as a file, 
and then immediately re-opening the formatted data straight into Excel.

While Excel can handle data in HTML tables just fine, I'd suggest from 
experience that Derrick take a look at using SpreadsheetML if he needs 
anything more than a simple tabular data of the sort that HTML tables 
and CSV formatted data are well suited for.  Among other things, it 
supports styling and accurate handling of localized decimal notation, 
both of which we wanted in the eBay demo.

Jim Cheng
effectiveUI


--
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] enhancement for AS4

2007-03-30 Thread Jim Cheng
One Person wrote:
> I would like to make a request for an upgrade to AS4 and I'm not sure 
> where to send it. So here it is. If there is a better place, please 
> let me know.

The absolute best public place to submit/discuss proposed syntax changes 
and additions to the forthcoming ES4 specification is the Mozilla ES4 
discuss mailing list.  Many of the ES4 working group members, including 
Brendan Eich (Mozilla) and Jeff Dyer (Adobe), are highly active on that 
list.

It's probably your best shot at your idea being heard and debated by the 
decision-makers for the ES4 specification short of your company joining 
ECMA and the ES4 task group.

Join the mailing list here:

   https://mail.mozilla.org/listinfo/es4-discuss

Jim Cheng
effectiveUI


Re: [flexcoders] E4X expression: return node by matching text() value

2007-03-07 Thread Jim Cheng
Tracy Spratt wrote:
> This should be really easy, but I am struggling.  I need to return a
> node based on the value of its text node.  Below is the code I am using.

You need to specify the text node like so:



trace(myXML.item.(text() == "burger")[EMAIL PROTECTED]);



This returns 1.  Replacing the string "burger" with "fries" returns 2. 
I assume that this is the behavior that you're looking for.  E4X makes 
XML node resolution much easier than before, but getting the proper 
syntax for some of the more unusual constructions can be a little 
tricky.  :(

Jim Cheng
effectiveUI


Re: [flexcoders] Decompiler for Flash 9

2007-03-07 Thread Jim Cheng
Chaitanya Mutyala wrote:
> Is there a known Flash/SWF decomipler available for FLash 9?
> I checked with the manitu group that supports Action Script
> Viewer,<http://www.buraks.com/asv/index.html>and their version would
> not be out for a few months.

Tamarin, Adobe's recently open-sourced virtual machine that underlies 
ActionScript 3, has a AVM bytecode disassembler.  You can get it here:

   http://www.mozilla.org/projects/tamarin/

Patrick Mineault wrote a blog entry a couple of months back about how to 
get up and going with the source--you'll also need a C++ compiler for 
the platform that you're building on.  Read that here:

   http://www.5etdemi.com/blog/archives/2007/01/as3-decompiler/

If you don't happen have to a C++ compiler handy, in nearly all cases 
you can get go and download an appropriate one for free, either the 
open-source GNU one, Apple's XCode or Microsoft's Visual C++ .NET 
Express, depending on your particular platform.

Unfortunately, the output in an Assembler-like syntax corresponding to 
the ABC intermediate representation opcodes used by the AVM rather than 
immediately re-compilable ActionScript 3.

This shouldn't be too difficult to read and understand if you've used 
FLASM or some other low-level assembly language before, but might be 
less useful if you're looking to recover a high-level representation of 
the code.

Given the amount of data kept in the MIR opcodes though, it looks like 
it wouldn't be terribly difficult for decompilers coming out down the 
line to decompile directly to re-compilable ActionScript 3.

Jim Cheng
effectiveUI


Re: [flexcoders] AMF Serialization hooks?

2007-03-07 Thread Jim Cheng
Samuel R. Neff wrote:
> Is there any way to run custom code related to AMF serialization without
> writing everything from scratch using IExternalizable?  From the docs it
> seems like the only option is to do it all yourself or do nothing
> yourself--no middle ground.

The ByteArray native class supports AMF serialization/deserialization of 
raw byte data via its readObject() and writeObject() methods.  You can 
also specify whether to use AMF0 or AMF3 as the serialization format.

I've used this previously to read/write to legacy raw AMF-encoded data 
files that I created previously using Flash 8 SWFs and a custom server 
back-end.

It's pretty low-level and I'm not sure if going this route is any better 
suited for what you're doing, but it's worked well for me in the past 
when I needed something in between basic AMF serialization and writing 
full-blown file format parser/emitters.

Jim Cheng
effectiveUI


Re: [flexcoders] Not able to generate GUID

2007-03-05 Thread Jim Cheng
scott_flex wrote:
> Is there no function or object to generate a GUID, a true globally 
> unique identifier?

Just write your own--it's dirt simple.  FYI, GUIDs and UUIDs aren't 
actually guaranteed to be absolutely unique--however, given the number 
of random bits involved, a repeat is statistically highly unlikely to 
happen.

They're essentially just concatenated random bits,  although in some 
cases a few bits are derived from MAC addresses (per version 1 UUIDs, 
which you won't have to access to) or hashes of a URL (version 3 and 5 
UUIDs).

See:

   http://en.wikipedia.org/wiki/Globally_Unique_Identifier

   http://www.ietf.org/rfc/rfc4122.txt

If you need it to play with a server and you're worried about repeats 
enough to expend some developer cycles, a better use of your time is to 
hash the GUIDs that you're given on the server-side and do a quick 
search for a collision prior to creating a database entry.  This tactic 
also gets you around the possibility of malicious folk passing in faked 
GUIDs that they know may result in a collision.

Jim Cheng
effectiveUI




Re: [flexcoders] Right-Click -> View Source

2007-03-05 Thread Jim Cheng
André Rodrigues Pena wrote:

> Allow you to view the source by Right-Click -> View Source. As I saw
> this trick in several applications I guess it is a flex native
> support.. isnt it? How do I do it?

Yup.  From Flex Builder 2, select Project...Publish Application Source 
from the main menu bar.  It outputs the source in HTML format and adds 
in the link as an attribute to your main MXML's application element.

Jim Cheng
effectiveUI


Re: [flexcoders] flex bluetooth.

2007-03-02 Thread Jim Cheng
Tom Chiverton wrote:

> Does the bluetooth keyboard work without Flex, i.e. with Notepad ?
> If not, it's not Flex's fault, and we can't help.

If it's something that's not handled natively by Windows (for instance, 
Bluetooth keyboard or mouse), getting it to work with Flex is probably 
beyond the scope of this list.

Gunadi's best bet at that point would be to access the appropriate 
driver for the device using an adapter program and exposing the API to 
it for Flex to use via a socket or ActiveX control.  If an ActiveX 
control already exists for accessing the particular Bluetooth device, a 
third party extender like Zinc or SWF Studio might be able to do the 
trick via direct API calls.

Unfortunately, such solutions are more hackish than not and are unlikely 
to work well outside of IE (with additional trusted ActiveX controls) or 
a third party wrapper to the SWF.

Jim Cheng
effectiveUI


 Yahoo! Groups Sponsor ~--> 
Yahoo! Groups gets a make over. See the new email design.
http://us.click.yahoo.com/hOt0.A/lOaOAA/yQLSAA/nhFolB/TM
~-> 

--
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] Apollo Book: Apollo for Adobe Flex Developers Pocket Guide

2007-03-02 Thread Jim Cheng
Impudent1 wrote:

> So am I to take this that Apollo will not let me deal with a remote 
> filesystem?
> If I cannot read/write files from a workstation to a server, or deal with a 
> remote data connection, Apollo suddenly seems really useless for my app :(

There's no reason that you'd even need Apollo to do that.

Flash Player 9 already has all you need for building libraries to
connect to all sorts of remote filesystems:  sockets, binary and
otherwise.

Sockets are pretty much all you need for implementing whatever remote
filesystem protocol that happens to float your boat, be it WebDAV, FTP,
SCP or more esoteric protocols like SMB and NFS.

 From previous work I've done implementing WebDAV for AJAX applications
over XMLHTTPRequest, I seriously doubt that'd take more than a day or
two of effort.  Some of the other protocols might be trickier though,
especially if you need to re-implement some heavy lifting in the form of
encryption algorithms for authentication or stream protection.

Apollo, however, might make remote access in general easier for all of
us if Adobe got rid of the crossdomain access restrictions for desktop
applications though.

Jim Cheng
effectiveUI




 Yahoo! Groups Sponsor ~--> 
Something is new at Yahoo! Groups.  Check out the enhanced email design.
http://us.click.yahoo.com/kOt0.A/gOaOAA/yQLSAA/nhFolB/TM
~-> 

--
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] Application Idleness

2007-03-02 Thread Jim Cheng
Rick Root wrote:
> Does anyone have any suggestions for monitoring idleness of a Flex
> application?

I'm assuming you're using Flex 2.0--if you're using the Flex Framework 
as a basis for development (as opposed to rolling your own ActionScript 
3.0-only project), this functionality is actually supported out of the 
box by the SystemManager.

The SystemManager will dispatch an idle event every 100ms after there 
has been no keyboard or mouse activity.  You can register your own 
listener for this event and determine if too many such events have been 
issued without a gap in between (indicating user interaction).

If you don't mind using the mx_internal namespace (where Adobe hides 
implementation details that are subject to change between versions 
without notice, see the FlexComponents list for more details), you can 
even inspect the internal idleCounter variable which details the number 
of frames elapsed since the last detected keyboard or mouse activity.

Read more about it on the LiveDocs documentation here:

http://livedocs.macromedia.com/flex/2/langref/mx/managers/SystemManager.html

If you're brave, the source to SystemManager, as well as most of the 
rest of the Flex Framework, can be found in your Flex 2 SDK frameworks 
directory.  There's a ton of neat stuff just waiting to be discovered in 
there.

Jim Cheng
effectiveUI


Re: [flexcoders] Save a BitmapData as a local file

2007-03-01 Thread Jim Cheng
jwopitz wrote:

> I don't quite understand the question here.  Are you asking can you save
> some var myPic:BitmapData to your localSharedObject?
> 
> That's how I understand it.  I have never tried but I assume that you
> could.  We have been able to save some very complex object type to our LSOs
> without any issue.

Unfortunately, there's a few non-primitive data types that can't be 
saved to shared objects owing to an apparent lack of serialization 
support in the native code.  Among these are BitmapData and ByteArray.

To persist these data into shared objects, they must first serialized 
into primitives before they can be persisted into shared objects, for 
instance, as Base64-encoded string or a packed array of 8-byte Numbers.

Jim Cheng
effectiveUI



Re: [flexcoders] Save a BitmapData as a local file

2007-03-01 Thread Jim Cheng
ecpmaz wrote:
> ... and that without passing by the server :S
> 
> I don't know if my question is stupid.. but all I've been able to do
> till now was to send as a POST var my bytes to my server to assemble
> them, and send them back to the user as a JPEG...
> 
> It seems not to be an optimal solution, do you have any solution ?

For a cross-browser solution that you can immediately deploy today, 
you'll need to round-trip them to your server since there isn't a 
out-of-the-box solution for saving arbitrary bytes from within the 
player to their local filesystem.

However, the soon-to-be-released Apollo is slated to support local 
filesystem access, so if you can wait for that and can deploy your 
application as a desktop application, that might suit you.

Alternatively, for those browsers that support the data URI, you could 
use Javascript as a bridge and pass the bytes to your JPEG over to it in 
Base64-encoded format, and then create a data URI link from which the 
user can "download" the file off of the HTML page.  Before you get 
overly excited about going down this route though, keep in mind that 
data URIs aren't supported by Internet Explorer, among other browsers.

See:

   http://www.ietf.org/rfc/rfc2397
   http://software.hixie.ch/utilities/cgi/data/data


Jim


Re: [flexcoders] Quick Flex 2.0 questions

2007-02-23 Thread Jim Cheng
Jamie wrote:

> 1)  I'm assuming that Flex retains the Flash socket ability to 
> communication over TCP/IP?

Yes.  And Flash Player 9 also allows you to make client binary socket 
connections in addition to the XMLSocket functionality that was seen in 
earlier versions of the Flash Player that were targetted by Flash.

> 2)  All of the extremely expensive licensing for Flex Data Services 
> has me a little spooked.  If all I want to do is deliver a Flex Flash 
> app on the client that talks to a back end server over TCP/IP, I 
> don't need to be paying for Flex Data Services, correct?  There are 
> no licensing fees to distribute regular Flex applications?

You don't need FDS for building an application that connects to your own 
back-end server via TCP/IP and whatever protocol you decide to use.

While I'm sure that everyone would agree that FDS is expensive, it does 
have a number of juicy client-server integration technologies that work 
exceptionally well just out of the box would probably cost just as much, 
if not more, to implement yourself than to simply license, among others:

   - Data Services (marshalling, real-time synchronization, paging)
   - Messaging (messaging infrastructure for multiple clients)
   - Disconnect Recovery (great for unreliable networks)
   - Functional Testing (also requires Mercury QuickTest Pro)

As such FDS is probably not the right technology for simple projects 
that simply need to send data back and forth to a back-end server, but 
it's a good choice if you're building large-scale projects with Java 
back-ends that are expected to need to do some heavy-duty marshalling 
and/or real-time data synchronization.

And no, there's no licensing fees for distributing Flex applications, 
unlike the previous version.  You can even build them for free now using 
the SDK.

> 3)  If I want to do some simple 2-D pie charts, will I need to buy 
> the Adobe Flex Charting?  Or is ther some basic charting built into 
> Flex?  

You don't necessarily need to buy Flex Charting; if you want, you can 
implement some basic charting components of your own using the Flash 
Drawing API, or perhaps do it on the server-side and just send over a 
bitmap for display.  The core Flex framework does not come with charting 
components, though I suppose you could quickly re-purpose a progress bar 
or something similar into a low-rent bar graph fairly quickly or simply 
roll your own.

Having used the Charting components for a handful of projects though, I 
must say that the Flex 2 Charting components are pretty nice, especially 
when compared to the much inferior ones that were previously offered for 
Flash.  Ely's done quite an impressive job.

Since there's a trial for these as well, I'd suggest that you grab the 
30-day trial, put together a few charts and see how much you like it and 
whether it's worth it for you to license the components.  Buying them 
will remove the watermark that gets stamped over all your charts and 
will also get you access to the source code should you need/wish to 
extend the charting components.

> 4)  How much easier is it to build a Flex app with Flex Builder than 
> with the SDK?  I'll probably just download the trial and find out 
> myself on this one.

In my opinion, lots.  While I mainly do lower-level library development 
and don't tend to make use of the design mode much, it's great for doing 
quick UI layouts and you can finally nudge components around and see how 
they'd look without wasting multiple compile cycles just to see the 
result of tweaking things a couple of pixels here and there.

The features that are really nice for the work I do are code outlining, 
code autocompletion, and real-time syntactical checking.  If you've used 
the Eclipse IDE before for Java development, expect roughly the same 
features, only for ActionScript 3 and MXML, from the Flex Builder IDE.
You could always add other Eclipse plugins if you'd like to support 
things like source-control integration and support for development in 
server-side languages from the same IDE.  For another comparison, if you 
liked PowerFlashers' FDT for Flash development enough to shell out the 
cash for it, you won't be disappointed with Flex Builder 2.

There's still quite a bit of room for improvement with Flex Builder 2, 
and it's still got some ways to go (e.g. refactoring support and UML 
code generation would be awfully nice), but the Flex Builder IDE as-is 
does make life a good bit more convenient and quickly pays for itself in 
development time saved.

Jim Cheng
effectiveUI


Re: [flexcoders] Test for Network Connection

2007-02-23 Thread Jim Cheng
Matt Maher wrote:

> I'm writing an on-line/off-line application that will sync your data
> once you return to an on-line status. Instead of calling an http
> service every 15 seconds to test for connection status, is there some
> way I can see deeper into the client's machine to see the status of
> network connection? Or perhaps a lighter "ping" mechanism that doesn't
> actually send anything over the wire to test for connection?

Right now, you'll probably need to do the regular remote ping, or 
alternatively, you could maintain an open socket connection to the 
server from your application and send "pings" over that rather than HTTP 
as doing so would reduce the amount of network traffic.  Doing this 
might be a little trickier though, particularly if you don't have much 
expertise on non-HTTP technologies on the server-side.

However, before you get too far ahead of yourself, note that ALL of 
these features will be in Adobe's upcoming Apollo platform.  Apollo is 
geared perfectly for the type of application you're envisioning: an RIA 
that can run both in a online mode and offline, with the capability to 
synchronize data against a remote server upon reconnection, and the 
ability to detect and receive notifications of changes in network 
connectivity.

You can see all of these features in action on Mike Downey's recent demo 
of the new eBay Desktop application that we're currently building here 
at effectiveUI.  Here's a video of the demonstration:

   http://www.demo.com/demonstrators/demo2007/91259.php

According to Adobe, a public beta of Apollo will be available soon on 
the Adobe Labs site, and you can learn more about Apollo and sign up to 
be notified when the beta becomes available for public consumption:

   http://labs.adobe.com/wiki/index.php/Apollo

Jim Cheng
effectiveUI


Re: [flexcoders] Just curious, A big development team or individual developers

2007-02-23 Thread Jim Cheng
boy_trike wrote:

> I wonder how many people are working on TEAM to develop their flex 
> applications (and how 
> many are 1 or 2 men (whoops I mean PEOPLE) developers.  Please discount the 
> Graphic 
> artists, HTML coders. et. al.  If you have 3 or more people working on the 
> same flex 
> application, please answer as a TEAM.  2 or 1, INDIVIDUAL.

I'd have to answer both.

We've built up quite a sizable engineering team here at effectiveUI. 
We're now at a few dozen developers and are still continuing to hire 
additional talent.  All are trained in Flash/Flex, with most members 
having significant expertise with an assortment of other development 
languages and technologies.

For many projects however, we tend to deploy and/or operate in small 
development teams that would typically fit under your one-to-two man 
"individual" classification, with the members drawn for the task 
dependent on project needs, specific skill sets, and availability.

Jim Cheng
effectiveUI


Re: [flexcoders] Java to Flex shifting ! Major Hurdles!!! (Shud I say Roadblocks! )

2007-02-23 Thread Jim Cheng
slangeberg wrote:
> Hey everyone,
> 
> I know there exists an article/whitepaper from Adobe outlining the new AS3
> VM2(?), but I can't find it. Anyone know where that is? I think it would be
> helpful for this gentleman's situation.

A good place to start would be the Adobe Component Developer Summit 
slides that Ted Patrick put up on his blog last summer:

http://www.onflex.org/ted/2006/07/adobe-component-developer-summit.php

Altogether, it's a fairly thorough overview of the Flex framework 
architecture, and includes a presentation by Gary Grossman on some of 
the virtual machine internals and how these relate to performance on the 
scripting side of things.

As to the VM itself, the C++ source code to Adobe's ActionScript 3 VM 
was released last fall to the community as open-source under the Mozilla 
triple license.  It's been christened Tamarin and is now part of the 
Mozilla codebase.  There's quite a bit of material about it to be found 
on the project site at:

   http://www.mozilla.org/projects/tamarin/

The sources include, among other things, the virtual machine proper, 
just-in-time compilers for dynamically recompiling the AVM bytecode to 
native machine code for PowerPC, Intel and ARM processors, and the new 
garbage collection implementation.

Note however, that it does not come with a compiler for compiling 
ActionScript 3 into bytecode.  For that, you'll still need to use the 
free ones from the Flex SDK or a third-party compiler.

Jim Cheng
effectiveUI


Re: [flexcoders] Getting duration of FLV 1.0 videos

2007-02-08 Thread Jim Cheng
beecee1977 wrote:
> Hi,
> 
> I want to be able to get the duration of any flv file using the 
> videoDisplay object. This works fine most of the time (just 
> myVideoDisplay.totalTime)... However, for older flv files (before 
> 1.1) this metadata is not included.

If you're not streaming them from FMS, you can also load the entire FLV 
into a ByteArray and parse the timestamps from the FLV tags for yourself 
using a bit of AS3 ByteArray magic.  Provided there's nothing strange 
about your FLV, the timestamp on the last tag should be your duration.

I recently ended up having to do exactly this to diagnose a particularly 
pestilent bug where some of my FLVs were reporting patently wrong 
durations as a result of corrupt tag timestamps.

You can get the FLV file format documentation from Adobe here:

   http://www.adobe.com/licensing/developer/

If you go this route, watch out for the timestamp byte order, it's a 
32-bit unsigned integer, but is formatted as a big-endian UI32 followed 
by a most significant UI8 rather than the typical order expected by the 
built-in readUnsignedInt() method.

Jim Cheng
effectiveUI


Re: [flexcoders] Re: BigInteger class for ActionScript

2007-02-08 Thread Jim Cheng
kaleb_pederson wrote:
> Number isn't suitable for my needs; it allows for very large 
> numbers, but its precision is limited to 53-bits.  I need between 
> 1024 and 4096 bit precision.  Specifically, I will need to generate 
> prime numbers that are between 128 and 512 decimal digits in length, 
> determine if numbers are relatively prime with those numbers, etc.  

If you don't mind porting some Javascript, Leemon Baird has written a 
public-domain Javascript library for handling arbitrary-precision 
arithmetic that you can try out and get the source code to here:

http://www.leemon.com/crypto/BigInt.html

If you're planning on doing a lot of such heavy lifting, I suspect that 
you'd likely see markedly better performance using a numerical analysis 
library compiled with processor-specific optimizations into native code, 
but to each his own

Jim Cheng
effectiveUI



Re: [flexcoders] Flex Automation API

2007-02-02 Thread Jim Cheng
gettier wrote:
> I am trying to get more information on use and capabilities of the Flex 
> Automation API.  The Class and Interface info from the Language 
> Reference doesn't really show how to use the API.

There isn't much documentation right now, so until Adobe remedies this, 
you'll need to read the source and have at least some understanding of 
how the rest of the Flex framework is built to get going with Flex 
Automation.  That's not to say that the documentation isn't helpful, 
it'll give you a good bird's eye overview of how everything is hooked 
together.

I've been playing with it quite a bit since it came out and for the most 
part, discovered how to get it to work with my own code through reading 
the code and trial and error.

To begin with, if you want to integrate into the whole framework, you 
should start with the Automation class and pass it the adapter class 
that'll be driving it.  Minimally, this adapter class should implement 
the IAutomationManager and IAutomationObjectHelper interfaces.

If you have the Mercury QTP plugin (requires a FDS license plus Mercury 
QTP), there should be an adapter already provided, though I don't know 
if Adobe provided the source code with that.  If, however, you're like 
me and don't have all that good stuff lying around, you can write your 
own adapter class and direct the output somewhere more useful--you've 
several options--a compiled-in debug window, over LocalConnection like 
how XRay does things, or over a socket connection to an external harness 
program that you've written.

The Automation class contains a map of registered component classes to 
their automation delegates in a static variable named delegateClassMap. 
   This is located in the mx_internal namespace, so you'll have to 
declare you're using it to get access to it (at your own risk, as some 
of the Adobe engineers have publicly stated that mx_internal variables 
are subject to change between revisions and aren't a guaranteed interface).

The standard Flex UI components and the charting classes have delegates 
already written.  You'll need to provide delegate classes for each of 
your own custom components if you want to automate them (see the Flex 
2.0.1 documentation for an example of how to write an automation 
delegate for Ely Greenfield's RandomWalk class).

Once you've loaded all your delegates, you can then use your adapter and 
the delegateClassMap to locate and create an automation delegate 
instance mapping to each component instance that you want to automate. 
At this point, your delegate can report appropriate functional events 
for logging and/or recording for replay to your adapter via its 
recordAutomatableEvent method, and can replay events on the component 
passed to it by calling the replayAutomatableEvent method.

If you don't care for the integrated framework aspect of things, you can 
also pursue a simpler approach of just including the necessary delegate 
implementation classes for your components and then creating instances 
of them referencing each of your components.  While doing so doesn't 
hang together quite as well, it does allow you to fairly quickly script 
a single component or two if you need some basic automation for testing 
client side form validation and the like.

That's the quick summary of how it all hangs together--there's a bunch 
of additional stuff like synchronization and identifier mangling that I 
haven't yet had enough time to figure out yet, but this should be enough 
to get you started making good use of the automation framework.

Jim Cheng
effectiveUI




Re: [flexcoders] Flex UG in Denver?

2007-02-01 Thread Jim Cheng
John Kirby wrote:

> Anyone know of a Flex Users Group in Denver... or would like to start one?

My company, effectiveUI, hosts one:

   http://flash.meetup.com/116/?gj=sj10

We meet monthly at the effectiveUI offices in downtown Denver, with the 
next meeting to be held on February 7th at 7:30pm.  We usually have free 
drinks and pizza or some other kind of food for all comers, though it'd 
be much appreciated if you RSVP at the Meetup page so that we have a 
better idea of how much to food to get.

Jim Cheng
effectiveUI



Re: [flexcoders] AS3 shell

2007-02-01 Thread Jim Cheng
Mikhail Shevchuk wrote:
> Is there any shell to play with Action Script 3 like ipython for python or
> smth. like that ?
> That would be extremely useful for rapid development.

See:

   http://www.mozilla.org/projects/tamarin/

Adobe's released the ActionScript 3 virtual machine to the Mozilla 
project under the standard triple license (GPL/LGPL/MPL).  There's a 
partial implementation of a self-hosted AVM compiler and interpreter in 
the esc directory.

If you don't mind a bit of hacking, you can probably roll together an 
interpreter shell for playing with ActionScript 3 with a little bit of 
work, although such an implementation would obviously not include the 
Flash Player intrinsic classes.

Jim Cheng
effectiveUI



Re: [flexcoders] Onscreen keyboard

2007-01-31 Thread Jim Cheng
Daniel Wabyick wrote:

> I am working on an onscreen keyboard for a touchscreen Flex application. 
> 
> Building out the UI should be simple, but I am wondering if anyone has 
> ideas on the best way to 'plug in' to the normal Flash key event 
> system.  I know I can get the current focused object via 
> focusManager.getFocus(), but I am uncertain as to the best way to 
> 'simulate' the keyboard. I can create KeyboardEvents, but how do I 
> dispatch them so that the appropriate components are listening?

First, get the Flex 2.0.1 updater if you haven't already.  The new Flex 
Automation framework source code that's enclosed in it will make all the 
difference between a couple hours of work versus pulling your hair out 
in frustration for weeks on end.

For components not based on TextField objects, it's trivial--call the 
dispatchEvent() method on the currently focused component with 
script-instantiated KeyboardEvent instances.  That's how Flex Automation 
does it.  You can see for yourself if you have the Flex 2.0.1 update 
installed.  Just dig framework source directory and check out line 272 of:

   mx/automation/delegates/core/UIComponentAutomationImpl.as

TextFields are trickier.  To get correctly emulated behavior, you need 
to both emulate the original keystroke plus do some text manipulation, 
since not all of it's behavior is mediated through the script-accessible 
keyboard events.  Aside from dispatching the event, you'll also need to 
set the selection to the next position and then replace the selected 
text with the character specified by your virtual keyboard for regular 
keystrokes, while special characters like enter, delete, backspace and 
such require some custom handling.  Again, the automation classes show 
you exactly how to do this, see the replayAutomatableEvent method (lines 
270-436) of:

   mx/automation/delegates/TextFieldAutomationHelper.as

That should be sufficient for most text entry situations.  If you need 
more even advanced event emulation, you should probably consider using 
Flex Automation.  Having tried and failed to do much of the same thing 
using ActionScript 2 in the past, I must say that the automation 
framework is truly a lifesaver when it comes to such skulduggery.

While automation is primarily intended for interaction logging and 
automated replay for testing purposes, it can also be exploited to 
simulate all manner of user interactions in non-standard ways (such as 
your virtual on-screen keyboard).  While the Mercury QTP plugin is 
needed for out-of-the-box testing with Mercury, you don't actually need 
to download the plugin installer (and shell out for a commercial FDS 
license) to get access to and make use of Flex Automation proper for 
your own purposes.

To hook into Flex Automation yourself, you'll need to write your own 
custom adapter classes implementing the IAutomationManager and 
IAutomationObjectHelper interfaces and connect these to whatever floats 
your boat (perhaps a server back-end, a built-in debugging dialog, or 
maybe even a future version of John Grden's XRay targeting Flex and 
ActionScript 3).

This shouldn't be too hard for a seasoned Flex developer familiar with 
the rest of the existing framework--I've managed to make a good bit of 
headway into writing a few test classes that integrate with the Flex 
Automation framework after a weekend's worth of hacking.  Unfortunately 
though, there's currently very little in terms of existing examples or 
documentation to help you find your way around in there.  Hopefully, 
Adobe might remedy this in the near future (hint, hint).

Jim Cheng
effectiveUI


Re: [flexcoders] ActionScript & Mozill

2007-01-24 Thread Jim Cheng
Abdul Qabiz wrote:

> What does it mean to me as ActionScript developer? I can use my existing
> skills and write code in other environment which uses Tamarin.

Absolutely.  I've been working with the Tamarin source code quite a bit 
recently and have found that the AVM+ run-time can be readily "abused" 
for doing file format conversions and other such automation from the 
command-line, as it already supports file I/O and binary data.  Adobe's 
Tamarin developers actually have one AS3 script that reformats an opcode 
table into a source and header file in C.

Just out of the box, this functionality is perfect for writing little 
AS3 scripts for manipulating and reformatting data, be they plain ASCII 
or binary much like what people more often use Unix shell scripting or 
Perl scripts.  If you ever needed to do global regular expression search 
and replaces across a lot of files and didn't know enough Perl, young 
ActionScript developer, now is your chance.

And just wait until Tamarin gets hooked in as the scripting engine for 
other bits of fun.  Maybe someone should nudge Blizzard to let us script 
World of Warcraft using AS3.  The boys here would certainly love it  ;)

Jim



Re: [flexcoders] AS3 code obfuscators

2007-01-18 Thread Jim Cheng
Daniel Wabyick wrote:

> Does anyone know of any AS3 code obfuscators out there?

I don't know of any publicly available obfuscators.  But, given the fact 
that Adobe has contributed the source code for the AS3 virtual machine 
to the the Mozilla community as the Tamarin project, it would not be 
very difficult for one to be written.

Be forewarned, however, there is already a basic AS3 decompiler written 
in AS3 available with the sources, and in them lie myriad starting 
points for writing bytecode analysis programs in both C++ and AS3 (or 
any other language of your choice, if you care to do the porting).

See:

   http://www.mozilla.org/projects/tamarin/

   http://www.5etdemi.com/blog/archives/2007/01/as3-decompiler/

Like others have already mentioned, you're best off keeping your highly 
sensitive code tightly secured on the server-side.  That is to say, you 
really shouldn't implement trade secrets or sensitive financial data 
encryption algorithms in a SWF.  But if you want to make your latest 
Flex-based game a little bit harder to steal or cheat at, obfuscation 
might at best deter casual thievery and create more busy work for the 
truly dedicated.

That being said, there are still quite a few "very interesting things" 
that can now be done given that we've got the Tamarin source code.  ;)

Jim


[flexcoders] URLStream.readObject() Bug?

2006-10-19 Thread Jim Cheng
Hey everyone (especially Adobe engineers), I think I've found a bug with 
ActionScript 3.0's URLStream.readObject() method while trying to read 
some legacy AMF0 files that I have lying around from a previous AS2 project.

To set the stage, I have a bunch of AMF0 streams that were generated 
from Flash Player 8 and saved to files via Flash Remoting and a little 
bit of custom server-side magic (http://www.radicalconcepts.com).

Today, I tried reading some of these files directly into a Flash Player 
9 SWF locally via URLStream rather than the traditional approach of 
using Flash Remoting.  So, running locally within the standalone debug 
player, I read in one of my AMF files and then called readObject() on 
it, only to have the method read a single byte and return a boolean 
true, even though my AMF file actually contained an object.  The 
contents of the file was confirmed through inspecting the file with a 
hex editor with the AMF0 specifications in hand.  Well, Edwin van 
Rijkom's unofficial version, as I don't recall an official spec from 
Macromedia (http://www.vanrijkom.org/archives/2005/06/amf_format.html).

I have the objectEncoding property set to AMF0, and I'm not attempting 
to deserialize until the stream has finished loading.  Inspecting the 
bytes individually via URLStream's readByte() method also confirms that 
the bytes are indeed correct and match up with what's seen in my hex 
editor.  As far as I can tell from the documentation, I'm doing things 
correctly.

Trying a handful of other AMF files yielded the same result.  However, 
if I copy all of the bytes out of the URLStream instance and into a 
ByteArray instance and call it's readObject() method instead, the AMF0 
encoded object deserializes just fine.

I've a simple test case here:

   http://dev.psalterego.com/ReadObjectTest.zip

The example AMF0 file is named test.amf and is located in the /bin 
folder.  You'll need to compile the enclosed MXML file and then run the 
SWF locally using the debug player--the trace outputs should be fairly 
self-explanatory.

If you can spare the time, I'd very much appreciate it if some others 
can verify this so I can be sure that I'm not smoking the crack rock.

Thanks,

Jim Cheng
effectiveUI


--
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] Character Sets?

2006-10-16 Thread Jim Cheng
Ethan Miller wrote:

> Wondering if Flex and the Flash player use the character set  
> specified in  the HTML wrapper or if there is character set support/ 
> configuration elsewhere?

The Flash Player uses Unicode by default.  However, it can be instructed 
to use the host operating system's current code page instead.  See also:

For Flash Player 8 (e.g. ActionScript 2.0 for Flash and Flex 1.5):
http://livedocs.macromedia.com/flash/8/main/2729.html

For Flash Player 9 and Flex 2.0 (ActionScript 3.0):
http://livedocs.macromedia.com/flex/2/langref/flash/system/System.html#useCodePage

Hope this helps,

Jim


--
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] Calling one Flex app from another

2006-06-30 Thread Jim Cheng
mthielman11 wrote:

> So my question is, is this even possible?? Can I open a certain state
> in another flex application from a different flex application? ?

Yes, you have a few of options for client-side cross-SWF communication.

The first option is to use the LocalConnection class.  This has the 
advantage of not requiring any recourse to browser-based JavaScript and 
runs on pretty much any platform that supports Flash.  Additionally, it 
can handle serialization of core ECMAScript objects quite nicely without 
you having to do additional work on your end.  It does have several 
drawbacks though, namely a 40 kilobyte limit on the maximum amount of 
data passed on each request and a maximum number of calls that can be 
made per frame (this is about 10 times the framerate, if I recall 
correctly).

Alternatively, you can pass data through JavaScript.  In Flex 2, you can 
do this via the ExternalInterface API, or in Flex 1.5 or earlier, via 
the fscommand() call.  This doesn't have the limitations that come with 
using LocalConnection and will allow you to interface with JavaScript 
quite nicely if you're doing additional scripting there.  However, you 
may need to do your own serialization, and this technique is known not 
to work on all browsers, particularly on Internet Explorer and older 
versions of Safari on the Macintosh.

Lastly, you can always pass data between the two via a back-end server, 
though this wouldn't be particularly efficient and would probably result 
in more latency than you'd like.


Jim


 Yahoo! Groups Sponsor ~--> 
Check out the new improvements in Yahoo! Groups email.
http://us.click.yahoo.com/6pRQfA/fOaOAA/yQLSAA/nhFolB/TM
~-> 

--
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/

<*> 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] bad graphical glitches using Flex in Firefox

2006-06-29 Thread Jim Cheng
Pan Troglodytes wrote:

> Can some other folks here do a test and see if you can reproduce this on 
> your machine?  Remember, big windows are key.  I found if I dragged a 
> very small window around, I never got it.

I've run into very similar issues on a somewhat similarly configured 
machine (dual monitors, 1200x1600 each in portrait orientation) with 
various Flash players for years--from Flash Player 7 through Flash Player 9.

In particular, this seems to particularly evident in movies with 
relatively large pixel dimensions (my largest are 1200x1600--yes, full 
screen on one of the monitors) and movies running under significant load 
(e.g. doing seconds-long heavy lifting in ActionScript that causes the 
rendering cycle to slow down significantly).

I can also concur that I've never seen this with movies of relatively 
small dimensions, say the default 550x400 pixels, although most of mine 
that are that size tend to be fairly simple tests whereas my large 
movies tend to be rather complex with occasional periods of "heavy 
lifting" as mentioned above (hundreds of classes, 500KB+ SWFs).

I see the exact same effect--rectangularly aligned portions of the Flash 
movie's window go "blank" to some background color when another window 
is being dragged across them.  However, if another window is slowly 
dragged over the misdrawn areas again , the Flash Player will usually 
redraw correctly once again.  For the most part, I've just ignored it as 
for me, it's been only a development issue as the target applications 
using the affected SWFs are deployed as wrappered executables that run 
in full-screen mode where these draw problems aren't an issue.

I almost never use Internet Explorer outside of accessing the Windows 
Update site, so I don't recall having tested or seen this effect under 
Internet Explorer.

My configuration:
Firefox 1.5.0.4
Windows XP Professional SP2 (patched up-to-date)
NVidia GeForce 6800
Intel Pentium 4 HT 2.80GHz

Jim


 Yahoo! Groups Sponsor ~--> 
Check out the new improvements in Yahoo! Groups email.
http://us.click.yahoo.com/6pRQfA/fOaOAA/yQLSAA/nhFolB/TM
~-> 

--
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/

<*> 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: company branding in flex??

2006-06-27 Thread Jim Cheng
dandiodati wrote:

> Has any one had to do company branding? Is there not a way to change the
> external style sheet dynamically?

As you've already noted, the CSS styles are compiled into the SWF at 
compile-time, so there isn't a quick way to together a SWF that'll be 
can load and apply external CSS files on the client-side.  However, you 
do have a few options.

Probably the simplest solution is to generate your MXML referencing your 
desired CSS file(s) on demand and compile the SWFs via Flex 1.5 or Flex 
Data Services for Flex 2.0 on your server upon request.

A trickier option would be write your own ActionScript classes to load 
in your CSS file, parse it, and apply the styles to the specified 
components at run-time.  Note that you don't necessarily have to define 
your styles in CSS though--in some of the projects that I've worked on, 
for instance, we went with a simpler JSON-style object tree containing 
name-value pairs for styles to be applied as CSS parsing, especially 
when done in ActionScript 1 or 2, isn't particularly all that fast. 
Unfortunately such functionality isn't built into the Flex Frameworks, 
so you will need to code it yourself.

If you do end up electing to write your own support for loading full-on 
CSS at run-time, Claus Wahlers had previously written open-source CSS 
parsers for Actionscript 1 and 2 that you might be able to reuse and 
extend for your purposes.  Though if you really do want do this, you 
really should seriously consider using ActionScript 3.0 as the heavy 
lifting involved takes quite a few seconds with the old AVM.  If you're 
interested, you can get these here:

   http://claus.packts.net/
   http://sourceforge.net/projects/ugo/

Jim



 Yahoo! Groups Sponsor ~--> 
See what's inside the new Yahoo! Groups email.
http://us.click.yahoo.com/2pRQfA/bOaOAA/yQLSAA/nhFolB/TM
~-> 

--
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/

<*> 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/
 





[flexcoders] [Job] Sr. Flash ActionScript Developer - Denver, CO

2006-06-01 Thread Jim Cheng



Hi everyone,

My company (Effective UI/Architekture.com) is once again hiring!  We've 
got quite a number of large Flash/Flex Rich Internet Application 
projects and not quite enough developers.  So, we are looking for a few 
senior-level (read: kick-ass) developers with very strong ActionScript 
2.0/3.0 skills who can hit the ground running.

We mainly do application development and specialize in Flash and 
Flex-based RIAs, with some rapid prototyping and FMS-based real-time 
collaboration thrown into the mix.  You needn't worry about getting 
stuck coding preloaders and splash screens here.  However, if you've a 
knack for solving difficult problems and you're constantly pushing the 
envelope with ActionScript, this is definitely the place for you.

Ideally, you'll have solid object-oriented design and programming 
abilities and have strong ActionScript 2.0 coding skills.  You know the 
core APIs inside and out, and have ample experience designing and coding 
custom components based upon the Macromedia V2 component architecture or 
something similar.  You can write clean, efficient and well-documented,
maintainable code.  You should also be comfortable integrating Flash 
front-ends with a variety of back-end systems with your choice of 
protocol, say, with Flash Remoting, RTMP, AMF, Web Services, or maybe 
your own XMLSocket-based protocol.

If you've already been working in ActionScript 3.0 with the Flex 2.0 
public betas, that's even better.  We'll also be quite impressed if 
you've built Flash Communication Server / Flash Media Sever-based 
applications, know some other programming languages such as PHP, C#, 
ColdFusion or Java, or have ample experience with third-party Flash 
development tools such as FDT, MTASC, FLASM and HaXe.  You'll also
get kudos if you're comfortable around the Eclipse IDE and source 
control programs.  And, while this is a very tall order, if you're one 
to blog about Flash or you contribute to Flashcoders or Flexcoders, we'd 
just adore you.

Our offices are in downtown Denver, CO--just a couple blocks from the 
16th Street Mall.  We pretty casual, as in we don't have time clocks and 
we don't make a fuss about corporate rules, dress codes and the like.
We'd prefer Colorado residents, but we'd certainly consider relocating 
someone with the right mix of skills and experience.

Interested?  Email us and tell us why we should just put aside everyone 
else's resumes and hire you on the spot.  Show us your resume, some 
examples of your work, most importantly, your code.  Show us the 
real-time 3D renderer that you're writing in ActionScript 3.0, or maybe 
a demo of that almost-done hand-optimized shooter that you're building 
in FLASM.  We'd love to see it.  Got a blog, or maybe you've authored a 
few books about Flash?  Send us the links.

Still here?  Then send your email to [EMAIL PROTECTED]  And please, 
check that you're not replying to the list--you'll just look silly and 
annoy everyone.

Regards,
Jim










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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



   Visit your group "flexcoders" on the web. 
   To unsubscribe from this group, send an email to: [EMAIL PROTECTED] 
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.