Archive for the 'Flex' Category

Apr 07 2008

Using Webservice classes in a “actionscript-only” Flex3 project

Published by john under ActionScript 3, Flex

When using webservice classes in an "actionscript-only" Flex project, you have to make sure to include these lines of code before anything else in you class:

 
 var resourceManagerImpl:Object = ApplicationDomain.currentDomain.getDefinition("mx.resources::ResourceManagerImpl");
 Singleton.registerClass("mx.resources::IResourceManager", Class(resourceManagerImpl));
 

If you don't include this code you will get an error like this:

 
Error: No class registered for interface 'mx.resources::IResourceManager'.
at mx.core::Singleton$/getInstance()
at mx.resources::ResourceManager$/getInstance()
 

This is due to a bug in Flex3 compiler, read more info on this bug here:  http://bugs.adobe.com/jira/browse/SDK-12205

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google]

No responses yet

Apr 04 2008

width & height for a full-browser flash movie

Handy add-on to swfobject that allows the developer to specify a minimum width & height for a full-browser flash movie:http://blog.pixelbreaker.com/flash/swfforcesize/

"scrollbars are added to the browser window if the user has sized it under the specified width or height."

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google]

No responses yet

Mar 31 2008

Actionscript-only or MXML Project in FLEX

Published by john under MXML, ActionScript 3, Flex, Flash

When people hear Flex, they inmediately think about file size, and in my experience a Flex project starts to get heavy when you add components and when you use MXML. Flex lets you create two types of projects:

  1. Actionscript-only
  2. MXML

When creating actionscript only project, the file size is the same or smaller it would be if you were using flash.

I think that for the types of projects I am creating, I don't have much use for MXML, since I am not using any build-in components. Also all MXML is converted by the compiler to AS3 code.

It seems that there are some functionalities that are somewhat tied to MXML, for example when using Webservices in FLEX3 in an actionscript-only project, the compiler expects "ResourceManagerImpl" to be instantiated, this is done automatically when you create a MXML project, so when creating an actionscript-only project, you have to do it manually. This is a bug in Flex3.0 (http://bugs.adobe.com/jira/browse/SDK-12205), it will be fixed in the next release of the flex 3 sdk.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google]

No responses yet

Mar 31 2008

Silverlight - Hello World

Published by john under Silverlight, Flex

Today I decided to test Silverlight 2.0 to see what's is all about. I only created a small "Hello World" application, but in the next few days I plan to do the following tests:

  • How to load text from an xml
  • How to load images
  • How to load movies and sounds
  • How to do animations

My initial thoughts are that Silverlight Xaml are very similar to Flex's mxml, they are both xml, and both define components and layouts. In addition, instead of creating the code in AS3, you can write in C#, VB, RUBY or Python.

In order to create this demo I installed the following:

  1. Try Visual Studio 2008 (http://msdn2.microsoft.com/en-us/vstudio/products/aa700831.aspx)
  2. Silverlight 2 plugin (http://www.microsoft.com/silverlight/resources/installationFiles.aspx?v=2.0)
  3. Blend 2.5 (http://www.microsoft.com/downloads/details.aspx?FamilyId=32A3E916-E681-4955-BC9F-CFBA49273C7C&displaylang=en)
  4. Microsoft Silverlight Tools Beta 1 for Visual Studio 2008 (http://www.microsoft.com/downloads/details.aspx?FamilyId=E0BAE58E-9C0B-4090-A1DB-F134D9F095FD&displaylang=en)

And here is the small demo I created: http://jtinteractiveonline.com/silverlight_tests/testpage.html

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google]

No responses yet

Mar 27 2008

Thought experiment: Adobe kills Flex?

Published by Jason under Silverlight, Photoshop, Apple, Adobe, Flex

Let's imagine a world where visual designers used Windows PCs instead of Macs.

Presumably they would do this because there would be a set of high-quality, powerful web design tools that ran better on Windows than on the Mac. If this were the case, it would make the most sense for these hypothetical design tools, regardless of who makes them, to work closely with Microsoft technologies like Silverlight when it comes to RIA development. No other company would be able to develop an RIA framework that beat out Silverlight because Microsoft would have the home field advantage of building their framework on top of their own operating system.

This is a thought experiment, and not reality, only because there is no set of good design tools that run on a Windows PC. Enter Photoshop Express, Splashup, and Picnik. They run in a browser, so by definition they run the same on both a Windows PC and a Mac.

Interesting.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google]

2 responses so far

Mar 27 2008

to Flash or to Flex that is the question…

Published by john under ActionScript 3, Flex

Since Flash CS3 and AS3 came out I been thinking about Flex, most of the projects I seen in Flex were impressive from an architecture/programming point of view but not visually. So that discourage me from using flex.At the same time in AS2 I was used to not having to have a FLA for my projects but instead I would compile the SWFs using MTASC, this way it was easier to automate the compile process (using ANT or nANT), and also that forced me to keep all assets outside of the flash library which made it easier to update/replace by the designers in the team.In AS3 you cannot compile using MTASC but there is the FLEX compiler (mxmlc.exe) that basically allows you to compile AS and MXML files as SWFs.  mxmlc allows you to compile AS files without the need of MXML files.The other advantage of using the command line compiler (mxmlc) is that it allows you to use many classes not available in flash cs3. For some reason ADOBE decided to include certain things in FLEX and not in Flash and also decided to remove some classes that were available in as2. Here is some stuff I found that ADOBE has in Flex and not in Flash:

  • Ability to exclude classes at compile time
  • Export a subset of characters for a particular font
  • Webservice API
  • Flash Remoting API

 I created a small project using flash and as3 and to compile it with mxmlc all I had to do were two small changes:

  1. The main class has to extend Sprite
  2. Add a SWF meta data: (ie.:[SWF(width="900", height="320", backgroundColor="#ffffff", frameRate="30")])

In conclusion I think that by compiling with the flex command line program I get the benefits of flex, ability to automate the compile process, and if you combine this with external assets and the use of a flash library (if necessary) you can also create a project that is visually impressive as well.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google]

One response so far