<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
   <title>funciton communications - blog</title>
   <link rel="alternate" type="text/html" href="http://blog.funciton.com/en/" />
   <link rel="self" type="application/atom+xml" href="http://blog.funciton.com/en/atom.xml" />
   <id>tag:blog.funciton.com,2008:/en//1</id>
   <updated>2008-08-07T18:43:36Z</updated>
   
   <generator uri="http://www.sixapart.com/movabletype/">Movable Type Publishing Platform 4.01</generator>


<entry>
   <title>XMPP for real time flash communication</title>
   <link rel="alternate" type="text/html" href="http://blog.funciton.com/en/2008/08/xmpp_for_real_time_flash_commu.html" />
   <id>tag:blog.funciton.com,2008:/en//1.43</id>
   
   <published>2008-08-07T17:23:26Z</published>
   <updated>2008-08-07T18:43:36Z</updated>
   
   <summary>Why is xmpp or jabber not that spread into the flash community? Why we don&#8217;t see jabber as an option for real time collaboration apps together with flash? Here are my thoughts on the subject....</summary>
   <author>
      <name>funciton communications</name>
      <uri>http://www.funciton.com</uri>
   </author>
   
      <category term="Flash" scheme="http://www.sixapart.com/ns/types#category" />
   
      <category term="Flash Media Server" scheme="http://www.sixapart.com/ns/types#category" />
   
      <category term="Flex" scheme="http://www.sixapart.com/ns/types#category" />
   
      <category term="Open Source" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://blog.funciton.com/en/">
      Why is xmpp or jabber not that spread into the flash community? Why we don&apos;t see jabber as an option for real time collaboration apps together with flash? Here are my thoughts on the subject.
      &quot;XMPP&quot;:http://www.xmpp.org/ (Extensible Messaging and Presence Protocol) or Jabber as i preffer to call it is an open source format for real time collaboration.

Chat networks as gTalk, iChat and, since not so long ago, aim (aol&apos;s instant messaging) uses xmpp as their real time protocol, possibly under their own server implementations.

There are lots of open source&apos;d servers which implement this protocol and some of them support plugins.

What are jabber plugins, you may ask...

With plugins you can integrate your own internal chat network with other networks such as gtalk, yahoo, messenger, aim, etc. or even include a layer of voip. VERY COOL! but...

Why should we, flash developers, care about this?

If you didn&apos;t know, there is a server called &quot;openfire&quot;:http://www.igniterealtime.org/projects/openfire/index.jsp from &quot;jivesoftware&quot;:http://www.jivesoftware.com/ (Yes! the same ppl under other collaborative type of tools) that has an ActionScript2 and ActionScript3 (beta) libraries to interact with the server. This can let us work with it to create multiuser applications that can interact with other chat networks or even voip.

Wait, voip in flash? how is that possible if jabber is a text exchange protocol. &quot;Red5&quot;:http://www.igniterealtime.org/community/community/plugins/red5 to the rescue!

With the red5 plugin you can extend jabber&apos;s functionality with AMF and support video and audio.

The great thing about jabber is that it is being used by a lot of communities around the world and has proved to be very capable of handling a big amount of concurrent users (it can be clustered very easy with openfire&apos;s gui).

The best of all things (don&apos;t go crazy yet) is that it is free :)

--fernando

P.D: i&apos;m loving this site &quot;iilwy&quot;:http://www.iminlikewithyou.com which btw uses jabber as their communication layer


   </content>
</entry>

