tag:blogger.com,1999:blog-89552162544872680722024-02-06T23:43:20.338-08:00Fingers DancingRoss Phillips ~ Adventures in Flex and ColdFusionRoss Phillipshttp://www.blogger.com/profile/05098392452454494192noreply@blogger.comBlogger57125tag:blogger.com,1999:blog-8955216254487268072.post-75492232523241636272012-12-16T11:08:00.000-08:002012-12-16T11:08:17.229-08:00How much a wrapper of a lib should be documented?I was looking for a service on the npm to install my Node.js application as a Windows service. Pretty straight forward stuff really and I came across <a href="http://jfromaniello.github.com/winser/">winser</a> which is a nice module that easily allows you us it to do this. The documentation even shows how to do this when you install the npm module which I must admit is very nice using the npm <a href="https://npmjs.org/doc/scripts.html">script feature</a> "postinstall" to install your module as a Windows service. <div>
<br /></div>
<div>
All had been going well when I was using winser but when I install it on the testing environment things suddenly took a turn for the worse. All of a sudden the test box became unresponsive and then rebooted itself. All of this happened only moments after I had install the module. I knew this environment was not setup correct and my application self terminates once it can not find the correct settings/start up as expected. Problem here which I didn't know was that the library winser relies upon to register the application as service, <a href="http://nssm.cc/">nssm</a> has more configuration options. One important one is a throttling mechanism when your application exits after a certain period of time. This works well if you are within this time period but outside of it your application is automatically restarted. This is the default setting of nssm library when an application exits. This default period which the throttling mechanism comes into is 1500ms. So once your application passes 1500ms nssm assumes the application to be up and running successfully. Unfortunately this is not the case for my application which would exit after 1500~1600ms... which lead to the application tight looping on restarts... which lead to excessive messages going to the Windows logs and CPU consumption that lead to my test server crashing.</div>
<div>
<br /></div>
<div>
To me this shows that sometimes important default settings/behaviours are not obvious when they should be to a developer. If I had knew the default behaviours I would have looked to change the defaults but I had not. After reading a lot about nssm (probably more than I should have needed too) I am now excited about the next version of nssm 3 which will allow you to control a lot of these settings without editing the Windows registry.</div>
<div>
<br /></div>
<div>
Even though it is easy to wrap up functionality to make it available cross programming languages. It is important to include the documentation/usage of that library from the original in the wrapper. </div>
<div>
<br /></div>
<div>
<br /></div>
Ross Phillipshttp://www.blogger.com/profile/05098392452454494192noreply@blogger.com0tag:blogger.com,1999:blog-8955216254487268072.post-90327394114761654982012-12-01T23:11:00.002-08:002012-12-01T23:11:37.149-08:00NodeJS connection times out after 2 minutesI've been working on an application that is a REST based API. It is fairly simple with the only exception that it transfers largish amounts of data (50MB+). This is not particularly hard for Node.js to do and I would say a great fit as you really can build an application with a small memory foot print. I was really please to be able to stream the data back to client with the application using less memory than the data sent. At the time I was using <i>wget</i> to call the API with simple requests so I could test my code was working. This is pretty straight forward and wget is a great little tool when developing this type of stuff as most browsers would crash when they tried rendering the 50MB of data. So I had really good way of testing the API each time I added a part to it. <br />
<br />
All was going until I came across a strange situation after completing development of another API call. This new call would timeout at 2 minutes. I was perplexed as I didn't expect this as nothing had gone awry but the call had a lot of computation which meant no data would be sent to the client for several minutes. First I thought it was wget's timeout... but it's default is 15 minutes so no way was it in the wrong. Wget has a few timeout settings so I had a go messing around with them but no joy... no matter what I did it would always at 2 minutes timeout with this new API call. So I tried a browser on the off chance something was screwy with wget but again they had the same issue. It occurred to me then that it had something to do with the Node.js and an internal timeout. I read the <a href="http://nodejs.org/api/http.html#http_class_http_server" target="_blank">http.Server</a> documentation inside out and there is no mention of a connection timeout when sending data... I was confused and annoyed at this point. This feature/behaviour is not described/documented in the Node.js API. After a bit of searching I found a some information that the response connection times out after 2 minutes (120 seconds). <br />
<br />
If you look source code of <a href="https://github.com/joyent/node/blob/master/lib/http.js">http.js</a> you will see at line 1700 (v0.8.15) the code responsable for the timeout. Unfortunately there is not much in the code that states why the timeout is hard coded.<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">socket.setTimeout(2 * 60 * 1000); // 2 minute timeout</span><br />
<br />
The documentation does mention the <a href="http://nodejs.org/api/http.html#http_request_connection">http.ServerRequest.connection</a> object but makes no mention of the <a href="http://nodejs.org/api/http.html#http_class_http_serverresponse" target="_blank">http.ServerResponse</a>.connection object. I must admit I am surprise that there is no mention of this as how else would a response get back to the client? The corrective action is pretty straight forward by setting the timeout on the response object.<br />
<br />
<br />
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;">http.createServer(function (req, res) {</span></div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;"> res.</span><span style="font-family: 'Courier New', Courier, monospace;">setTimeout</span><span style="font-family: Courier New, Courier, monospace;">(0); // Never timeout</span></div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;"> /* </span></div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;"> Do stuff</span></div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;"> */</span></div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;">});</span></div>
<br />
<br />
I did hunt around the code base to really understand why there is a timeout of 2 minutes defined. The best I could do is following which comes from the following commit <a href="https://github.com/joyent/node/commit/7a2e6d674a94e01a17e856b4d51ec229fad9af51">https://github.com/joyent/node/commit/7a2e6d674a94e01a17e856b4d51ec229fad9af51</a><br />
<br />
<br />
<br />
<div class="commit-title" style="border: 0px; color: #213f4d; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 18px; font-weight: bold; margin-bottom: 8px; padding: 0px; text-shadow: rgba(255, 255, 255, 0.498039) 0px 1px;">
Default to 2 second timeout for http servers</div>
<div class="commit-desc" style="border: 0px; color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 13px; line-height: 18px; margin: -4px 0px 10px; padding: 0px;">
<pre style="border: 0px; color: #596063; font-family: Monaco, 'Liberation Mono', Courier, monospace; font-size: 14px; max-width: 100%; padding: 0px; text-shadow: rgba(255, 255, 255, 0.498039) 0px 1px; white-space: pre-wrap;">Taking a performance hit on 'hello world' benchmark by enabling this by
default, but I think it's worth it. Hopefully we can improve performance by
resetting the timeout less often - ideally a 'hello world' benchmark would
only touch the one timer once - if it runs in less than 2 seconds. The rest
should be just link list manipulations.</pre>
</div>
<br />
<br />
Do note the committer <a href="https://github.com/ry">ry</a> mistakenly stated seconds instead of minutes in the commit notes but it would appear the is reason is performance. It has been interesting investigating the cause of my grief but I don't feel the need to remove the 2 minute timeout as it does server a purpose and my situation of keeping a response open which has long periods (minutes) of no data being written is not a common use case.<br />
<br />
<br />Ross Phillipshttp://www.blogger.com/profile/05098392452454494192noreply@blogger.com1tag:blogger.com,1999:blog-8955216254487268072.post-20361678961088162872011-11-22T00:28:00.001-08:002011-11-22T00:45:55.599-08:00Thoughs on LESS CSSSo if you don't know about <a href="http://lesscss.org/" target="_blank">LESS CSS</a> it is a way to generate CSS given a LESS file/object which consists of a lose set of rules. First impressions this seems really powerful - a way to generate CSS using programming logic. The problem is that is only limited to generating CSS and not adding additional functionality to CSS. So even though there is or maybe has been hype around CSS for a developer who is not a CSS developer this has little to no value to you. In fact I would go as far to say that it has limited use for CSS developers. Reason I say this is a website design tends not to have a lot of design which can be reused nor is it easy to predict the reuse. Only real exception to this is website which have a big templating base such as Wordpress. I can see making different colour themes template really useful but that is really where it ends. So for me it gets put in the really cool category but I don't have business case for it.Ross Phillipshttp://www.blogger.com/profile/05098392452454494192noreply@blogger.com2tag:blogger.com,1999:blog-8955216254487268072.post-9094519964277213962011-10-14T21:58:00.000-07:002011-10-14T21:58:04.036-07:00Are things getting more usable? Or just not for developers?I was reflecting from the past week and recalled a number of UX/usability issues with products that I thought should be easy. Maybe things are being made so easy that it is it making it too hard for someone like me to use? I was using Microsoft's Outlook 2007 email client and all I wanted to do was to view the HTML source of the email. Previously this was pretty straight forward and obvious to do (well from my recollection). As I didn't need to search the interwebs for an answer. The obvious choice of something being under the view menu was no longer applicable and eventually found it in a sub menu under Other actions (http://www.technologyquestions.com/technology/microsoft-office/61907-view-html-source-outlook-2007-a.html). So why wouldn't this functionality be under the view menu? I don't know the reasons why Microsoft put this functionality in this obscure location but it gets me thinking it is hiding functionality from the user. Probably the real answer is that a developer(me) is no longer an audience which gets functionality aimed it. Instead it is "hidden" or obfuscated from me, where it is there but no longer obvious. This is the same for Windows Vista/7 which I do my best to skin it back to Windows 2000 where I could quickly find functionality and be productive. Windows Explorer used be a great place to manage files but now with My Computer taken over I find it to be productive manage files.<br />
<br />
I understand I am not the target audience. Scratch that I bought the product so should it not be aimed at me? This is where I feel UX in software is failing because they can not be customized for me. I was using my accounting software Xero today and all I wanted to do is search over my expenses. Fairly simply functionality to do a search over a table right? Maybe it's just that I want something that they have yet to implement? Put it on the suggestion list you say? The real issue is that my needs will never match everyone else.<br />
<br />
This brings me to the thought that UX/usability should be focused less on a generic customer(s) and more directed to each customer. You might be thinking "Hey Ross, to that you'd needs mega bucks.". Well I would agree with you but I think this is the direction where software needs to move to. We have seen a lot of movement recently with enterprise software being pressured to deliver consumer software type features. In the enterprise world you would create one page/module which only a small number of users and it would exactly what they needed to be productive. Where as consumer software you do not have ability for that level of customization to occur. So instead consumers create new work-flows to get around those needs. If they are lucky there is a product that better suit's there needs and they migrate to it. This is what consumer software needs to learn from the enterprise. Software needs to be to be customized to me.Ross Phillipshttp://www.blogger.com/profile/05098392452454494192noreply@blogger.com0tag:blogger.com,1999:blog-8955216254487268072.post-591941646061407132011-10-07T16:14:00.000-07:002011-10-07T17:05:14.215-07:00Reflections on MAX 2011Well I just got back from MAX and I would have to say it was probably my worst experience. Not because of the event in anyway but I got really sick with a virus/flu/MAX killer bug at 4am on Monday/day 1 of MAX. So I missed the entire day and only pulled myself together on day 2 to get to see the keynote and stick around for the famous "sneaks". I was about all out of energy once the sneaks had ended and bitterly disapointed I was going to miss the MAX bash. It looked really fantastic when the bus took me back to my hotel to rest and recover. So come day 3 I had to pull out as I was travelling home the next day back to New Zealand which is about 14 hours of flying. So in reflection it was my worst MAX but that was to do with me than the conference. I can't say it enougth that it sucked I was sick at MAX. When I had moments of feeling well I popped online to see what was up and caught up on day 1 keynote. I have to give Adobe kudos for getting these resources up so quickly.<br /><br />I read a blog post which I think best reflects my opinion of the event in general.<br />http://www.rblank.com/2011/10/06/thoughts-on-adobe-max/<br /><br />The only additional thing I'd like to say about the event is where was Adobe's CEO Shantanu Narayen? Of the past three MAX's he started the day 1 keynote. So why was he missing? The first MAX I attending was in 2008 I was like who is this Shantanu guy as he was not a familiar face to me but I got used to seeing him at the start of each keynote on day 1. Bit of a mystery to me.<br /><br />The one thing on my MAX wish list was to see a new developer focused tool towards HTML/JavaScript development. Yes Dreamweaver can do it but it's audience is not focused towards developers. I want an awesome HTML/JS eclipse plugin similar to what Flash Builder is for Flex/ActionScript. Well we can all dream.<br /><br />All that said I'm looking forward next year and the innovations ahead.Ross Phillipshttp://www.blogger.com/profile/05098392452454494192noreply@blogger.com0tag:blogger.com,1999:blog-8955216254487268072.post-7656062775025730072011-06-27T11:10:00.000-07:002011-06-27T12:31:33.450-07:00What I want in JavaScriptI was reading a coding horror post on JavaScript which went over how it was popular, how it can to be and the troubles which it faces in the future. I reflected on this point of view thinking a language's success can have very little to do with itself. JavaScript is no SmallTalk when it comes to languages an one could argue it just a child of previous modern day languages. That said I'm not that interested in new language features being added to JavaScript but would really like to see new deployment formats. The inline JavaScript or HTML script tag include element are to focused around the HTML document. A clean separation between layout and code should be created as to prevent and control JavaScript execution. It is far to easy to include JavaScript libraries and too easy for conflicts to occur until it is too late.<br /><br />I would like to see a compiled format for the language which is sandboxed so you can be sure no one else overwrite a feature. Something like the SWF format would ideal as you have a lot more control over the binary. I know a lot of js files are minifyed and sent compressed via the web server but that gives you no control over the internals.<br /><br />Also it would be great nice to see a new HTML feature designed around JavaScript which is being run. So you could state any restrictions on the code which is running. This would look at bring HTML applications inline with other apps that are built complied for deployment on other platforms such as iOS and Andriod. <br /><br />Even though I dread the thought of HTML, CSS, & JavaScript being the base of modern applications that doesn't mean it will not happen. With web developers now pushing the HTML platform pass some document format syntax and to the base of applications we should expect it to grow as well.Ross Phillipshttp://www.blogger.com/profile/05098392452454494192noreply@blogger.com1tag:blogger.com,1999:blog-8955216254487268072.post-34326954266363673242011-05-14T03:11:00.000-07:002011-05-14T03:44:54.356-07:00New tech but lack of toolingI was flicked an email to the <a href="http://ro.me">rome</a> interactive music video. I was not sure what to expect but I was most impressed by it. This really is a great showcase of the mixing HTML5 and WebGL. The music was really cool... might even get myself a copy of the single/album . But once I had played it a couple of times through I was thinking exactly how easy is this? Changing pixels on the screen is one thing but how fast did it take them to do it?<br /><br />My experiences with JavaScript is one of a love hate relationship... but I'll leave that for another post. So I was wondering how did they generate all the JavaScript files for the models etc. It's cool to have something that can play/run it but how about something productive to generate it? I was hoping the behind the scenes tech vid would shed some light on this but it didn't... other than going on about WebGL and HTML5. As a developer at heart I want to know how hard was it? Like really, how hard it was? It is really cool that you can do this but having something render your vision is one thing... how you create it in a form to render it is what interests me. Which really comes down to tooling.<br /><br />Time will tell if this is just one cool example/demo application of these techs destined for history or is there a larger movement out there with tooling to follow? At the end of the day I'm always thinking about productivity and great tools make great techs hum. So for the meantime I wait an see what great tooling comes out on top for creating such visionary pieces of work.Ross Phillipshttp://www.blogger.com/profile/05098392452454494192noreply@blogger.com1tag:blogger.com,1999:blog-8955216254487268072.post-37661702924360317472011-02-28T00:27:00.000-08:002011-02-28T00:45:32.709-08:00ColdFusion musings on variable scopeWell I've come across the use of using local to reference all local variables in a function and some phobia to use var for declaring local function variables. I must admit I find this weird. I'm an avid fan of using var but that probably comes from my development in ActionScript and other languages I've developed in such as Java, C/C++. To me the phobia comes directly from the dreaded "memory leak" where you have the variable scope referenced instead of the scope relative to the function (local). This seems like a flaw in ColdFusion that a variable which is not scoped can appear to be causing the developer to have memory headaches. But to me I think developers should be more wary of what they are coding. The use of the local structure just seems like a lame hack which bloats the amount of code you write. ColdFusion is on it's own when comes having such a verbose way of referencing local scope variables. So really this is an issue of scope and a better solution would be to make it that you have to reference variables not in the local scope explicitly instead of the of reverse... well that being said people also just go and ahead an explicitly reference all variables which means a lot of typing. I don't care if you have intelli sense it means more typing no matter what.<br /><br />So I do hope in the next version of ColdFusion they solve this problem because it makes code look ugly and longer to write... two things which ColdFusion is suppose to be working against. And yes I love my <cf_tag > but <cfscript /> you need a hand.<br /><br />My feelings towards cfscript are similar to Ben Forta's. Read his post on <a href="http://forta.com/blog/index.cfm/2011/2/4/I-Am-Not-A-Fan-Of-CFSCRIPT">I Am Not A Fan Of CFSCRIPT</a>Ross Phillipshttp://www.blogger.com/profile/05098392452454494192noreply@blogger.com2tag:blogger.com,1999:blog-8955216254487268072.post-57422931425082297032010-06-16T20:50:00.000-07:002010-06-16T21:54:17.624-07:00Swiz & Flex 4 are a great pairOK maybe a bit of big claim to and I held myself off from saying a perfect pair. That being said they do work very well. I know yes there are other frameworks but for me this came up on top. Why you might ask and who did I look at? The frameworks I looked at was Mate, Parsley, & Swiz. I've been using Cairngorm since its 0.98 release and thought with Caringorm 3 coming out I'd look at the other frameworks. There is a lot of hype about Inversion of Control (IoC) and Dependency Injection (DI) which these three frameworks are based upon. Which we can thank our Java friends for bring this into our realm. But there is a significant difference between how Java IoC and DI Frameworks implement and how ActionScript can. That is Java has Annotations and well ActionScript doesn't. Since ActionScript doesn't have annotations the closest we have is MetaData which is essentially a piece of text the runtime can get access to. Where Java's Annotations are essentially Classes which are typed we have to deal with text which more often that not leads to typo bugs at runtime. So that is a down side all three of these frameworks and is not going to change till Adobe tackles this problem.<br /><br />I first started with Mate and coming from a ColdFusion background I thought it would fit with me well. But I found myself getting annoyed with all the tag syntax. This is probably more a personal preference thing but for me tags are great for layout/UI and script for business logic when it comes to Flex. <br /><br />I then tried Parsley because everyone seemed to be really into it. I found it somewhat overload with features. Where and why you would use those features seemed somewhat undocumented. Probably the most annoying aspect is that I just wanted a simple MVC example of it in use and there was none. Yep there are snippets of code but when your starting out its nice to poke around a complete or suggested solution. The reason is that Parsley has a non-prescriptive philosophy. As in you use it as you think you should. This lead me to frustration since I'm not one to read through pages of documentation trying to piece the picture together. I just want to see the picture.<br /><br />After leaving my frustration of Parsley behind I went on look at Swiz. To my surprise it was well, under-documented. But it has a simple MVC example of how you could use it with Flex 4 and 3 if so wished. The example goes over the concepts and how you do things in it in the example application and you can get it from there git repository. Existentially what they did is show me how they think Swiz should be implemented. This is very similar to Adobe's approach to developer education which is to bring people from newbie to beginner-intermediate/productive very quickly. Like Adobe Swiz let's you figure out the hard stuff on you own. You might be thinking that is not a good reason... but as far as I'm concerned and my clients I need to get up to speed quickly.<br /><br />Well this post is getting a bit long so I'll finish up quickly on why Flex 4 is a good match. The reason for this is that Flex 4 fits well into presentation layer of Swiz. So your views are more visually focused and your logical is separated out into the presentation layer. This frees me up to focus on all the business rules with out getting hooked up in the visual side. Skinning in Flex 4 fits well into this idea as well. It's like the layer above the view if you are thinking of your application in a MVC pattern. All of this makes it really easy to hand off visually elements to the (Flex/Flash) designer to implement.Ross Phillipshttp://www.blogger.com/profile/05098392452454494192noreply@blogger.com0tag:blogger.com,1999:blog-8955216254487268072.post-67318384812490918392010-03-16T01:09:00.000-07:002010-03-16T01:35:50.910-07:00Modules loading modules?I guess this is not something that you come across often everyday. But if you have an application that you are trying to modularizes into many levels you are likely to hit the Security sandbox. I started to split up the Application into three separate levels. So I had an Application that would load a Module(s) that would then load Module(s). I was using the standard mx.modules.ModuleLoader to load each of the Modules. All seemed great as the application started and the modules where loading and running but something was missing... the data. I then found a series of strange type errors where Object of ClassA does not match ClassA@33455. Initially this threw me because it is the same class but this is because they are coming from different domains. The second level of ModuleLoaders were not picking up the correct ApplicationDomain but ending up in another domain.<br /><br />Simple fix for this is set the <span style="font-family:courier new;">ModuleLoader.applicationDomain = ApplicationDomain.currentDomain</span><br /><br /></code>I know most Flex applications would not spilt themselves up so granular but it has been an interesting experience.Ross Phillipshttp://www.blogger.com/profile/05098392452454494192noreply@blogger.com0tag:blogger.com,1999:blog-8955216254487268072.post-91260297715878507862009-12-04T18:19:00.000-08:002009-12-16T13:16:15.150-08:00Flex PMDWell I came across <a href="http://opensource.adobe.com/wiki/display/flexpmd/FlexPMD">FlexPMD</a> a couple of weeks ago and have found it a useful tool to get some useful tips and highlight things I may have glossed over. An amusing one is the info rule about the copyright header is missing. I will have to make sure I add one in for my world domination of example code. Though that said you can add your own rules in or modify the existing set to create your own custom set of rules. So if you really want to be strict about every line ending with a semi-colon you can write your own class to enforce this rule.<br /><br />All of this being said I think this is a great tool for Flex/Actionscript developers to review there code. There will always be exceptions to the rules but at least you know you're breaking best practice.Ross Phillipshttp://www.blogger.com/profile/05098392452454494192noreply@blogger.com0tag:blogger.com,1999:blog-8955216254487268072.post-85145222487830123432009-11-20T22:16:00.000-08:002009-11-20T22:44:31.571-08:00Yeah I'm offically now a User Group Co-ManagerWell I've been active in the <a href="http://groups.google.com/group/nzfxug/">Flash Platform/Flex User Group</a> in New Zealand since its inception and been working <a href="http://www.koeni.de">Kai Koenig</a> and <a href="http://blog.xsive.co.nz/">Campbell Anderson</a> to manage the user group. But now I'm officially a Co-Manager of Wellington group :-) This is really cool! I'm looking forward to helping out with community to increase awareness and spread the goodness of Flash :-) Also Tanya Grey is helping out Campbell in Auckland.Ross Phillipshttp://www.blogger.com/profile/05098392452454494192noreply@blogger.com2tag:blogger.com,1999:blog-8955216254487268072.post-53405368399317150172009-11-03T17:02:00.000-08:002009-11-03T17:18:55.398-08:00Earlest time to call a RemoteObject?I was doing some investigation on how best to retain your session. A lot of Flex applications don't utilize session management especially in the case when the app is restarted by a refresh or a new window. Which then the users are faced by a annoying login window even though the server has retain the session information which negates this need to re-login. But before I really go into that I got sided tracked looking into when is it best or the earliest time you can send off a request to get session information. This is an interesting question with an obvious answer as well. But I wanted to really understand why. <br /><br />To do the call I'm using <a href="http://livedocs.adobe.com/flex/3/langref/mx/rpc/remoting/mxml/RemoteObject.html">RemoteObjects</a> with ColdFusion as the destination. The <a href="http://www.adobe.com/products/coldfusion/">ColdFusion</a> CFC is fairly basic just returning an array with the JSessionID. All of this will complete quickly to negate any long server processes. Ideally in a production environment I would use a session structure to return to speed things up.<br /><br />So I wrote some basic ActionScript code to connect and call the CFC. I first tried calling it from preinitialize call. The call worked but it took ~100ms to complete which was troubling which it was just calling a server on my machine. I then did a quick speed test of calling the RemoteObject and was able to call it and get a responds in < 1ms so something else was at play here. I then thought about maybe I should push the call further up the process since preinitilization was happening at ~200ms since application start but I wanted it to start earlier. <br /><br /><a href="http://livedocs.adobe.com/flex/3/langref/mx/core/Application.html#preloader">Preloader</a> here I come! The preloader was being called at ~100ms and I was really happy but then I hit a road block...<br /><span style="font-family: courier new;">[FaultEvent fault=[RPC Fault faultString="[MessagingError]" faultCode="InvokeFailed" faultDetail="null"] messageId="33578681-51C7-A64A-7C04-B829D52F7A4C" type="fault" bubbles=false cancelable=true eventPhase=2]</span><br />This is a puzzling error message since it doesn't give me any reasons why the InvokedFailed? If I called the call the RemoteObject later in the Flex life cycle it worked so seemed strange that it would fail at this point. So bring on Flex Debugger! I got it down to one call which was causing an exception and it was the<span style="font-family: courier new;"> mx.messaging.config.SeriviceConfig.xml</span> getter. It was being called before it had been set with the complied flex-services.xml which seems strange that it didn't have this embed. Then I started to look into when it got set so and found that it hadn't been called by <a style="font-family: courier new;" href="http://livedocs.adobe.com/flex/3/langref/mx/managers/SystemManager.html">SystemManager</a> to initialize this value. So even though the complier embeds the value of the <span style="font-family: courier new;">flex-services.xml</span> it needs to be set at initialization by the SystemManager.<br /><br />So what does this boil down to? You can't call RemoteObjects prior to the start of Application preinitialization process since the SystemManager has not completed its own initialization process. Remember that the Application is a child of the SystemManager so following the <a href="http://livedocs.adobe.com/flex/2/docs/00001426.html">Flex startup</a> rules you shouldn't do anything with it until initialization of the SystemManager is complete. So using the Application preinitialization/<a href="http://livedocs.adobe.com/flex/3/langref/mx/core/UIComponent.html#event:preinitialize">preinitialize</a> event is the best/earliest time to do a call to the server to get data using RemoteObjects.<br /><br />Oh and the other point about the call taking so long ~100 ms... well I put that down to the additional things that occur at start up. A lot happens when a component/Application is created ;-)Ross Phillipshttp://www.blogger.com/profile/05098392452454494192noreply@blogger.com3tag:blogger.com,1999:blog-8955216254487268072.post-29782078875814995892009-08-19T17:33:00.000-07:002009-08-19T20:26:33.498-07:00Dusting off the cob webs from my blogWell for the last six months I've been really busy working on a Flex app which really took over my life. Not something I want to do again any time soon. Though the project was really cool, you got to have some work life balance... OK enough about me and more about tech stuff :-)<br /><br />I'm presenting Back to the Files (Flash & Files) at the <a href="http://wellington.flashplatformcodecamp.co.nz/">Flash Platform Code Camp</a> next month. Which will be a nice overview of what you can do with files now. There is so much you can do now with them :-) Should be a good event with great presenters from throughout New Zealand and even one from Australia. Unfortunately the even has sold out so if you have missed out you can put your name done on the waiting list.<br /><br />I have a couple of half posts which I need to complete and hopefully you will see them over the next month or so.<br /><br />Oh and before I go I'm off <a href="http://max.adobe.com/">MAX</a> 09 in LA. Looking forward to the event and catching up with peeps.Ross Phillipshttp://www.blogger.com/profile/05098392452454494192noreply@blogger.com0tag:blogger.com,1999:blog-8955216254487268072.post-31563116570440864132009-04-04T23:25:00.000-07:002009-04-05T00:32:20.021-07:00FLVPlayback 2.5 make video easy with Flex 3OK so your developing an application and you need a video component for Flex? Well do not go past GO go straight <a href="http://www.adobe.com/products/flashmediaserver/tool_downloads/">FLVPlayback 2.5</a>. Back in late 2007 I was evaluating Flex with FMS 2 using Flex's video component. I must admit the Flex 2/3 video component is pretty average compared to standard of the other components in the Flex component framework. Simple video functionality was missing in the standard component and to do anything average just required too much effort. It made more sense to use Flash's video component to create a quick video player.<br /><br />I'm not much of a designer but watching a design college skin FLVPlayback just look so effortless. To say I'm impressed with what FLVPlayback can do is an understatement. I know there have been a few blogs of using FLVPlayback so I'm not going to show an example (See <a href="http://blog.flexexamples.com/2008/12/11/using-the-flash-flvplayback-control-in-flex/">Flex Examples</a>). Also there is plenty of documentation with component itself. One little cool thing that I wanted to point out is to resize the component to the video's correct/preferred size.<br /><br />In the below example you can see how you can resize your component to play the video in it's preferred size. Note this excerpt highlights that you resize your component after the video is loaded.<br /><br /><span style="font-family: courier new;">private var vid:FLVPlayback = new FLVPlayback();</span><br /><br /><span style="font-family: courier new;">private function onCreationComplete():void</span><br /><span style="font-family: courier new;">{</span><br /><span style="font-family: courier new;"> ...</span><br /><span style="font-family: courier new;"> vid.addEventListener( fl.video.VideoEvent.READY , readyToPlay);</span><br /><span style="font-family: courier new;"> ...</span><br /><span style="font-family: courier new;">}</span><br /><br /><span style="font-family: courier new;">private function readyToPlay(e:fl.video.VideoEvent):void {</span><br /><span style="font-family: courier new;"> ...</span><br /><span style="font-family: courier new;"> this.width = vid.preferredWidth;</span><br /><span style="font-family: courier new;"> this.height = vid.preferredHeight; // Add the skin's control bar height</span><br /><span style="font-family: courier new;"> ...</span><br /><span style="font-family: courier new;">}</span><br /><br />If more detail is required I will added it but this should be enough for the concept.Ross Phillipshttp://www.blogger.com/profile/05098392452454494192noreply@blogger.com0tag:blogger.com,1999:blog-8955216254487268072.post-12457951939074584112009-02-08T09:49:00.000-08:002009-02-12T19:55:44.991-08:00Yip I'm off to WebstockWell I was thinking this year it was about time I attended a local web conference. I've been to webDU and MAX but never the local one... and it doesn't get much more local than being in your home town. The conference has a range of presenters (local and international) coming from various backgrounds. It will be really interesting to hear what some of these people have to say. Sometimes you can get a bit close minded about things (methodologies, technologies, & products) and this type of conference sheds light on what other people are doing. There is so much happening in the Adobe space one could happily ignore the others.<br /><br /><a href="http://www.webstock.org.nz/">For more information about webstock 2009.</a><br /><br />Oh I see there is a card trading game ...I wonder if <a href="http://bloginblack.de/">Agent K</a> is on the case.<br /><br /><span style="font-style: italic;">Update: I'm just attending the conference (February 19-20) and not any of workshops. </span>Ross Phillipshttp://www.blogger.com/profile/05098392452454494192noreply@blogger.com1tag:blogger.com,1999:blog-8955216254487268072.post-68961589462336350472009-02-01T14:24:00.000-08:002009-02-01T15:18:17.836-08:00Flex Bulider 3.0.2 update does not update AIR projects 1.0=>1.5Well I updated my Flex Builder plugin from 3.0.1 to 3.0.2 looking to get all the goodness of AIR 1.5 and Flash Player 10. You might be thinking I'm a bit late on the scene with the update being out for about 3 months now but there appears to be a bug with the updater in Eclipse (<a href="http://www.adobe.com/devnet/flex/articles/sdk32_fb302.html">See Matt Chotin's comment at 30 Jan</a>). Anyhow I installed the update to find my AIR projects not doing anything when I run or debug them. Almost like they were crashing straight off the bat. I created a new AIR project to see if the updater had screwed my system but no the new AIR project worked fine. I then added the 3.0.1 SDK back in since 3.0.2 was the new default and set the project to use it I had no problems. This didn't sit right with me that my AIR projects couldn't use the updated SDK and AIR runtime. I had a look around and noticed the the XML config file for the AIR application was 1.0 I changed it to 1.5 and set the SDK to 3.0.2. The project ran and debugged fine now... <br /><br />So what does this mean? If you change your SDK the Flex plugin does not update your AIR app config file to the correct version of AIR. Must admit I would expect if you complied an app with a previous version of the 3.0.* SDK that it would still run in the AIR 1.5 runtime. I think there is a little more to this story but I'll leave it here for the moment.<br /><br />So it appears that changing your SDK version does not update your AIR config file so how to fix?<br /><br />Change the second line in your myapp-app.xml file from:<br /><span style="font-family: courier new;"><application xmlns="http://ns.adobe.com/air/application/1.0"></span><br />To:<br /><span style="font-family: courier new;"><application xmlns="http://ns.adobe.com/air/application/1.5"></span>Ross Phillipshttp://www.blogger.com/profile/05098392452454494192noreply@blogger.com0tag:blogger.com,1999:blog-8955216254487268072.post-24744068898277239342009-01-11T14:49:00.000-08:002009-01-11T15:31:07.332-08:00AIR String concatenation bugWell the other day I was doing some file IO to tidy up some CSV files. I was trying to do this quickly and just was using a String to stored the data before writing it to file. I'm sure your thinking I should be using stream for this and I would agree with you. But at the time I didn't believe there would be an issue with the data size. Then I found my fairly simple AIR app crashing quite badly. OS X kill the app because of the following error.<br /><br /><span style="font-family:courier new;">Exception Type: EXC_BAD_ACCESS (SIGBUS)</span><br /><span style="font-family:courier new;">Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000000</span><br /><span style="font-family:courier new;">Crashed Thread: 0</span><br /><br />As you can see this is far from nice and most importantly this is a operating system error not a native AIR/AS3 error. So what is causing this fatal error? Well just concanate two large strings you will get this. I created a dummy programme to show the issue.<br /><br /><span style="font-family:courier new;">var myStr:String = new String("1");</span><br /><span style="font-family:courier new;">for ( var i:int = 0; i < 100; i++) {<br /><span style="font-family:courier new;"> myStr = myStr + myStr;</span><br /><span style="font-family:courier new;">}</span></span><br /><br />On my machine it completed to the 29th loop before failing. So it could handle 2^29 but no larger.<br /><br />Can you protect your app from this with a try/catch statement? No. This is a real pain in the neck. It's not like I'm writing the app in C/C++ where you can drive your app into the wall because you the developer are managing memory. With ActionScript I would expect the Flash player/runtime to return an error and not crash since it is managing memory.<br /><br />I will add this as a bug or vote for this fix if it is already entered.Ross Phillipshttp://www.blogger.com/profile/05098392452454494192noreply@blogger.com0tag:blogger.com,1999:blog-8955216254487268072.post-87135847429707102752008-12-18T16:31:00.000-08:002008-12-18T17:05:08.359-08:00Centaur language features welcomeWell as new ColdFusion <a href="http://labs.adobe.com/wiki/index.php/Centaur">Centaur</a> is in the forge being crafted by Adobe developers with all sorts of goodies I rub my hands with glee. I'm really happy to finally see you will be able to define components in cfscript! Also getters and setters making the fold which are well overdue! Will be interseting to see how much closer they make cfml and cfscript since for a long time cfscript has been left out in the cold.<br /><br /><a href="http://labs.adobe.com/wiki/index.php/Bolt">Bolt</a> out of the ColdFuion blue comes a new IDE which I hope will kick ass when developing apps. Adobe did a great job with the Flex IDE and I'm expecting the same developer benefits to come availialbe to ColdFusion. Yeah we've had CFEclipse which really leveraged Eclipse developer features but never cut the mustard for me. For too long Dreamweaver was really the best CF editor and it wasn't a good editor for developing applications. So I'm wishing and hoping that Bolt will be amazing!<br /><br />These are great features but they are so overdue it is not funny. I'm almost certain if we had an IDE and the language features in this release in 6.1 ColdFusion developers would be developing very differently today. Perfect example is the poor cfinterface tag which seems to constantly underfire. Though it's not that the concept of interfaces is bad and I really like them. Just that there is not enough development tools to support it in current shape of CF but if we had some more language features and tools to hook into them I doubt there would the debate there is. Though as the saying goes "Better late than never..."Ross Phillipshttp://www.blogger.com/profile/05098392452454494192noreply@blogger.com0tag:blogger.com,1999:blog-8955216254487268072.post-24751295708062850052008-11-30T12:39:00.000-08:002008-11-30T13:12:09.267-08:00After thoughts on MAXWell I'm back home after my whirlwind tour to <a href="http://max.adobe.com/">MAX</a> San Francisco. Overall I really enjoyed MAX a lot. It was great meeting other developers, managers, <span class="blsp-spelling-error" id="SPELLING_ERROR_0">CEO's</span>, Adobe staff, and talking about projects they are working on. There are some really interesting problems out there being solved. The only thing which I was let down with is difficulty level in some of the sessions I attended. I was expect "Advanced" to be advance instead I found it more at the <span class="blsp-spelling-corrected" id="SPELLING_ERROR_1">beginner</span> to intermediate level. I spoke with Adobe user group people and they suggested I should go use the <span class="blsp-spelling-corrected" id="SPELLING_ERROR_2">community</span> groups like <a href="http://www.360conferences.com/360flex/">360|Flex</a> for real advance session. Though I was speaking with <a href="http://blogs.digitalprimates.net/codeslinger/">Michael <span class="blsp-spelling-error" id="SPELLING_ERROR_3">Labriola</span></a> and he had some wise words on this matter to deep dive into the Flex framework to really understand it. So in the future I'll be making some posts on my deep dive into Flex.<br /><br />I had an amazing time at MAX and was well worth my effort.Ross Phillipshttp://www.blogger.com/profile/05098392452454494192noreply@blogger.com0tag:blogger.com,1999:blog-8955216254487268072.post-57888280442451502912008-11-06T12:22:00.000-08:002008-11-06T12:55:36.556-08:00Gumbo CSS Advanced Selectors are wickedWell I was looking at the <a href="http://360max.wikispaces.com/Schedule">360 MAX sessions</a> and saw an item of interest on Advanced Item Rendering. As you do when your surfing the net I had a quick look at <a href="http://butterfliesandbugs.wordpress.com">Joan <span class="blsp-spelling-error" id="SPELLING_ERROR_0">Lafferty's</span> blog</a> and saw another interesting post about the new <span class="blsp-spelling-error" id="SPELLING_ERROR_1">CSS</span> Advanced Selectors in <a href="http://opensource.adobe.com/wiki/display/flexsdk/Gumbo">Gumbo</a>. I had a read through and it is wicked the power the Advanced Selector now gives you. This really comes into it's own since now you can style hierarchically instead of globally. I see this taking <span class="blsp-spelling-error" id="SPELLING_ERROR_2">CSS</span> skinning to a new level for the skinning community.<br /><br />A brief example of the difference below but for more go to <a href="http://opensource.adobe.com/wiki/display/flexsdk/CSS+Advanced+Selectors"><span class="blsp-spelling-error" id="SPELLING_ERROR_3">CSS</span> Advanced Selectors</a><br /><br />If you wanted all Buttons in a <span class="blsp-spelling-error" id="SPELLING_ERROR_4">VBox</span> to be blue and all other Buttons to be red.<br /><br />In Flex 2/3<br />You could do something like<br /><pre class="code-none">Button {<br /> color: #FF0000;<br />}<br /><br />.<span class="blsp-spelling-error" id="SPELLING_ERROR_5">VBoxButton</span> {<br /> color: #0000FF;<br />}<br /></pre>In Gumbo you can do this<br /><pre class="code-none">Button {<br /> color: #FF0000<a id="publishButton" class="cssButton" href="javascript:void(0)" onclick="if (this.className.indexOf("ubtn-disabled") == -1) {var e = document['stuffform'].publish;(e.length) ? e[0].click() : e.click(); if (window.event) window.event.cancelBubble = true; return false;}"></a>;<br />}<br /><br /><span class="blsp-spelling-error" id="SPELLING_ERROR_6">VBox</span> Button {<br /> color: #0000FF;<br />}</pre> As you can see you don't need to create a hash class selector. I'm really looking forward to using the advance selector feature!Ross Phillipshttp://www.blogger.com/profile/05098392452454494192noreply@blogger.com0tag:blogger.com,1999:blog-8955216254487268072.post-83370064150980860012008-11-03T19:07:00.000-08:002008-11-03T20:25:28.160-08:00New Flex 3 certificationWell looks like the Adobe certification people have come out with a <a href="http://partners.adobe.com/public/ace/main.html">Flex 3 with AIR certification</a> which is the successor to Flex 2 exam. Interesting to see that they have coupled it will AIR so for those looking for an AIR certification will have to wait. I don't know of many HTML/Javascript developers working in the AIR space but it would nice to have something for them. But saying this Flex 3 and AIR 1.0 are closely tied products both having the same release date earlier this year. It will be interesting to see if Flex 4/Gumbo and AIR 2.o futures will continue to be close.<br /><br />The big difference I noticed in the exam outline was that AIR has pushed back on most on the data services questions which is down to 16% from 25%. From the scores I have heard about data services usually ranked the lowest average out of the 4 sections in the Flex 2 exams. I imagine this change will now increase scores in the Flex 3 with AIR exam.Ross Phillipshttp://www.blogger.com/profile/05098392452454494192noreply@blogger.com0tag:blogger.com,1999:blog-8955216254487268072.post-61947214970394168552008-10-18T14:35:00.000-07:002008-10-18T15:32:37.644-07:00Programmatic SkinsThe other day I was watching the Adobe TV and saw a presentation by <a href="http://blog.kevinhoyt.org/">Kevin Hoyt</a> on programmatic skins in Flex. Off hand when I hear about programmatic skins I think why not just do it in Fireworks and make an image? Seems a bit pointless to draw a shape with some fill in code. Of course you can reduce the size of your SWF to a certain extent. So I was thinking what could I do with a programmatic skin which I couldn't do with an image?<br /><br />What I found was that you can add filters & blends like you would do in most Flash apps. This allows create a button that glows for example. Ok no major and I'm sure you can that yourself inline but we're comparing programmatic skins and images. For me this is so cool since you can create your own skins having a UIComponent glowing.<br /><br />Below is an example of a skin using the glow effect.<br /><br />sunshine.as<br /><br /><p>package<br /> {<br /> import flash.display.BlendMode;<br /> import flash.filters.GlowFilter;<br /> <br /> import mx.skins.ProgrammaticSkin;</p><br /><p> public class sunshine extends ProgrammaticSkin<br /> {<br /> public function sunshine() { }<br /> <br /> override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void {<br /> var fill:uint;<br /> switch (name) {<br /> <br /> case "overSkin":<br /> fill = 0x00FF00;<br /> // Create a glow for overskin<br /> var filter_array:Array = filters;<br /> filter_array.push(new GlowFilter(fill));<br /> filter_array[0].blurX = 50;<br /> filter_array[0].blurY = 50;<br /> filters = filter_array;<br /> break;<br /> <br /> case "downSkin":<br /> fill = 0xFF0000;<br /> break;<br /> case "upSkin":<br /> fill = 0x0000FF;<br /> break;<br /> <br /> }<br /> <br /> // Draw the skin<br /> graphics.clear();<br /> blendMode = BlendMode.DARKEN;<br /> graphics.beginFill( fill, 0.5 );<br /> graphics.drawRect(0, 0, unscaledWidth, unscaledHeight);<br /> graphics.endFill();<br /> }<br /> }<br /> }</p><br /><br />airApp.mxml<br /><br /><?xml version="1.0" encoding="utf-8"?><br /><mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"><br /><mx:Script><br /><![CDATA[<br />import sunshine;<br />]]><br /></mx:Script><br /><mx:Style><br />Button {<br />skin: ClassReference("sunshine");<br />}<br /></mx:Style><br /><mx:Button id="myButton" x="222" y="158" label="Sunshine Button"/><br /></mx:WindowedApplication><br /><br /><br />For those who want know more <a href="http://livedocs.adobe.com/flex/3/html/skinning_1.html">http://livedocs.adobe.com/flex/3/html/skinning_1.html</a>Ross Phillipshttp://www.blogger.com/profile/05098392452454494192noreply@blogger.com0tag:blogger.com,1999:blog-8955216254487268072.post-57856249215052622762008-10-13T13:25:00.000-07:002008-10-13T13:32:57.532-07:00Yeah going to MAX!!!Well if your not aware I'm going to Adobe's <a href="http://max.adobe.com/">MAX</a> conference this year. Its going to be a long trip from New Zealand to San Francisco but I'm sure it will be worth it. Will be catching up with some developer friends who I haven't meet in person before. I can see nights of discussing projects & new ideas will be in order with a local ale. I also will be taking in some of the sights when I'm there before my short trip comes to an end I return to kiwi land.Ross Phillipshttp://www.blogger.com/profile/05098392452454494192noreply@blogger.com0tag:blogger.com,1999:blog-8955216254487268072.post-20541880758113847982008-10-01T13:00:00.000-07:002008-09-30T17:17:18.587-07:00NZFXUG FMS3 Flex presentation<div style="text-align: left; width: 100%;font-size:10px;"><span style="font-size:100%;">Well it was cool to present at this months user group meeting last night. It was really good to have a lot of questions on the subject. If anyone has further questions just hit me up.<br /><br />Below is the presentation which I presented <br /><object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" id="doc_156897319137196" name="doc_156897319137196" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" align="middle" height="500" width="100%"> <param name="movie" value="http://documents.scribd.com/ScribdViewer.swf?document_id=6323845&access_key=key-vpso0q9a7cby71gp875&page=&version=1&auto_size=true&viewMode="> <param name="quality" value="high"> <param name="play" value="true"> <param name="loop" value="true"> <param name="scale" value="showall"> <param name="wmode" value="opaque"> <param name="devicefont" value="false"> <param name="bgcolor" value="#ffffff"> <param name="menu" value="true"> <param name="allowFullScreen" value="true"> <param name="allowScriptAccess" value="always"> <param name="salign" value=""> <embed src="http://documents.scribd.com/ScribdViewer.swf?document_id=6323845&access_key=key-vpso0q9a7cby71gp875&page=&version=1&auto_size=true&viewMode=" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" play="true" loop="true" scale="showall" wmode="opaque" devicefont="false" bgcolor="#ffffff" name="doc_156897319137196_object" menu="true" allowfullscreen="true" allowscriptaccess="always" salign="" type="application/x-shockwave-flash" align="middle" height="500" width="100%"></embed> </object><br />Also here are the apps I presented<br /><br /><span style="font-weight: bold;">Video on Demand</span><br /><span style="font-family:courier new;"><br /><?xml version="1.0" encoding="utf-8"?><br /> <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()" width="414" height="375"><br /><br /> <mx:Script><br /> <![CDATA[<br /> import mx.events.VideoEvent;<br /> private function init():void {<br /> video.addEventListener(VideoEvent.PLAYHEAD_UPDATE, updateBar);<br /> }<br /> private function updateBar(event:VideoEvent):void {<br /> bar.setProgress(event.playheadTime, video.totalTime);<br /> }<br /><br /> ]]><br /> </mx:Script></p><br /><p> <mx:VideoDisplay source="rtmp://localhost/vod/media/mp4:AdobeBand_1500K_H264" id="video" y="10" width="320" height="240" autoPlay="false"<br /> volume="{volume.value}" x="10"/><br /> <mx:VSlider id="volume" x="338" value="0.5" minimum="0" maximum="1" snapInterval="0.1" allowTrackClick="true" liveDragging="true" top="10" bottom="80"/><br /> <mx:Button label="play" click="video.play()" x="10" y="278"/><br /> <mx:Button label="pause" click="video.pause()" x="68" y="278"/><br /> <mx:Button label="stop" click="video.stop(); video.playheadTime = 0;" x="136" y="278"/><br /> <mx:ProgressBar id="bar" x="10" y="305" minimum="0" maximum="100" direction="right" mode="manual" label="" width="320"/><br /> </mx:WindowedApplication><br /></span><br /><br /><span style="font-weight: bold;">Live</span><br /><span style="font-family:courier new;"><br /><p><?xml version="1.0" encoding="utf-8"?><br /> <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="372" height="303"><br /> <mx:VideoDisplay source="rtmp://localhost/live/livestream" id="video" y="10" width="320" height="240" live="true"<br /> volume="{volume.value}" x="10"/><br /><br /> <mx:VSlider id="volume" x="338" value="0.5" minimum="0" maximum="1" snapInterval="0.1" allowTrackClick="true" liveDragging="true" top="10" bottom="51"/><br /><br /> <mx:Button label="play" click="video.play()" top="258" x="10"/><br /> <mx:Button label="stop" click="video.stop()" top="258" left="136"/><br /> <mx:Button label="pause" click="video.pause()" top="258" x="68"/><br /></mx:WindowedApplication></p><br /></span><br /><br /><br /><br /></div>Ross Phillipshttp://www.blogger.com/profile/05098392452454494192noreply@blogger.com0