Tag Archive: flex


Today I tried to load an image form an url and apply it to a background, well appears like setStyle don’t have the ability to load an image from URL.

So I had to look another alternative, I load the image using an Loader, but I couldn’t found a way to apply it to the background  style, I did a workaround, I draw it on the graphics object, I guess it is helpful because the image is titled, but I will try more options I didn’t quite like 100% this solution.

IMPORTANT : dont’ forget the security restrictions of doing this, remember that flash can’t load images from another domain, and www.zerokernel.com is different to zerokenel.com, see Adobe for more information ( Player 9 restrictions from Adobe – PDF )

Anyway, here is the demo:

http://zerokernel.com/demos/flex/backgroundChanger/

And the code:

http://zerokernel.com/demos/flex/backgroundChanger/BackgroundChanger.zip

For a complex reason I couldn’t understand the SVN plugin of eclipse don’t have an interface for delete/update users for repositories, so if you want to change you current user you actually have to delete the “keyring”, that is a special file where eclipse saves all the login information of your repositories… yes… all the passwords.

So after a search in google with no luck, I found that the location of the configuration files:
@user.home/Documents/Flex Builder 3/configuration

BUT BEWARE READER….

All the configuration files are stored in hidden files, and I mean the filename starts with a “.” dot, if you go to the finder you will find nothing… apparently… you actually had to dig in your terminal skills (or configure the finder to show hidden files), and delete the damn file:

.keyring

And eclipse will ask for passwords again…

The worst thing… you had to enter ALL your passwords again.

Youtube and Flex 3

A time ago google released an SWF/API to interact with the youtube player, and be able to embed it into your swf projects, the main problem is that it was for AS2, so when you try to do it on AS3 / Flex, you can run into problems.

I ran into this problem, so doing my research, I found a library written for AS, it uses a clever way to do it, it actually use a javascript bridge to communicate with the player inside your SWF.

It’s internals can be summarized in this way:
swf (external call) -> browser (js) -> swf (via javascript)

There are a lot of tricks that can help our life easier with this problems, but I will like to gave you a list:

- The main tricks in this library are done in javascript, so you have to pay a lot of attention of details like the id of the player in the HTML of the deploy (be sure to copy outside your working copy, because flex overwrites changes on it), check the ****YOUTUBE**** comments in the example.

- You can run into issues with the sandbox, be sure to test it on a webserver.

- Because you are running outside the flex ide, be sure to install flash tracer it will help you a lot

- When you add it to your project, and you can get the creation complete event you are ready to go !

This is the link of the library:

http://code.google.com/p/youtubechromelesswrapper-as3/

A live demo:
http://www.zerokernel.com/demos/flex/youtube/

Deployment files:
http://www.zerokernel.com/demos/flex/youtube/youtube-deploy.zip

Flex source:
http://www.zerokernel.com/demos/flex/youtube/YoutubeTest.zip

FlexPop Now in Air !!

A few months ago I put an example of the Degrafa framework, called FlexPop. A few coworkers point me that I should add the feature of saving the image.

Thinking about that, I realize that I was in need of a server technology to “resend” the image back to the client, so I decided to take another approach.

This gave me the first step into a bigger world, because I decided to re-write FlexPop in Air, no much changes, but at least in the webcam was a lot easier.

So I let you the link… please send me any comment you can find.

FlexPop – Air

Ad-sense in Air ?

I was on a project this week, and it have a requriment of having an google ad inside an AIR, while technologically is posibble with a few tricks, I encounter a more philosophical question, and thats because the terms of service doesnt say anithing about this, even I have a search, waiting from someone from google to answer;

The question, does anybody knows what google thinks about this ?

http://www.google.com/support/forum/p/AdSense/search?hl=en&q=adobe+air

Degrafa + Webcam = FlexPop

I was trying to learn the powerful Degrafa extension in flex, so I decided to make some tests, and I want to share it with all of you, its far from perfect, and its only a minor example of what degrafa can do, but I really like it.

The purpose of this project is to make a 4 squared pop-art like image, based from the input of the webcam, just like the apple photo booth has.

I seems like a basic task at the beginning, because making a surface with the squares above an image was going to be easy.

The problem begun with the web cam, I only have one web cam, so for an hour or so, I assume the method Camera.getCamera, will return me the reference to the only web cam I had… big surprise, this wasn’t true, appears like the operating system has virtual cameras (I suspect why), but these cameras are first, so I decided to put a list and let the user decide which camera he wants to process.

Another tricky one, was that first I tried to put a canvas above the VideoDisplay, another big surprise, you can’t do that, the video display likes to be on top.

This las item keep me thinking about how to mix the input of the camera and blend it to the degrafasurface… I really hope that someone with better skills can tell me a better way, but the solution I found was to use a bitmap fill and copy the bitmap of the videodisplay. Might not be memory efficient, but is not resource hogging.

So, I let you the link to the app:
http://www.zerokernel.com/degrafa-test/

And the link to the code:
http://www.zerokernel.com/degrafa-test/DegrafaExample.zip
(the code is released as is, I’m not responsible if it breaks your computer or your big plasma screen, just be fair and don’t link it directly, give me some credit)

please post your comments and ideas, its the only way we can learn :D

Delete Flash Shared Objects

While developing in flash/flex you sometimes want to delete your shared objects settings, of course you can always access to the flash player settings, in adobe..

http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager06.html

But sometimes you need something more “local”,  so searching in the internet I found this firefox extension to delete the flash shared objets settings

http://objection.mozdev.org/

It’s still in development but its working, so give it a try.

I found a very simple comparision between Flex and silverlight, but indeed very funny, mostly for developers not for DRM lovers

Adobe Flex: 19 lines
Microsoft Silverlight: 164 lines

Main reason for the difference: Adobe Flex has a [Bindable] attribute

Check it four yourself:

http://riaflex.blogspot.com/2009/01/size-matters-when-comparing-adobe-flex.html

Json Validator

I’ve found a very useful json validator, specially when you are like me and forget to put the ” in the objects

http://www.jsonlint.com/

Flex Myths

I found a very nice article about misconceptions of flex, it talks 10 main points I hear everywhere, like: Users Need to Install Something New to Run Flex Applications, Flex is Not for Enterprise / Business Applications, Flash is for Designers, Video, and Annoyances, etc.

You should read it and pass it…

http://www.swfflex.com/blog/1/2008/01/Top-10-Flex-Misconceptions.cfm

Powered by WordPress and Motion by 85ideas.