Flex and Flash have different markets, different teams working on them, and different release schdules. The unfortunate side-effect of this is that they are out of sync. Everyone knows, both at Adobe and out, that Flex & Flash are a winning combo.
Therefore, using the two in tandem only works well in Flex 1.5 and Flash 7 (MX 2004 & Flash 8 can both output Flash 7 SWF's for use in Flex 1.5). Flex 2 isn't done yet, and when it is, Flash 8.5 (Blaze) will only be in alpha so we're not at a stage yet where the 2 can be used in tandem. I agree with your functionality integration points, though, and I bet you Adobe does too. It's just a matter of time before it's possible with Flex 2 and Flash 8.5, just not yet. ----- Original Message ----- From: "Mark Wales" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Saturday, February 18, 2006 12:38 PM Subject: RE: [flexcoders] Actionscript-based Applications with Flex 2 The short answer of what I want is to be able to build analytic tools that combine visual and text oriented information. To me, these are not different programming paradigms; they are just two different ways of visualizing data. The text-oriented piece is easy: Flex. The generic graphing capabilities are also easy: charting components. I just happen to want to do things that do not fit well into pie charts and bar graphs (nor can my desired behaviors be easily derived from them). [BTW, the geospatial corollary is evolving nicely using Yahoo Maps, ESRI, or other potential solutions.] But as you know, there are many, many other visualization techniques that can help represent data that don't fit into these categories - and the fairly traditional drawing and animation techniques available in Flash are very well-suited to solving the problem. Combining them *programmatically* with Flex (by that I mean just writing a few lines of Actionscript) seems harder (or at least much less documented) than it should be. In my example, I basically described wanting to use Flex controls to define, place, alter a Sprite and then have mouse clicks on the Sprite be recognized by Flex. While I am not asking anyone to code anything for me, isn't it a bit surprising that there are no obvious or well-publicized demos that can do this? The specific task at hand is to build a directed graph - lines connecting nodes with the ability to move a node and have its lines go with it and the ability to drive the event associated with a node selection back into Flex. For a platform/language combination as capable as Flash + Flex/Actionscript, this should be an absolute no-brainer. However, it turns out this type of interaction is either harder, trickier, or less publicized than it should be. (Although JesterXL provided some good tips I've not yet had a chance to try) -Mark -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Roger Gonzalez Sent: Saturday, February 18, 2006 11:10 AM To: [email protected] Subject: RE: [flexcoders] Actionscript-based Applications with Flex 2 I'm a little puzzled. It seems like you're mixing up what you want. Flex applications -can- use Flash Player functionality, down to pretty much the lowest level. However, Flex has a programmatic metaphor, whereas Flash Authoring has a visual metaphor. For some problems, the visual metaphor makes more sense when creating things. The model in Flex is that you mostly author code-oriented things in Flex, but that you can author visually-oriented things in Flash. In other words, the components are built in Flex, the skins for those components can be built in Flash. Your choices are then either to Embed the Flash-Authoring-built visual assets into Flex, or else to dynamically load them at runtime. At the moment (because of version skew between the products), assets built in Flash Studio 8 use a different version of the Actionscript language than what Flex 2 expects. When you Embed something with AS2 code in a Flex 2 app, it will unfortunately strip out AS2 bytecode. If you load it at runtime, it will still be there, but direct interop between the two virtual machines is limited. Again, this is a temporary phase; Blaze (the next version of Flash Authoring) will support AS3 directly, and will have a beta version out around when Flex 2 ships. -rg > -----Original Message----- > From: [email protected] > [mailto:[EMAIL PROTECTED] On Behalf Of Mark Wales > Sent: Saturday, February 18, 2006 5:33 AM > To: [email protected] > Subject: RE: [flexcoders] Actionscript-based Applications with Flex 2 > > Jesse, > > First, let me apologize for a somewhat misleading subject > line. My goal is to define a project that uses both Flex and > Flash components in the same project. It simply appears that > an Actionscript-only project is the most likely to work. > > In Flex speak, what I think this means is that I would like > to create an Actionscript project that embeds both an > Application container and a non-Application container. For > example, if a high-level description of my project is > something like this: > > Everything from 0,0 to 200,300 is my (Flex) application > container where I'll do Flex stuff and everything else on the > screen is where, perhaps, I'll draw Sprites and have them > bounce around. And, as either container generates events, > either container can add listeners to process them. > > Then it appears the standing advice is to create and > separately compile a SWF component for the Flash stuff and > embed it in my Flex app. Is this really the only route? > > In my ideal world, I could embed a "canvas-like" component in > my Flex application, and then draw, play with Sprites, or run > animation-type stuff within it. I'll certainly settle for > less, but from a big picture sales/marketing perspective, > this is what Java (and WebStart) can do (albeit with much > more work but at least a bit more consistency of approach). > > The combination of Flex and Flash are both superstars within > their respective domains - but on first glance, it is not > quite clear they can play together very well. > > -Mark > > > > > -----Original Message----- > From: [email protected] > [mailto:[EMAIL PROTECTED] On Behalf Of JesterXL > Sent: Saturday, February 18, 2006 1:27 AM > To: [email protected] > Subject: Re: [flexcoders] Actionscript-based Applications with Flex 2 > > If you are looking for a HelloWorld, see the bottom of this > email. Here's the quick(?) skizzy on the various technologies. > > Don't have time? Read to the ######### to skip the background. > > Flash Player 8.5 is engineered to work with the improved > ActionScript 3 language, and have pimp new features. > > ActionScript 3 is a clean-up of ActionScript 2, a stricter > adherence to ECMA (depending on who you talk to), and > organized around the new package organization structure with > additional constructs added in. > > Can you create applications alone with those 2 technologies? > Yes. Would I personally want to? Hell no. If you paid me > too? Nope, because I'd inform you that you are over-paying. > > Flex Framework 2 is the creation of a set of compoents and > framework classes to do all the things needed to create > applications. Your buttons, and dropdowns and datagrids, > your data classes that expose server operations in a clean > and easy to use API. Your modality, focus management, binding, etc. > > The same reason you use the Flex Framework 2 to create > applications instead of pure ActionScript 3 is the same > reason you use Rails for Ruby, ActionStep for C, Cake for > PHP... common problems, tasks, and needs are solved by well > written and proven application component frameworks. > Re-inventing the wheel, while cool from a developer's > standpoint, is not cost-effective business. > > On the flip-side, there are many who will never use the Flex > 2 framework. For example, I currently cannot use it's > pre-decessor, the v2 component framework for Flash 7 on my > cell phone; I have to resort to pure ActionScript 2 and > modified-Flash Player 7 technology. I have no choice, the > CPU and RAM requirements of the phone force me to do so. > Naturally, 2 things happen; the scope of my work is greatly > limited, and I still make at least a lean set, enough to get > me to an acceptable level (buttons, labels, image loaders, etc.). > > Now, Flex is unique in that mxmlc, the commandline compiler, > actually knows about things like MXML as well as ActionScript > files, and compile both into a SWF. This is further expanded > upon because the mxmlc and the Flex Framework were built in > tandem, allowing certain compilation features and framework > features to be mutually exclusive in benefit. Therefore, > while there is no reason someone couldn't port the ActionStep > framework to ActionScript (they are actually...), Flex > Framework has an advantage out of the starting gate because > it takes advantage of some of the new features mxmlc has in > regards to creating SWF's. > > Bottom line, while you can do this: > > var a:Sprite = new Sprite(); > addChild(a); > a.addEventListener(Event.CLICK, onPress); var g:Graphics = > graphics; a.beginFill(0x000000); a.lineTo(100, 0); > a.lineTo(100, 22); a.lineTo(0, 22); a.lineTo(0, 0); a.endFill(); > > ...using the framework, you can do this instead: > > <mx:Button click="onPress" /> > > Beyond the portability of the code, let-alone readability, > it's approachability from those with an HTML background, it > has many other benefits not so easily visible. > - built-in focus management > - already looks like a button > - has an optional label > - has rounded corners looking more like a button than a box > - is in the MX namespace, allowing other buttons to be differentiated > - has rollover states > > ... I could go on all night. > > Yes, there is more overhead, but it is negligible, > ecspecially with the speed improvements made in Flash Player > 8.5. At this point in the software industry, there is little > point to do these things in code when months of development > consisting of dozens of developers, qa, managers, etc. has > already been done for you.. and it's free I might add. > > ...unless of course you are developing for a phone, set-top > box, XBox, or some other low-resource environ, where I'd > concur it is a wise decision to abandon the framework. Of > course, we aren't there yet. > > > ######### > Bottom line, if you create a Flex project, you have to use > Flex components (at least at the forefront) as shown here: > http://www.helpqlodhelp.com/blog/archives/000140.html > > > > > ----- Original Message ----- > From: Mark Wales <mailto:[EMAIL PROTECTED]> > To: [email protected] > Sent: Saturday, February 18, 2006 12:14 AM > Subject: [flexcoders] Actionscript-based Applications with Flex 2 > > > I am interested in writing an "all Actionscript" application > (i.e. using the Actionscript project option within the > Eclipse-based Flex Builder) that combines both Flex-based and > traditional Flash-based components. > > For example, I want to define a Canvas on one side of the > screen and populate it with the traditional Flex-based > components then create things like DisplayObjects, Sprites, > whatever on the other side - while having events from both > "sides" intermingled (for lack of a better word) using events > and listeners. I am fine going with a strictly "Flash 8.5" > diet (that is the future after all, right?). > > Everything I read seems to imply that these must be in > different SWFs and that there is a fair bit of gymnastics > involved in achieving even nominal interoperation between the > two paradigms. > > Am I missing something? Are there any "simple" examples out > there to illustrate how this might work? (Preferably ones > that don't require CF like the FileUpload example on the > Macromedia site, don't try to get fancy with MovieClips and > animation, etc.) > > The ideal scenario would be an application where, on the Flex > "side" I could pick "square" from a pull-down list of a few > standard shapes, press a button, and something vaguely > resembling that description would appear using flash > components. Then, when that component was clicked/moved, > perhaps it could make the name of the event that fired show > up in a Flex label. Effectively the "Hello World" of the new > and improved Actionscript. Does anyone have anything like that? > > -Mark > > > > > -- > 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 > <http://groups.yahoo.com/gads?t=ms&k=Web+site+design+developme > nt&w1=Web+site+design+development&w2=Computer+software+develop > ment&w3=Software+design+and+development&w4=Macromedia+flex&w5= Software+development+best+practice&c=5&s=166> &.sig=L-4QTvxB_quFDtMyhrQaHQ> Computer software > development > <http://groups.yahoo.com/gads?t=ms&k=Computer+software+develop > ment&w1=Web+site+design+development&w2=Computer+software+devel opment&w3=Software+design+and+development&w4=Macromedia+flex&w5> =Software+development+best+practice&c=5&s=166&.sig=lvQjSRfQDfW udJSe1lLjHw> Software design and development > <http://groups.yahoo.com/gads?t=ms&k=Software+design+and+devel opment&w1=Web+site+design+development&w2> =Computer+software+development&w3=Software+design+and+developm ent&w4=Macromedia+flex&w5=Software+development+best+practice&c=5> &s=166&.sig=1pMBCdo3DsJbuU9AEmO1oQ> > Macromedia flex > <http://groups.yahoo.com/gads?t=ms&k=Macromedia+flex&w1=Web+si te+design+development&w2=Computer+software+development&w3> =Software+design+and+development&w4=Macromedia+flex&w5=Softwar e+development+best+practice&c=5&s=166&.sig=OO6nPIrz7> _EpZI36cYzBjw> Software development best practice > <http://groups.yahoo.com/gads?t=ms&k=Software+development+best +practice&w1=Web+site+design+development&w2> =Computer+software+development&w3=Software+design+and+developm ent&w4=Macromedia+flex&w5=Software+development+best+practice&c=5> &s=166&.sig=f89quyyulIDsnABLD6IXIw> > > ________________________________ > > YAHOO! GROUPS LINKS > > > * Visit your group "flexcoders > <http://groups.yahoo.com/group/flexcoders> " on the web. > > * To unsubscribe from this group, send an email to: > [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > > * Your use of Yahoo! Groups is subject to the Yahoo! > Terms of Service <http://docs.yahoo.com/info/terms/> . > > ________________________________ > > -- 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 -- 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 -- 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/