<entry>
   <title>ActionScript 3 Cronjob [beta]</title>
   <link rel="alternate" type="text/html" href="http://blog.funciton.com/en/2008/07/actionscript_3_cronjob_beta.html" />
   <id>tag:blog.funciton.com,2008:/en//1.32</id>
   
   <published>2008-07-07T03:45:54Z</published>
   <updated>2008-08-05T20:06:03Z</updated>
   
   <summary>I wrote a cronjob class in actionscript 3 during my flight back to Lima from San Francisco. This could help you manage repetitive or single tasks in the future using a cron task syntax....</summary>
   <author>
      <name>funciton communications</name>
      <uri>http://www.funciton.com</uri>
   </author>
   
      <category term="Flash" scheme="http://www.sixapart.com/ns/types#category" />
   
      <category term="Flex" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://blog.funciton.com/en/">
      I wrote a cronjob class in actionscript 3 during my flight back to Lima from San Francisco. This could help you manage repetitive or single tasks in the future using a cron task syntax.
      <![CDATA[Here is the cronjob main class:

<code language="as">
package utils {
	
	import flash.events.EventDispatcher;
	import flash.events.TimerEvent;
	import flash.utils.Timer;
	
	import events.CronEvent;
	
	public class Cron extends EventDispatcher {
		
		private var $__timer:Timer = new Timer(60000);
		private var $__running:Boolean = false;
		private var $__tasks:Array = new Array();
		private var $__tasksId:Object = new Object();
		
		public function Cron(){
			$__timer.addEventListener(TimerEvent.TIMER, checkTask);
		}
		
		public function start():void{
			if(!$__running){
				var secRes:uint = (60 - ((new Date()).getSeconds() + 1)) * 1000;
				var delay:Timer = new Timer(secRes, 1);
				delay.addEventListener(TimerEvent.TIMER, function(event:TimerEvent):void{ 
															checkTask((event.clone() as TimerEvent));
															$__timer.start();
														});
				delay.start();
				$__running = true;
			}
		}
		
		public function stop():void{
			$__running = false;
			$__timer.stop();
		}
		
		public function addTask(task:String):void{
			task = trim(task);
			validateTask(task);
			$__tasksId[task.split(" ").pop()] = $__tasks.push(task);
		}
		
		public function removeTask(id:String):void{
			if($__tasksId[id] == null) throw new Error("Task id " + id + " not found");
			$__tasks[$__tasksId[id]] = null;
			$__tasksId[id] = null;
			delete $__tasksId[id];
		}
		
		public function get running():Boolean{
			return $__running;
		}
		
		private function trim(str:String):String{
			return str.replace(/^\s+|\s+$/g, '');
		}
		
		private function validateTask(str:String):void{
			if(str.split(" ").length != 6) throw new Error("Task format error");
			if($__tasks[str.split(" ").pop()] != null) throw new Error("Task id already exists");
		}
		
		private function toObject(list:Array):Object{
			var res:Object = new Object();
			for(var i:uint=0;i<list.length;i++){
				if(list[i] != "") res[list[i]] = true;
			}
			return res;
		}
		
		private function $__transform(item:String):*{
			if(item.indexOf(",") != -1 && item.indexOf("/") == -1){
				return toObject(item.split(","));
			}else if(item.indexOf("/") != -1 && item.indexOf(",") == -1){
				var items:Array = new Array("0");
				for(var i:uint=0;i<(60 - uint(item.split("/")[1]));){
					i += uint(item.split("/")[1]);
					items.push(i);
				}
				return toObject(items);
			}else{
				return item;
			}
		}
		
		private function $__check(item:*, index:int, array:Array):void{
			var date:Date = new Date();
			var pieces:Array = item.split(" ");
			var mins:* = $__transform(pieces.shift());
			var hours:* = $__transform(pieces.shift());
			var days:* = $__transform(pieces.shift());
			var months:* = $__transform(pieces.shift());
			var weekDay:* = $__transform(pieces.shift());
			var id:String = pieces.shift();
			var dispatch:Boolean = (mins is String) ? (date.getMinutes().toString() == mins || mins == "*"): ((date.getMinutes() + 1).toString() in mins);
			dispatch = dispatch && ((hours is String) ? (date.getHours().toString() == hours || hours == "*"): ((date.getHours() + 1).toString() in hours));
			dispatch = dispatch && ((days is String) ? (date.getDate().toString() == days || days == "*"): ((date.getDate() + 1).toString() in days));
			dispatch = dispatch && ((months is String) ? ((date.getMonth() + 1).toString() == months || months == "*"): ((date.getMonth() + 2).toString() in months));
			dispatch = dispatch && ((weekDay is String) ? (date.getDay().toString() == weekDay || weekDay == "*"): ((date.getDay() + 1).toString() in weekDay));
			
			dispatchEvent(new CronEvent(CronEvent.TASK, id));
		}
		
		private function checkTask(event:TimerEvent):void{
			$__tasks.forEach($__check);
		}

	}
	
}</code>


And here is the CronEvent class:
<code language="as">
package events {
	
	import flash.events.Event;

	public class CronEvent extends Event {
		
		public static const TASK:String = "task";
		private var id:String = "";
		
		public function CronEvent(type:String, id:String=""){
			this.id = id;
			super(type);
		}
		
		override public function clone():Event{
			return new CronEvent(type, id);
		}
		
	}
	
}</code>

Here is how you can use it:

<code language="as">
import utils.Cron;
import events.CronEvent;

var c:Cron = new Cron();
c.addEventListener(CronEvent.TASK, taskHandler);
function taskHandler(event:CronEvent):void{
	trace ("The task id is: " + event.id);
}
c.addTask("* * * * * mainID"); // repetitive task (every minute)
c.addTask("0 0 * * * otherID"); // repetitive task every day at 00:00
c.start();</code>

I haven't had the chance to test it carefully. Please let me know if you find anything.

--fernando]]>
   </content>
