Jul 03

I´ve just found a good comparision between this powerfull tools that let you do remoting between Flash (and oher clients) and .NET. I think WebORB is easier to learn, but FluorineFx is open source and it´s going to be promising like other open source projects getting better day by day. They are enphasizing their Silverlight library as I can see at their blog

Here the comparision link:
http://justinjmoses.wordpress.com/2008/03/10/weborb-vs-fluorinefx/

And some interesting links:

WebORB (midnight coders) for .NET
WebORB blog
WebORB yahoo group (necesita cuenta de yahoo)
WebORB forum
WebORB for .NET documentation

FluorineFx for .NET
FluorineFx blog
FluorineFx documentation
FluorineFx mailing list

Jul 03

I was trying to create a C# script to get files sended from Flex, when I found this post talking about Web handlers ASHX format that let you make operations and it gives you back an XML as a result, without the need of interacting with brower client (like you do with ASP.NET). Well, all this can sound a little weird, but it´s very simple.
Here you can get the file to place at your .NET application, and next, the usual Flex code with the FileReference.
“Uploader.ashx” ( I modified the original code to accept one parameter, that is the directory where you want to place your file)
Continue reading »

Jun 28

brown_net_02

This post is not about what is Weborb and how to use it. You can find good information and examples in Weborb site and the Weborb console that you can access once it´s installed. This is about how to develop an application using Flex + Weborb(.NET) in a Mac.

For people who doesn´t know, Weborb is a tool created by Midnight Coders that resolve remoting and real-time messaging between server-client / client-server. Weborb is developed for some server languages (.NET, Java, Rails, Coldfusion, PHP) , and supported by some kind of clients like Flash, Flex, Silverlight and Ajax. This powerfull tool has a lot of chances, from full CRUD operations (working with data base) to multi-user apps, data sync, data-push, etc. Not all weborb versions are or do exactly the same and have the same kind of licence. I recommend to keep in mind this before starting a serious project. Continue reading »

Jun 16

