Latest Entries »

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

Complaints about blocked pages

I was forced to block access to a few pages from my work, so I started to be hated, my good friend from “Full of caffeine” help me writing a little script to send me your comments.. source below:

complains_about_blocked_internet.sh

echo $1 > /dev/null
echo "Polo says: Thanks for your feedback!"

(this is supossed to be a joke, only runs on *nix compatible OS)

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

2wire bridge mode

I live in mexico and a lot of times I get mad because the low capabilities of my 2wire modem-router, I always wanted to be able to maintain the PPPoE connection by other computer, you got a lot of power this way.

Fear no more, searching in the internet I have found the answer to my problem, its just a matter of enter to the url “management” in our router, and then in the option “Configure Services” you can disable router modem.

For most of us, the url will be like this:

http://192.168.1.254/management

Damn telmex who doesn’t sells real modems, and want us to live by their rules ( I had to write it someday … :D )

– update 16 / jun / 2009

After trying and trying of doing this, I realize the modem could not find the PPPoE server to do the login, I talk with a sysadmin friend of mine, he tried to with mixed results, but he gave me a answer..

Appears like not all the firmwares are capable of doing this, so… next step… update the firmware !!! :D (I haven’t try this method but looks cool)

REMEMBER THIS WILL ERASE ANY TELMEX-FIRMWARE, I’M NOT RESPONSIBLE OF YOUR ACTIONS WTH THESE FILES, I’M ONLY PROVIDING THIS LINKS AS REFERENCE.

ok , read the disclaimer again please…

don’t forget to check your exact version of your modem

http://www.taringa.net/posts/1804294
http://www.orozco3.net/infinitum.htm
https://www.underground.org.mx/index.php?topic=18527.msg104587#msg104587

who wants to a pretty desk?

A friend of mine send me this collection of photos of workplaces…

Makes me feel awful about my own, but nevertless is inspiring

Pretty desks

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 was in need to use the cpufreq-selector from command line in my new ubuntu intrepid ibex, I found several posts about doing this way: (was for 8.04, not for 8.10), so I decided to take the risk and try it…

sudo chmod +s /usr/bin/cpufreq-selector

and it works! …. In a way, I mean I can change it from command line, even without being root, BUT, it killed my gnome-applet, so I cannot change it from gnome…
I tryied to restore the perms, but no luck, so I post this advice, I let you know if I can fix it (without reinstalling ubuntu)

Json Navigator

Hey guys, to complement my other post of the json validator, here is the json “Navigator” (netscape anyone?), it’s very useful for anyone dealing with complex structures. 

http://danml.com/pub/jsonBrowser.htm

Powered by WordPress and Motion by 85ideas.