</entry>

<entry>
   <title>Package information in ActionScript 3</title>
   <link rel="alternate" type="text/html" href="http://blog.funciton.com/en/2008/06/package_information_in_actions.html" />
   <id>tag:blog.funciton.com,2008:/en//1.31</id>
   
   <published>2008-06-09T01:40:42Z</published>
   <updated>2008-08-05T20:06:55Z</updated>
   
   <summary>When i code in python i always try to specify information about the package in the init.py file, for example the version, author etc. Unfortunately i haven&#8217;t seen smth like this in ActionScript 3 so i started playing with ideas...</summary>
   <author>
      <name>funciton communications</name>
      <uri>http://www.funciton.com</uri>
   </author>
   
      <category term="Flash" scheme="http://www.sixapart.com/ns/types#category" />
   
      <category term="Flex" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://blog.funciton.com/en/">
      When i code in python i always try to specify information about the package in the __init__.py file, for example the version, author etc. Unfortunately i haven&apos;t seen smth like this in ActionScript 3 so i started playing with ideas and here is how i solved it.
      <![CDATA[If you know python chances are that you know "Django":http://www.djangoproject.com. Django is a python web framework ala ruby on rails.

In Django, to get the framework version for example, you need smth like this:
<code language="actionscript">
import django
print django.VERSION
</code>

Now, how can we do this in ActionScript 3?

Let's say our framework structure is as follows:

framework/
framework/utils/StringUtil.as

and we want to have the framework version. We need to create a "framework.as" file at the root of the directory (same folder as the "framework" folder) like this

framework.as
framework/
framework/utils/StringUtil.as

in that framework.as file have this:
<code language="actionscript">
package {
public function get framework():Object{
return {VERSION: "0.0.1"};
}
}
</code>

so when using the framework in flash or flex we can do this:

<code language="actionscript">
import framework;
trace (framework.VERSION);
</code>

Nice huh?

-- fernando]]>
   </content>
</entry>

<entry>
   <title>Wii &amp; Flash games for Visa</title>
   <link rel="alternate" type="text/html" href="http://blog.funciton.com/en/2008/05/wii_flash_games_for_visa.html" />
   <id>tag:blog.funciton.com,2008:/en//1.30</id>
   
   <published>2008-05-18T21:27:03Z</published>
   <updated>2008-08-05T20:07:19Z</updated>
   
   <summary>Just got the chance to post about the games we did for Visa regarding the Olympics. We setup 3 Olympic related games that are shown in Perú, Venezuela, Panamá, Costa Rica, Chile, Puerto Rico and Guatemala....</summary>
   <author>
      <name>funciton communications</name>
      <uri>http://www.funciton.com</uri>
   </author>
   
      <category term="Flash" scheme="http://www.sixapart.com/ns/types#category" />
   
      <category term="funciton" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://blog.funciton.com/en/">
      Just got the chance to post about the games we did for Visa regarding the Olympics. We setup 3 Olympic related games that are shown in Perú, Venezuela, Panamá, Costa Rica, Chile, Puerto Rico and Guatemala.
      We had 2 and a half weeks to organize and develop the games. We first thought of using webcams but we ended using the wiimotes. To tell the truth, i was waiting for the oportunity to get my hands on the &quot;wiiflash project&quot;:http://www.wiiflash.org/ . If you haven&apos;t heard about it, you should give it a try.

We developed 3 games for Visa: Baseball, Shooting and Javelin.

Here are some shots of the design we used. They are all hand-drawed.

!/blogfiles/2008/05/18/tiro.jpg!

!/blogfiles/2008/05/18/jabalina.jpg!

!/blogfiles/2008/05/18/baseball1.jpg!

!/blogfiles/2008/05/18/baseball2.jpg!

!/blogfiles/2008/05/18/visa1.jpg!

!/blogfiles/2008/05/18/visa2.jpg!

Very interesting project :)

--fernando






   </content>
</entry>