I needed a Weborb service (C# class), with method which returns all the files inside one folder of the server.
The problem I found was relative paths. To handle directories under the server we need to know first its phisical path, and logically, that depends on the server and hosting structure, or maybe one day you need to move your app to another server. So you need relative pahts, and they are there for that reason. Googling I found this solution:

///ruta relativa de un folder de servidor donde buscar archivos
        /// ruta fi?sica completa del servidor correspondiente a la ruta relativa
        public String GetServerPath(String folder)
        {
            return System.Web.HttpContext.Current.Server.MapPath(folder);
        }

And here you can see the complete service, if anyone needs it. I also made a little method to clean all the trash of Windows (Thumb.db files) and Mac (._whatever files):
Continue reading »

Jun 14

If you did´t try Flash Player 10 and you are wondering how to do that from your Flex Builder 3, It´s very simple:

  • Go to the project properties and select “Flex Build Path”
  • Go to “Library Path” and open “Flex 3.2″ (or whatever the first item is)
  • Select “playerglobal.swc” and delete it (you can use the “remove” button). At this point you erased any trail of FP9
  • Click the “Add SWC” button and look for the version 10 of the “playerglobal.swc” inside of FlexBuilder instalation folder. In mac the path should be “/Applications/Adobe Flex Builder 3/sdks/3.2.0/frameworks/libs/player/10/playerglobal.swc”. In PC: “C:\Program files\Adobe\Flex Builder 3\sdks\3.2.0\frameworks\libs\player\10\playerglobal.swc”
  • Now open “playerglobal.swc” and doble click “Link Type” option. Select “External” in the combo
    cap2
  • Now go to “Flex Compiler” menu and add this argument to the “Compiler arguments”: -target-player=10.0.0
  • If you´ve checked the option “Generate HTML wrapper file”, make sure of writting the right version (in this case: 10.0.0) in the option “Require Flash Player version”
    cap1

That´s all you need to compile for FP10. You can make a test, por example create an Sprite, put it on Stage, and modify its “rotationX”, rotationY”, etc.
Use the “Vector” class instead of Array if you are going to make an intensive use of them.
And… good luck!

May 09

Dalis Lopez is, as well as my girlfriend, the new junior flasher in the team. She´s been helping us and learning for a while. Right now what she likes more than anything else is the Gaia Framework, that she used for her first “official” website. You can see the result at colordebrasil.com. Big applause for her!!

colorbrasil

May 09

As the title says, this class lists all the HTML colors, and it does it through static constants so you can access them from whereever. I found here the info about the colors. (Thanks Dalis for writting the class). You can download it here.

package net.xinterface.utils
{
	/**
	 * @author Dalis Lopez
	 * */
 
	public class HTMLColors
	{
		public static const aliceblue:uint = 0xF0F8FF;
		public static const antiquewhite:uint = 0xFAEBD7;
		public static const aqua:uint = 0x00FFFF;
		public static const aquamarine:uint = 0x7FFFD4;
		public static const azure:uint = 0xF0FFFF;
		public static const beige:uint = 0xF5F5DC;
		public static const bisque:uint = 0xFFE4C4;
		public static const black:uint = 0x000000;
		public static const blanchedalmond:uint = 0xFFEBCD;
		public static const blue:uint = 0x0000FF;
		public static const blueviolet:uint = 0x8A2BE2;
		public static const brown:uint = 0xA52A2A;
		public static const burlywood:uint = 0xDEB887;
		public static const cadetblue:uint = 0x5F9EA0;
		public static const chartreuse:uint = 0x7FFF00;
		public static const chocolate:uint = 0xD2691E;
		public static const coral:uint = 0xFF7F50;
		public static const cornflowerblue:uint = 0x6495ED;
		public static const cornsilk:uint = 0xFFF8DC;
		public static const crimson:uint = 0xDC143C;
		public static const cyan:uint = 0x00FFFF;
		public static const darkblue:uint = 0x00008B;
		public static const darkcyan:uint = 0x008B8B;
		public static const darkgoldenrod:uint = 0xB8860B;
		public static const darkgreen:uint = 0xF006400;
		public static const darkgrey:uint = 0xA9A9A9;
		public static const darkkhaki:uint = 0xBDB76B;
		public static const darkmagenta:uint = 0x8B008B;
		public static const darkolivegreen:uint = 0x556B2F;
		public static const darkorange:uint = 0xFF8C00;
		public static const darkorchid:uint = 0x9932CC;
		public static const darkred:uint = 0x8B0000;
		public static const darksalmon:uint = 0xE9967A;
		public static const darkseagreen:uint = 0x8FBC8F;
		public static const darkslateblue:uint = 0x483D8B;
		public static const darkslategrey:uint = 0x2F4F4F;
		public static const darkturquoise:uint = 0x00CED1;
		public static const darkviolet:uint = 0x9400D3;
		public static const deeppink:uint = 0xFF1493;
		public static const deepskyblue:uint = 0x00BFFF;
		public static const dimgrey:uint = 0x696969;
		public static const dodgerblue:uint = 0x1E90FF;
		public static const firebrick:uint = 0xB22222;
		public static const floralwhite:uint = 0xFFFAF0;
		public static const forestgreen:uint = 0x228B22;
		public static const fuchsia:uint = 0xFF00FF;
		public static const gainsboro:uint = 0xDCDCDC;
		public static const ghostwhite:uint = 0xF8F8FF;
		public static const gold:uint = 0xFFD700;
		public static const goldenrod:uint = 0xDAA520;
		public static const green:uint = 0x008000;
		public static const greenyellow:uint = 0xADFF2F;
		public static const grey:uint = 0x808080;
		public static const honeydew:uint = 0xF0FFF0;
		public static const hotpink:uint = 0xFF69B4;
		public static const indianred:uint = 0xCD5C5C;
		public static const indigo:uint = 0x4B0082;
		public static const ivory:uint = 0xFFFFF0;
		public static const khaki:uint = 0xF0E68C;
		public static const lavender:uint = 0xE6E6FA;
		public static const lavenderblush:uint = 0xFFF0F5;
		public static const lawngreen:uint = 0x7CFC00;
		public static const lemonchiffon:uint = 0xFFFACD;
		public static const lightblue:uint = 0xADD8E6;
		public static const lightcoral:uint = 0xF08080;
		public static const lightcyan:uint = 0xE0FFFF;
		public static const lightgoldenrodyellow:uint = 0xFAFAD2;
		public static const lightgreen:uint = 0x90EE90;
		public static const lightgrey:uint = 0xD3D3D3;
		public static const lightpink:uint = 0xFFB6C1;
		public static const lightsalmon:uint = 0xFFA07A;
		public static const lightseagreen:uint = 0x20B2AA;
		public static const lightskyblue:uint = 0x87CEFA;
		public static const lightslategrey:uint = 0x778899;
		public static const lightsteelblue:uint = 0xB0C4DE;
		public static const lightyellow:uint = 0xFFFFE0;
		public static const lime:uint = 0x00FF00;
		public static const limegreen:uint = 0x32CD32;
		public static const linen:uint = 0xFAF0E6;
		public static const magenta:uint = 0xFF00FF;
		public static const maroon:uint = 0x800000;
		public static const mediumaquamarine:uint = 0x66CDAA;
		public static const mediumblue:uint = 0x0000CD;
		public static const mediumorchid:uint = 0xBA55D3;
		public static const mediumpurple:uint = 0x9370D8;
		public static const mediumseagreen:uint = 0x3CB371;
		public static const mediumslateblue:uint = 0x7B68EE;
		public static const mediumspringgreen:uint = 0x00FA9A;
		public static const mediumturquoise:uint = 0x48D1CC;
		public static const mediumvioletred:uint = 0xC71585;
		public static const midnightblue:uint = 0x191970;
		public static const mintcream:uint = 0xF5FFFA;
		public static const mistyrose:uint = 0xFFE4E1;
		public static const moccasin:uint = 0xFFE4B5;
		public static const navajowhite:uint = 0xFFDEAD;
		public static const navy:uint = 0x000080;
		public static const oldlace:uint = 0xFDF5E6;
		public static const olive:uint = 0x808000;
		public static const olivedrab:uint = 0x6B8E23;
		public static const orange:uint = 0xFFA500;
		public static const orangered:uint = 0xFF4500;
		public static const orchid:uint = 0xDA70D6;
		public static const palegoldenrod:uint = 0xEEE8AA;
		public static const palegreen:uint = 0x98FB98;
		public static const paleturquoise:uint = 0xAFEEEE;
		public static const palevioletred:uint = 0xD87093;
		public static const papayawhip:uint = 0xFFEFD5;
		public static const peachpuff:uint = 0xFFDAB9;
		public static const peru:uint = 0xCD853F;
		public static const pink:uint = 0xFFC0CB;
		public static const plum:uint = 0xDDA0DD;
		public static const powderblue:uint = 0xB0E0E6;
		public static const purple:uint = 0x800080;
		public static const red:uint = 0xFF0000;
		public static const rosybrown:uint = 0xBC8F8F;
		public static const royalblue:uint = 0x4169E1;
		public static const saddlebrown:uint = 0x8B4513;
		public static const salmon:uint = 0xFA8072;
		public static const sandybrown:uint = 0xF4A460;
		public static const seagreen:uint = 0x2E8B57;
		public static const seashell:uint = 0xFFF5EE;
		public static const sienna:uint = 0xA0522D;
		public static const silver:uint = 0xC0C0C0;
		public static const skyblue:uint = 0x87CEEB;
		public static const slateblue:uint = 0x6A5ACD;
		public static const slategrey:uint = 0x708090;
		public static const snow:uint = 0xFFFAFA;
		public static const springgreen:uint = 0x00FF7F;
		public static const steelblue:uint = 0x4682B4;
		public static const tan:uint = 0xD2B48C;
		public static const teal:uint = 0x008080;
		public static const thistle:uint = 0xD8BFD8;
		public static const tomato:uint = 0xFF6347;
		public static const turquoise:uint = 0x40E0D0;
		public static const violet:uint = 0xEE82EE;
		public static const wheat:uint = 0xF5DEB3;
		public static const white:uint = 0xFFFFFF;
		public static const whitesmoke:uint = 0xF5F5F5;
		public static const yellow:uint = 0xFFFF00;
		public static const yellowgreen:uint = 0x9ACD32;
 
		public function HTMLColors()
		{
		}
 
	}
}
May 09

weblogo

Recently, a friend and old fellow, member of the e-Lite Studios team has created a Flash community portal called MiddleFlash. As its name says, it pretends to be middle-ware Flash related, without forgetting about other aspects like job offers, tons of links, bookmarks, related news, Amazon books, rss feeds content based and resources like their multi-user server “BeamServer”.

Actually, the portal is in its first phase ant it´s still a lot of work to do according to what Nacho (its author) told me. For the second stage, he will implement every kind of new stuff, like: articles, components, tools, workshops, tutorials, schools, forum, interviews, reviews, events, awards, Delicious based web recommendations, etc.

As you can see, it looks like this project is going to have repercussion. Right now I´m going to colaborate as much as I can.

May 08

sandoz

In fact no so new… it´s been online about a month. This is the last project I developed in Genetsis, with Carlos and my flash partners, the backend team and “SuperTrini” (graphic design). The client is “Grupo Munreco”. It´s an ActionScript 3 application, with a Coldfusion and SQLserver for the backend.

May 08

iman

Yesterday, Diego and me, with the rest of the team that had developed Maskedummies, attended to the Premios Imán 2009 awards ceremony to get a deserved prize after a hard work.

Congratulations to everyone.

Apr 29

captura

This is a little Flex application to see the diferent Papervision3D materials in real time, and some of its properties:

- Model selection (primitives)
- Textures, light maps and bump maps selection
- Bitmap smothing and bitmap precise
- StageQuality
- Light and ambient color
- Movement velocity (rotation)
- Camera zoom

This way you can make some combinations to check the real consequences and performance of memory and procesor.

Apr 29

I miss some good features when working with FlexBuilder than can make my life easier. I found a very interesting article talking about some plugins like “Todo/Fixme” tasks plugin, Snippets panel plugin, MYLYN, etc. You can see the explanation and how to install them here.

Also I use other usefull plugins:
XML editor. It closes tags for you. DTD automatic generation and code formating (tabs).
XMLBuddy (download the last version)

Subversion client. Good to work with subversion without leaving your editor enviroment.
Subclipse install

Apr 26

Apr 21

Surfing the web I found a way to show/hide the system hidden files and folders on a Mac. It´s simple.
Open a Terminal.app instance and write this:

Show:
defaults write com.apple.finder AppleShowAllFiles TRUE (type intro)
killall Finder (pulsa enter)

Hide:
defaults write com.apple.finder AppleShowAllFiles FALSE (type intro)
killall Finder (pulsa enter)

Apr 20

pc2mac

Changing the way we work is not easy, beyond what some “apple guys” preach . Why change or at least try? I’m not interested in convincing anyone. Still do not believe that switching to mac can solve your life. At the moment I’m having enough trouble. I simply “attempt” it because if many people say good things about it … it has to be tested. I tried it some time ago, after buying a MacBook Pro 15 ‘, which is what was fashionable in the world of web development (I know, I did it without thinking), which frustrated me so much that I ended up installing Windows XP with Bootcamp …

Now I have decided to try the jump again because I have more free time.

Below I´ll tell you the good and bad things that I found. It should be borne in mind that I am a programmer, and it is very likely that my work environment will be different from a basic user, which won´t find a half of my problems to change.

Continue reading »

Apr 18

Update: You can download the source code here: FlexProjectDwall.zip

This is a piece of code I´ve used in some projects. The idea was to make an API to develop this kind of 3D galleries without any effort. I started it but sadly, I don´t have all the time I´d like to do it. So here you can see a demo.
The most important feature of this gallery is the dinamic way of loading assets (photo and video). A really big data provider (array) can be setted and the gallery won´t lose performance at all. Also the data provider can be modified, adding items at runtime (ex: paginated data). The challenge doing this was creating and destroying planes constantly without overloading memory and processor performance.

dwall

Apr 13
http://www.carlosulloa.com/blog/jpg/advanced_papervision3d_400.jpg

Last week, for three intense days, took place the Advanced Papervision3D Training Course given by Carlos Ulloa in London. In this course we have been all the components of the blog together with other 17 colleagues come from different countries of Europe and could have seen Papervision3D closely, very closely.

In spite of the fact that it could seem that in this time it is complicated to deep too much, we have seen the most of paragraphs with sufficient intensity, seeing topics of planning and concept, matrices, textures, cameras, physics, Box2D and much more.

As for Carlos, it might say that he has been a great ‘teacher’, he synthesized the information centring on the really interesting things, though this course was geared towards developers who have significant development experience with ActionScript 3 and working knowledge of Papervision3D.

Beyond the course, no question about, the experience was great. We knew a lot of people from different countries, now we have new friends and some new idea. We talked about Augmented Reality, Iphone apps, open source projects, new development skills, and others similar stuffs.

Thank you Carlos for sharing your patience and your ‘wisdom’ with all of us.

Next stop, Flash on the Beach in Brighton.

Mar 09

This is the shooter that I made last year to Promeris. Repeated this year and I have asked for outside help with the setup. It’s fun to see the client and potential clients to enjoy live. The idea is to kill as many bugs as possible in 30 seconds.

promerisshooter Continue reading »

Mar 04

[UPDATE] The guys from Pyro just updated the player version and now you can use it in a 3D scenario. You can download the last version from their svn in google code. Now there is a new parameter in the constructor. You should use like this:

var pyro:Pyro = new Pyro(320, 240, Pyro.STAGE_EVENTS_MECHANICS_ALL_OFF);
pyro.play("somethig.flv");

Pyro video player API, is a very cool API that implements all the logic to work with streaming and progresive video in Flash. It´s made by very experienced people with it, so it´s 100% recommended.

I started to make some tests with it, and I realised it doesn´t work if you try to use a “Pyro” instance like a 3D object material, for example, a Papervision3D Plane primitive. I saw the Pyro code, and the reason was obvious: the initialization of the player only happens after “Event.ADDED_TO_STAGE” was fired. If we use a Pyro instance like a MovieMaterial, it will never be added to stage, to the event will never fire. I wrote a comment to the author telling him about this and he told me it will be fixed in the next version.

Right now I needed that functionality for a project, so I modified the Pyro class to fix the stage problem, waiting for the new version. Here you can see a working sample and download the source code:
Continue reading »

Mar 01

Right now ActionScript doesn´t have abstract classes, but it´s posible to simulate them.

An abstract class shouldn´t be instantiated directly. It has to be extended by a subclass. This kind of classes usually have a generic function that becomes complete when they´re extended.

Other programming languages generate an error when you try to instantiate them. However Actionscript allows it. To force that classes to generate errors on instantiating time, you just need to add a little script to your class contructor:

public function MyConstructor()
{
	if(getQualifiedClassName(this) == "your.name.space::AbstractClassName")
	{
		throw new Error("AbstractClassName> Don´t instantiate me!!!");
	}
}

You can see we are checking the instantiated class name with the “getQualifiedClassName(this)” method. A subclass will always have a diferent name, so in that case you will get no errors.

It´s important to write correctly the class path and its name. For example: “net.xinterface.managers::AbstractManager”, being “AbstractManager” the name of a class located in “net/xinterface/managers/” directory.