<entry>
   <title>toFixed(0) and Date.getTime() bug</title>
   <link rel="alternate" type="text/html" href="http://blog.funciton.com/en/2008/05/tofixed0_and_dategettime_bug.html" />
   <id>tag:blog.funciton.com,2008:/en//1.29</id>
   
   <published>2008-05-01T13:57:52Z</published>
   <updated>2008-08-05T20:07:44Z</updated>
   
   <summary>I&#8217;ve been able to reproduce a bug several times with the Number.toFixed(0) method in that it returns a &#8220;.&#8221; . Also from what i understand the Date.getTime() should return an int but sometimes it returns a decimal....</summary>
   <author>
      <name>funciton communications</name>
      <uri>http://www.funciton.com</uri>
   </author>
   
      <category term="Air" scheme="http://www.sixapart.com/ns/types#category" />
   
      <category term="Flash" scheme="http://www.sixapart.com/ns/types#category" />
   
      <category term="Flex" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://blog.funciton.com/en/">
      I&apos;ve been able to reproduce a bug several times with the Number.toFixed(0) method in that it returns a &quot;.&quot; . Also from what i understand the Date.getTime() should return an int but sometimes it returns a decimal.
      <![CDATA[So i did a quick exercise to figure out what percentage of returns have this error and i found it's around the 10% of the cases.

<code language="as">
var score:uint = 0;
var totalTests:uint = 1000;
for(var i:uint=0;i<totalTests;i++){
	var p:Number = Math.random() * 10;
	if(p.toFixed(0).indexOf(".") != -1) score++;
}
trace ((score * 100) / totalTests);
</code>

It returns me around 8.7 and 10.1 along several calls.

I'm currently writing a workaround method for this.

Also, while developing some customer's AS3 api i noticed that the Date.getTime() was returning a decimal number so i extended my test cases to include this and found that i was correct. I don't know exactly in which situations this occur but i can assure it's happening. Has anyone experienced this before?

-- fernando]]>
   </content>
</entry>

<entry>
   <title>Flooded under wii&apos;s</title>
   <link rel="alternate" type="text/html" href="http://blog.funciton.com/en/2008/04/flooded_under_wiis.html" />
   <id>tag:blog.funciton.com,2008:/en//1.28</id>
   
   <published>2008-04-27T05:47:37Z</published>
   <updated>2008-08-05T20:08:05Z</updated>
   
   <summary>For real! I have never seen this many wii&#8217;s in one place. 30 wii&#8217;s and no single game! this is horrible!...</summary>
   <author>
      <name>funciton communications</name>
      <uri>http://www.funciton.com</uri>
   </author>
   
      <category term="funciton" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://blog.funciton.com/en/">
      For real! I have never seen this many wii&apos;s in one place. 30 wii&apos;s and no single game! this is horrible!
      I can’t tell you why do we have this amount of wii’s here at the office yet but check out this pic. We are literally under wii’s!

!/blogfiles/2008/04/27/2434472677_1d92eb0140_o.jpg!

btw, this is me. First time i post a pic of me on the internet.

-- fernando


   </content>
</entry>

<entry>
   <title>JRE - You may need to reinstall flash</title>
   <link rel="alternate" type="text/html" href="http://blog.funciton.com/en/2008/04/jre_you_may_need_to_reinstall.html" />
   <id>tag:blog.funciton.com,2008:/en//1.27</id>
   
   <published>2008-04-25T03:10:51Z</published>
   <updated>2008-08-05T20:08:29Z</updated>
   
   <summary>This is the most confusing and strange error i have ever seen in flash: &#8220;Error initializing Java Runtime Environment - You may need to reinstall Flash.&#8221;...</summary>
   <author>
      <name>funciton communications</name>
      <uri>http://www.funciton.com</uri>
   </author>
   
      <category term="Flash" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://blog.funciton.com/en/">
      This is the most confusing and strange error i have ever seen in flash: &quot;Error initializing Java Runtime Environment - You may need to reinstall Flash.&quot;
      My question is, what does flash has to do with jre?

Here is a screenshot of the error:

&quot;View image here&quot;:http://blog.funciton.com/blogfiles/2008/04/24/2438470183_3f179ac6c8_o.html

-- fernando
   </content>
</entry>

<entry>
   <title>Antivirus in Adobe Air</title>
   <link rel="alternate" type="text/html" href="http://blog.funciton.com/en/2008/03/antivirus_in_adobe_air.html" />
   <id>tag:blog.funciton.com,2008:/en//1.26</id>
   
   <published>2008-03-23T04:10:50Z</published>
   <updated>2008-08-05T20:09:07Z</updated>
   
   <summary>It&#8217;s just a proof of concept but it&#8217;s an antivirus done entirely in Adobe Air. Check out the screencast of it working....</summary>
   <author>
      <name>funciton communications</name>
      <uri>http://www.funciton.com</uri>
   </author>
   
      <category term="Air" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://blog.funciton.com/en/">
      It&apos;s just a proof of concept but it&apos;s an antivirus done entirely in Adobe Air. Check out the screencast of it working.
      Years ago when central was still alive i thought about the idea of creating an antivirus in it. I did lots of research through out the years. I met some antivirus engineers (there are 2 antivirus companies in this country), read complete open source antivirus sources, etc. 

So, when i tried Adobe Air the first time i thought about doing the same apps i did in central and i remembered my dream.

BTW, i did this in air because of the FileStream class. You could have it in flex or flash but you will need to work with other scripting languages.

I may say again that this is just a proof of concept and it&apos;s not a complete antivirus software. I have no idea if implementing an entire antivirus is possible.

&quot;Here is the screencast&quot;:http://screencast.com/t/7wN1XqQgwmg

No, i won&apos;t release any source code. Sorry!

-- fernando
   </content>
</entry>

<entry>
   <title>My first Ribbit app</title>
   <link rel="alternate" type="text/html" href="http://blog.funciton.com/en/2008/03/my_first_ribbit_app.html" />
   <id>tag:blog.funciton.com,2008:/en//1.25</id>
   
   <published>2008-03-15T17:45:47Z</published>
   <updated>2008-08-05T20:13:51Z</updated>
   
   <summary>I have been following the ribbit development for a while trying to develop an app in my spare time. Here is a screencast of the app in a very alpha state....</summary>
   <author>
      <name>funciton communications</name>
      <uri>http://www.funciton.com</uri>
   </author>
   
      <category term="Flex" scheme="http://www.sixapart.com/ns/types#category" />
   
      <category term="Ribbit" scheme="http://www.sixapart.com/ns/types#category" />
   
      <category term="Zimbra" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://blog.funciton.com/en/">
      I have been following the ribbit development for a while trying to develop an app in my spare time. Here is a screencast of the app in a very alpha state.
      When i started creating some dummy ribbit apps i kept thinking on what should i do, what can be useful for me and my co-workers every day.

We love zimbra and use it everyday from everywhere so a zimlet (zimbra widget) was a great idea for a ribbit app,

&quot;Click here&quot;:http://screencast.com/t/6A1aq9UlB to check out a screencast of the app (very alpha state btw)

Also be sure to &quot;check out ribbit&quot;:http://www.ribbit.com!

-- fernando
   </content>
</entry>

<entry>
   <title>MSN Messenger lib for adobe air</title>
   <link rel="alternate" type="text/html" href="http://blog.funciton.com/en/2008/03/msn_messenger_lib_for_adobe_ai.html" />
   <id>tag:blog.funciton.com,2008:/en//1.24</id>
   
   <published>2008-03-06T19:13:01Z</published>
   <updated>2008-08-06T14:17:12Z</updated>
   
   <summary>I took the morning off from work in order to finally finish my actionscript msnlib for adobe air. It allows you to connect and chat with msn messenger users within adobe air. It uses just ActionScript 3 and the air...</summary>
   <author>
      <name>funciton communications</name>
      <uri>http://www.funciton.com</uri>
   </author>
   
      <category term="Air" scheme="http://www.sixapart.com/ns/types#category" />
   
      <category term="Open Source" scheme="http://www.sixapart.com/ns/types#category" />
   
      <category term="funciton" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://blog.funciton.com/en/">
      I took the morning off from work in order to finally finish my actionscript msnlib for adobe air. 
It allows you to connect and chat with msn messenger users within adobe air. It uses just ActionScript 3 and the air libs.
      Some while ago we were developing a network site where we needed to extract a user&apos;s msn list contacts, so i started reading about the protocol. It&apos;s horrible i may add! 

After several hours implementing it in python i stopped and thought that it should be possible to implement with flash/flex and it&apos;s Socket class.

I was no wrong, it was absolutely possible except for one thing. I needed to work with the response headers of a remotely loaded file. Flash neither flex were able to do this so i quickly checked out the air docs and yes! there was it :)

Here is a very short video i prepared demostrating how the login / userlist works. I&apos;ll prepare another one as soon as i can demostrating how the actual &quot;chat&quot; works.

&quot;Click to see video&quot;:http://blog.funciton.com/blogfiles/msnlib-1.htm

* Do i plan to release the source code?

Absolutely! I don&apos;t know where to host the subversion repo yet. I haven&apos;t found how google code manages licenses.

* Are all the msn messenger features implemented?

No. Only text based features are implemented in this version of the lib.

* Is that my real msn address?

No. It&apos;s a passport account i&apos;m using for testing purposes only.
   </content>
</entry>

<entry>
   <title>Google culture</title>
   <link rel="alternate" type="text/html" href="http://blog.funciton.com/en/2008/02/google_culture.html" />
   <id>tag:blog.funciton.com,2008:/en//1.23</id>
   
   <published>2008-02-22T01:06:39Z</published>
   <updated>2008-08-05T20:14:52Z</updated>
   
   <summary>I just don&#8217;t feel that &#8220;community wave&#8221; as i felt before. In my opinion and others it&#8217;s because of what is called the &#8220;google culture&#8221;....</summary>
   <author>
      <name>funciton communications</name>
      <uri>http://www.funciton.com</uri>
   </author>
   
      <category term="General" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://blog.funciton.com/en/">
      I just don&apos;t feel that &quot;community wave&quot; as i felt before. In my opinion and others it&apos;s because of what is called the &quot;google culture&quot;.
      Sometime ago i used to visit daily every community related to what i do. I liked to answer other&apos;s questions cause i felt i was giving back to the community as the community did with me other times.

Not anymore, i&apos;m so load with work now that i only surf around communities if google takes me there via a search. You may be thinking &quot;yeah, that happens to me too&quot;. Exactly! This is what i&apos;m calling the &quot;google culture&quot;.

This is why documentation is now THAT important. Developers need to document their code as much as possible to make it succeed.

Also that&apos;s why SEO is so important these days, if google doesn&apos;t like you it&apos;s very difficult your site will receive any visitor.

Google is an amazing tool but i just feel that it&apos;s making us lazy towards a community.

What are your thoughts on this?

BTW, i can&apos;t get credit for the &quot;google culture&quot; term, i have read it somewhere but i don&apos;t remember where though.

-- fernando
   </content>
</entry>

<entry>
   <title>Interesting flash tips</title>
   <link rel="alternate" type="text/html" href="http://blog.funciton.com/en/2008/02/interesting_flash_tips.html" />
   <id>tag:blog.funciton.com,2008:/en//1.22</id>
   
   <published>2008-02-11T03:45:07Z</published>
   <updated>2008-08-05T20:15:27Z</updated>
   
   <summary>During our normal maintenance of advertising screens in where we reproduce video under flash player over linux we have found several things that we believe are important to document....</summary>
   <author>
      <name>funciton communications</name>
      <uri>http://www.funciton.com</uri>
   </author>
   
      <category term="Flash" scheme="http://www.sixapart.com/ns/types#category" />
   
      <category term="General" scheme="http://www.sixapart.com/ns/types#category" />
   
      <category term="funciton" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://blog.funciton.com/en/">
      During our normal maintenance of advertising screens in where we reproduce video under flash player over linux we have found several things that we believe are important to document.
      <![CDATA[NetStream.close should be changed to being synchronic or to dispatch an event as soon as the stream is reall closed.

Doing this:
<code language="as">
myNetStream.close();
myNetStream.play("test.flv");
</code>

May not work under some circunstances because the "close" method will happen after the play or in the middle of it. I'm creating a "callLater" alike method to bypass this.

Under linux if you playback a video playlist it is recommended to destroy the video object on every video switch or the flash player will keep consuming memory without releasing it. I have had better results by naming the Video instance different everytime. This doesn't happen under windows or mac btw, only linux.

This reminds me of this:
<code language="as">
var myVideo:Video = new Video();
var tmp:Array = new Array(myVideo);
trace (tmp[0] is Video);
</code>

Under windows/mac it will trace true but in linux it will trace false. A workaround is to point directly to the instance:

<code language="as">
trace (myVideo is Video);
</code>

Will trace true under all OS.

If you load an external movie using the Loader class you should stop, close and "nullify" all vars/instances before unloading the movie. This is a "feature" btw which is pretty uncomfortable to work with.

All this behaviors appear to be more serious under the linux flash player but there are workaround for everything so be cool :)

At the beggining flash player 9 was consuming 200~ MB and 31% cpu, now after studying everything and applying the workarounds it consumes 23~ MB and 3% cpu :)

Hope this helps someone. We will post any other findings we step upon.

-- fernando]]>
   </content>
</entry>

<entry>
   <title>Receive AXNA updates on IM - twitter</title>
   <link rel="alternate" type="text/html" href="http://blog.funciton.com/en/2007/12/receive_axna_updates_on_im_twi.html" />
   <id>tag:blog.funciton.com,2007:/en//1.21</id>
   
   <published>2007-12-25T00:28:05Z</published>
   <updated>2008-02-23T14:22:38Z</updated>
   
   <summary>I love holidays because i have a chance to code whatever i feel like coding. I&#8217;m using twitter more and more lately. I have configured it to send me updates via im. The other i thought how cool would it...</summary>
   <author>
      <name>funciton communications</name>
      <uri>http://www.funciton.com</uri>
   </author>
   
      <category term="Python" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://blog.funciton.com/en/">
      I love holidays because i have a chance to code whatever i feel like coding. I&apos;m using twitter more and more lately. I have configured it to send me updates via im.

The other i thought how cool would it be to receive axna updates via im too so i thought what the hell. Why not coding a python script that will ping axna every 5 minutes and send updates to twitter! :)
      I haven&apos;t even started coding it but i wanted to write this post while coding in order to see how much time this takes.

[7:34 pm]
I&apos;m currently at home, waiting for the christmas dinner. I know i want to code this in python (i love how python feels). I&apos;m running windows vista on my laptop and i&apos;m about to download and install python + required stuff

[7:35 pm]
Downloading python + python-twitter + feedparser + simplejson . Registering the twitter account for this purpose -&gt; http://twitter.com/axna

[7:37 pm]
Registration done! Took me 3 tries in order to register correctly. Installing all the downloaded stuff. Couldn&apos;t find a simplejson installer for windows.

[7:43 pm]
Almost lost this entry because my laptop rebooted. I could not find a simplejson installer for windows so i&apos;m going to code on the office&apos;s linux server :(

[7:46 pm]
AXNA seems down. Awesome timing! :) The bad thing about coding on christmas is that family doesn&apos;t let me concentrate.

[7:53 pm]
First series of tests done. Time to start planning the application. Should i release this as open source later? thinking out loud...

[7:57 pm]
I should store somewhere the already published to twitter entries so i won&apos;t duplicate. I need a unique id. Maybe the axna link? will use mysql that is already installed on this server. I remember reading somewhere that twitter only accepts 7 twitts per minute. Will see if this is true.

[8:03 pm]
Installed python-mysqldb and setup the database+tables

[8:12 pm]
Ok, i&apos;m done with the rss 2 database part. Now the twitter part.

[8:20 pm]
I&apos;m done! :) Be right back. Need a beer

[8:29 pm]
Ok. Just finished a glass of whisky :) The script ran perfectly. Now i need to think a way to take advantage of the 140 max chars.

[8:31 pm]
Just read the rss format. I guess i can only post the blog title + entry title + link to entry.

[8:35 pm]
This server&apos;s connection is slow. I&apos;m going to setup the cron to run every 30 minutes.

To subscribe to im notifications just add &quot;axna&quot; to your twitter account and turn on notifications for it.

Hope you guys liked this! I had lots of fun writing it :) Merry Christmas!

-- fernando

*Update 24/12/2007: Links are not being included because of the char limit. I need to implement tinyurl on the script before sending it to twitter -- FIXED
*Update 24/12/2007: Entries are posted wrong. New posts are posted first and should be the opossite. -- FIXED
   </content>
</entry>

<entry>
   <title>Broadcast message to FMS without flash</title>
   <link rel="alternate" type="text/html" href="http://blog.funciton.com/en/2007/12/broadcast_message_to_fms_witho.html" />
   <id>tag:blog.funciton.com,2007:/en//1.20</id>
   
   <published>2007-12-24T14:36:02Z</published>
   <updated>2008-02-23T14:24:09Z</updated>
   
   <summary>The other day a client contacted us in order to fill out an enhacement request. We developed for him several multiuser applications that he rents per day. Everything runs under FMS and he manages it via a web-based admin tool...</summary>
   <author>
      <name>funciton communications</name>
      <uri>http://www.funciton.com</uri>
   </author>
   
      <category term="Flash Media Server" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://blog.funciton.com/en/">
      The other day a client contacted us in order to fill out an enhacement request. 

We developed for him several multiuser applications that he rents per day. Everything runs under FMS and he manages it via a web-based admin tool we built too.

He had the need to broadcast a maintenance message to all connected vhost admins via a web-form. We can&apos;t use flash for this because the admin tool is cell-phone compatible for remote administration. Flash lite is not an option at this time.
      I asked around to see if someone had done something like this but nothing. I even considered moving from FMS to &quot;red5&quot;:http://osflash.org/red5 because of the ability to use red5&apos;s Java classes for this purpose. This client commented us several ideas to extend the admin tool so being able to integrate the real-time/multiuser server with a backend language is a must.

Charlie, a &quot;wowza&quot;:http://www.wowzamedia.com guy, sent an email to the &quot;flashmedialist&quot;:http://www.flashcomguru.com/flashmedialist/ saying that the wowza server had an http administration. Wowza server requires a license so it is not an option but this remind me of something. I remembered reading smth about http based administration with FMS. I did a quick search and found it!

&quot;Download the pdf&quot;:http://download.macromedia.com/pub/documentation/en/flashmediaserver/2/flashmediaserver_managing.zip - managing flash media server - and go directly to page 71 and start reading.

What we did is to create a generic server-side method that will receive the maintenance message and display it to all connected admins.

For example:

http://srvrnme:1111/admin/broadcastMsg?scope=App:daApp&amp;method=receiveBroadcast&amp;arg0=sample%20message

Cool huh? We execute this using curl inside a vhost list loop.

There are other possibilities so be sure to check out the pdf.

Hope this helps someone!

-- fernando
   </content>
</entry>

<entry>
   <title>My school and internet experience</title>
   <link rel="alternate" type="text/html" href="http://blog.funciton.com/en/2007/12/my_school_and_internet_experie.html" />
   <id>tag:blog.funciton.com,2007:/en//1.19</id>
   
   <published>2007-12-03T02:14:26Z</published>
   <updated>2008-02-23T14:24:40Z</updated>
   
   <summary>I&#8217;ve been thinking a lot lately about my school experience and it was awful. I always felt comfortable with studies until i started coding and doing internet related stuff. My school wasn&#8217;t comfortable with my thoughts. This is the first...</summary>
   <author>
      <name>funciton communications</name>
      <uri>http://www.funciton.com</uri>
   </author>
   
      <category term="General" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://blog.funciton.com/en/">
      I&apos;ve been thinking a lot lately about my school experience and it was awful. I always felt comfortable with studies until i started coding and doing internet related stuff. My school wasn&apos;t comfortable with my thoughts.

This is the first post of a series i&apos;m to be posting (i hope) in order to order my ideas and start sharing experiences. With this i would like to give my 2 cents to schools in this country.
      When i was around eight years old my brother was studying electronic engineering and he was learning pascal. I didn&apos;t like computers at all but i loved the idea to start writing smth that only me and a small group of ppl would understand, so i started seeing him code. When he was out i used to seat infront of the computer and started writing non-sense stuff. Pascal was smth difficult if you don&apos;t have any guidance so i quited.

I hated computers until i was 15 years old. I didn&apos;t even like to play with them. I knew about internet but i was more interested in sports and music by that time. I remember this computer class in where we started learning html. The good thing about this class was that we learned to code html in notepad and not in a fancy wysiwyg editor. haha a class mate was always way more advanced that the other students, at the end we found out that he was using frontpage without others noticing it. LOSER! ;)

The possibility to right click other webpage and view the source code was smth i found really interesting. I started coding with a buddy which now works with me (he&apos;s one of the best coders i have met) and started doing a school community. We called that community elcolegioesunamierda.com (schoolisshit.com). We needed to open several geocities accounts because of the amount of stuff we had. The site at first had a very low amount of visits (around 100 visits - not unique -) per day. I&apos;m pretty sure that all those were done by both of us LOL We started changing the focus of the website and one day we started having 1 million visits, then 3 million visits per day! (adsense didn&apos;t exist at that time :S ).

My school teachers knew about the site because it appeared on several local newspapers. They did a little research and found that we both of their students were responsible for it. Other schools started to talk about us so my school expel us. We argued that all the work was done at home on our free time but they didn&apos;t care. That was our last day at school. That day a lycos representative visited us in order to promote their free hosting service. They offered more space than geocities but they displayed a banner over your content. My buddy and myself asked if it was ok to remove it. The representative said that it was impossible to do it so we started working and in half an hour we sent him a javascript piece of code that was able to remove it completely. He was surprised and congratulate our computer teachers. The school director called us and we didn&apos;t get expeld LOL

Our relationship with the computer teachers started and we were in charge of preparing the classes for them to teach. They were really good ppl and teachers but they really lacked experience and knowledge.

I started learning javascript and php and later i started coding Actionscript for flash 4. My friend started coding asp and learning some sql.

One of my school teachers started learning macromedia software with me on a supposed authorized training center (which we found out they weren&apos;t later). It was a great experience but i remember doing my teacher&apos;s homework hehehe

To make the story short (what a huge post!) I started doing some conferences locally and in other countries. When i was at my last year at school i started working, and i worked so much that my school didn&apos;t like it. They made me repeat my last year without much explanation. I had a contract to work on a great agency but they didn&apos;t care. Next year i sat down with one of those teachers and he told me privately that they made that decision because they felt i was to young to start working. what an idiots!

I didn&apos;t learn english at school because my teachers didn&apos;t care, i didn&apos;t learn math because teachers were centered in better students, i didn&apos;t learn computer stuff because my teachers sucked, etc.

I know some english, i know math, i know how a little bit of computers but because of my desire to learn though internet.

Teaching methodology in this country is wrong. And i want to focus my rage into a personal project that is supposed to change their minds and start giving a better importance to internet and technology.

School killed my creativity and made my progress difficult just because i was a different kind of student.

What are your thoughts/experience on this?

--fernando
   </content>
</entry>

</feed>
