SeaCloud9 Commercial Development

June 28th, 2009 by Brendon Smith

Well I am almost finished with my commercial website development site. You can go to it @ seacloud9.com / brendonsmith.com. I will be offering a variety of services. I still need to communicate with a lawyer and have a contract created but in short I plan on offering website development skills to a few select clients. I have split my portfolio into an interactive site and a commercial site. The interactive site will be used to display some of my experimental work silverlight / flash the commercial site is clear cut and dry. I have not completed my new interactive website but I have officially deprecated my old interactive website. I will also make it a habit to publish more code examples and I will do more C#/AS3 comparisons. I find it fun to work with both languages! You can go to the interactive sites by going to seacloud9.org. This site is not currently compatible with OSX/Linux Safari. I am working on enabling to work on Apple/Linux and will do that soon. I have also been playing around with Processing it is an amazingly effective programming language to create random artistic endeavors. Here are a few random sketches.

This browser does not have a Java Plug-in.
Get the latest Java Plug-in here.

?View Code PROCESSING
int x = 100;
int y = 600;
int r = 80;
int n = 10;
int rs = 1200;
 
void setup(){
  size(325, 200);
  noStroke();
  smooth();
  noLoop();
  randomSeed(rs);
}
 
void draw(){
  background(255);
  drawCircle(x,y,r,n);
 
}
color[] shadeTable;
void setShades(color c){
  shadeTable = new color[256];
  for ( int i = 0; i < 255; i++)
  shadeTable [i] = color((int)(104),(int)(179),(int)(246));
}
void drawCircle(float x, float y, float radius, int num){
  setShades(color(255,0,0));
  float value = 126 * num / random(6.0);
  for ( int i = 0; i < 255; i++){
  fill (shadeTable[i], value);
  }
  x = random(x);
  y = random(y);
  ellipse(x, y, radius*2, radius*2);
  if (num > 1){
    num = num -1;
    int branches = int(random(2,6));
    for (int i = 0; i < branches; i++){
    float a = random(0, TWO_PI);
    float newx = random(x + cos(a) * random(100.0) * num);
    float newy = y + sin(a) * random(6.0) * num;
    drawCircle(newx, newy, radius/2, num);
    }
  }
}

Code

Here is a fun action script sketch below:

?View Code ACTIONSCRIPT
package 
{
	import flash.display.GradientType;
	import flash.display.SpreadMethod;
	import flash.display.Sprite;
	import flash.display.Shape;
	import flash.events.Event;
	import flash.events.MouseEvent;
	import flash.geom.Matrix;
 
	/**
	 * ...
	 * @author brendon smith
	 */
	public class Main extends Sprite 
	{
		 public var xPos:Number = new Number();  
         public var yPos:Number = new Number();  
         public var rWidth:Number = new Number();  
         public var rHeight:Number = new Number();  
         public var color:uint = new uint();
		 public var ellipse:Shape;
		 public var matrix:Matrix;
		 public var rectArray:Array;
 
		public function Main():void 
		{
			stage.stageWidth = 325; 
			stage.stageHeight = 400;
			if (stage) init();
			else addEventListener(Event.ADDED_TO_STAGE, init);
 
		}
		 public function createEllipse():void
		{
			rectArray = new Array();
			for (var i:uint = 0; i<60; i++ )
			{
			 xPos = 300;
			 rWidth = 160;
			 yPos = 300;
			 rHeight = 100;
			 ellipse = new Shape();
			 addChild(ellipse);
			 rectArray.push(ellipse);
			 var fillType:String = GradientType.RADIAL;
             var colors:Array = [0x078cfb, 0x07fb07];
             var alphas:Array = [.28, .28 ];
             var ratios:Array = [0x00, 0xFF];
             var matr:Matrix = new Matrix();
             matr.createGradientBox(162, 200, 0, 0, 0);
			 var spreadMethod:String = SpreadMethod.PAD;//SpreadMethod.PAD, SpreadMethod.REFLECT
             ellipse.graphics.beginGradientFill(fillType, colors, alphas, ratios, matr, spreadMethod);
			 ellipse.graphics.drawCircle(150, 150, 50);
             ellipse.graphics.endFill();
			 ellipse.x = 162;
			 ellipse.y = 200;
			}
			stage.addEventListener(MouseEvent.MOUSE_MOVE,mouseStretchRotate);
		}
		 public function mouseStretchRotate(e:MouseEvent):void 
		{
			for (var i:uint = 0; i<rectArray.length; i++ )
			{
			 var radian:Number = Math.atan2(mouseX, mouseY);
			 var spin:Number = (radian * (i * mouseX));
			 //trace(angle);
			 rectArray[i].rotation = spin;
			 rectArray[i].rotation = (spin * -1) + 90;
			 rectArray[i].scaleX = 1 / (i / mouseX * 90);
			 rectArray[i].scaleY =  1 / (i / mouseY * 90);
			}
 
 
		}
		private function init(e:Event = null):void 
		{
			removeEventListener(Event.ADDED_TO_STAGE, init);
			createEllipse();
		}
 
	}
 
}

Code

I also recently picked up a book on haXe and I will be posting some haXe examples soon. My first impression of haXe is very positive I really like the idea of being able to target different platforms. I have also noticed a considerable amount of people squawking about HTML5 here are my thoughts HTML5 will be cool it will also be challenging to create websites that are crossbrowser compatible because as we know not every browser is created equally. I am all for being able too do more with Javascript and HTML5 I think it will be great. Some people have also been saying HTML5 will eliminate the RIA area of JavaFX/Silverlight/Flash although I highly doubt that. Here are some interesting links on HTML5/JavaScript:

Cool Chrome Experiments
V8-GL
HTML5

Here are a few cool on-line compiler / ide:
wonderFL
Code Run

myUniveRSS now on Facebook!

June 20th, 2009 by Brendon Smith

myUniveRSS is now on Facebook!

myUniveRSS is social RSS feed reader. It takes user feeds and renders them in three dimensional space. The user also has two slide controls. The horizontal scroll bar at the bottom of the screen allows the user to spin the world axis. The vertical slider allows you to move the view forward. This shifts the user view to see the floating RSS posts in three dimensional space the user can click on a globe. When the user clicks on the globe they will move or fly through the space to the object and the objects squares up with the view window. This allows the user to read the feed post. The feed post displays a brief description of the entire post if the user wishes to read the post in it’s entirety they can click on the title and this will open the web page of the post for the user in a new browser window or tab. Users are allowed to enter or add feeds to the feed reader. When the user adds a feed this populates the users drop down menu. They input a feed and then it populates the drop down menu. Now anytime that user views their feed reader they will be able to use the menu to view their feed in this space. This application was built using Flash and Papervision3d. This application is currently in it’s alpha phase. I will have some features to add.

I am also looking at ways I can improve the readability of the text.
Trigger a loader when the user selects an item from the dropdown menu.
I will be adding a mouse following user view this will make the window easier to navigate and more natural.
I will eventually allow users to customize their feed views.
This application also needs an about section that I will put together soon.
I will also be porting this application to Wordpress in the near future.

http://apps.facebook.com/myuniverss/
Demo of How to Use the Application

By completing this project is only the first of what will be many. I am also developing a 3D flash wall where users will be able to display their Photos on Facebook, Flickr, and Picasa(kinda like this). I am also currently working on an Online game as well. I have also been playing around with haXe came across this and I am looking forward to creating iPhone applications with it!

Links worth reading:

Game haXe
DrawLogic haXe now on the iPhone
dashcode
appcelerator

Sir Chassey!

June 20th, 2009 by Brendon Smith

Sir Chassey

Yes he is a new addition to the family. He gets along with all are pets and likes to lay around when he is not chasing Cosmo around and Cosmo looks after him to make sure he doesn’t get it in too many scuffles with the Kion(Or Kitty Lion). Chassey is a very laid back puppy that loves to cuddle all day long. We also hosted some couch surfers from Boston that are biking coast to coast on account they just graduated! Amelia and Roxana were a pleasure to host. I am looking forward too seeing their photographs of their odyssey travelog online.

Amelia and Roxana Bike the US

Technologically Agnostic

June 6th, 2009 by Brendon Smith

Technologically agnostic and liking it. When it comes to new technologies many come and go so it can be a challenge to see which ones really take root. People love to talk about open source technology and I myself love open technology because it encourages developers like myself to play with whatever I want and experiment with it and see what kind of results I get. People can be extremely opinionated on this subject in particular and it gets to be like discussing religion or politics. In short no one really wins there are great technology offerings on both sides! I believe if you treat these opinions as religion you will lose. What is important to me? Have fun become a better programmer by experimenting with all the different stacks that are offered. You always win if you don’t really care and can honestly recognize which particular stack is well suited for the job and back it up with undeniable facts. It is also important to notice your crowd. With that being said please take it from me any opportunity you have to learn something new is always a good opportunity! Never be afraid of failure. Lately I have been working on relatively simple generative code examples and I have been working on porting these examples to Silverlight, Flash, and Processing. Why no reason it’s just fun. To be 100% honest when I saw silverlight 1 I absolutely hated it. Now I am getting a little more comfortable with it and love the fact I can use C# to program in for silverlight. This is not to say I have lost my intense love and fascination with flash and ActionScript because I never have or will. It is just the quest to learn experiment and know both technologies with confidence. I have been reading Kostas Algorithms for Visual Design by Kostas TezidisTerzidis’s book Algorithms for Visual Design and I found I love the book and what I learn in the book doesn’t just apply to Processing but all programming languages in general and it helps me to know how to problem solve relatively complex questions quickly! I have a high regard for Terzidis’s book it is an exceptional book in many ways it also happens to have a whole chapter devoted to writing image processing algorithms. I might try to port one to show you processing/hydra/c# pixel shader/pixel bender example. Anyway here is quick and dirty example of how you can use processing /silverlight/flash for mouse tracking apply it to scale, and rotate a rectangle. You will also apply a gradient programatically with processing /c#/actionscript3. This is just meant to be a ridiculously simple example. If you play with the same principles that are laid out in this example you could use it to build a rudimentary on-line drawing application. (of course in silverlight you could just use ink canvas but what is the fun in that?)

This browser does not have a Java Plug-in.
Get the latest Java Plug-in here.



?View Code PROCESSING
color[] shadeTable;
void setShades(color c){
  float r,g,b;
  r = red(c);
  g = green(c);
  b = blue(c);
  r /= 255.;
  g /= 255.;
  b /= 255.;
  shadeTable = new color[256];
  for ( int i = 0; i &lt; 255; i++)
  shadeTable [i] = color((int)(r*i),(int)(g*i),(int)(b*i));
}
 
void setup(){
  noFill();
  size(500,500);
}
void draw(){
  setShades(color(255,0,0));
  background(255);
  for (float i=1; i&lt;20; i++){
    pushMatrix();
    translate(width/2,height/2);
    scale(1/(i/mouseY*90),1/(i/mouseY*90));
    rotate(radians(i*mouseX));
    for (int x=1; x&lt;155; x++){
    fill(shadeTable[x]);
    noStroke();
    rect(0,x,200,100);
 
    }
    popMatrix();
  }
}




C# XAML Silverlight 3 Example of simple mouse tracking.

?View Code CSHARP
using System;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Messaging;
using System.Globalization;
using System.Diagnostics;
 
namespace rectGen
{
    public partial class MainPage : UserControl
    {
        public Point mousePoint;
        public Point renderT = new Point(0.0 ,1.0);
        public Point vectorLength = new Point();
        public Rectangle[] blueRectangle = new Rectangle[20];
        public double angle;
 
        public MainPage()
        {
            InitializeComponent();
 
            renderRectangle();
            LayoutRoot.MouseMove += new MouseEventHandler(LayoutRoot_MouseMove);
 
        }
        public void renderRectangle()
        {
            for (int i = 0; i &lt; 19; i++)
            {
                blueRectangle[i] = new Rectangle();
                blueRectangle[i].Height = 200;
                blueRectangle[i].Width = 300;
                LinearGradientBrush blueGR = new LinearGradientBrush();
                blueGR.StartPoint = new Point(0, 0);
                blueGR.EndPoint = new Point(1, 1);
                GradientStop blueGS = new GradientStop();
                blueGS.Color = Colors.Blue;
                blueGS.Offset = 0.2;
                blueGR.GradientStops.Add(blueGS);
                GradientStop greenGS = new GradientStop();
                greenGS.Color = Colors.Green;
                greenGS.Offset = 0.75;
                blueGR.GradientStops.Add(greenGS);
                blueRectangle[i].Fill = blueGR;
                blueRectangle[i].Name = "blueRect" + i;
                blueRectangle[i].Opacity = 0.4;
                LayoutRoot.Children.Add(blueRectangle[i]);
            }
 
        }
        private void LayoutRoot_MouseMove(object sender, MouseEventArgs e)
        {
            for (int i = 0; i &lt; 19; i++)
            {
                Point mousePoint = e.GetPosition(null);
                RotateTransform rectR = new RotateTransform();
                ScaleTransform rectT = new ScaleTransform();
                rectT.ScaleX = mousePoint.X * .005;
                rectT.ScaleY = mousePoint.Y * .005;
                double radians = Math.Atan2(mousePoint.Y, mousePoint.X * i+1);
                angle = Convert.ToInt16(720 / Math.PI * radians);
                Debug.WriteLine(angle);
                rectR.Angle = angle;
                TransformGroup[] myTransformGroup = new TransformGroup[20];
                myTransformGroup[i] = new TransformGroup();
                myTransformGroup[i].Children.Add(rectT);
                myTransformGroup[i].Children.Add(rectR);
                blueRectangle[i].RenderTransform = myTransformGroup[i];
            }
        }
 
    }
}




ActionScript 3:

?View Code ACTIONSCRIPT
package 
{
	//import com.adobe.protocols.dict.events.ConnectedEvent;
	import flash.display.GradientType;
	import flash.display.SpreadMethod;
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.events.MouseEvent;
	import flash.geom.Matrix;
 
	/**
	 * ...
	 * @author brendon smith
	 */
	public class Main extends Sprite 
	{
		 public var xPos:Number = new Number();  
         public var yPos:Number = new Number();  
         public var rWidth:Number = new Number();  
         public var rHeight:Number = new Number();  
         public var color:uint = new uint();
		 public var rect:Sprite;
		 public var matrix:Matrix;
		 public var rectArray:Array;
 
		public function Main():void 
		{
			stage.stageWidth = 325; 
			stage.stageHeight = 400;
			if (stage) init();
			else addEventListener(Event.ADDED_TO_STAGE, init);
 
		}
		 public function createRectangles():void
		{
			rectArray = new Array();
			for (var i:uint = 0; i<60; i++ )
			{
			 xPos = 300;
			 rWidth = 160;
			 yPos = 300;
			 rHeight = 100;
			 rect = new Sprite();
			 addChild(rect);
			 rectArray.push(rect);
			 var fillType:String = GradientType.LINEAR;
             var colors:Array = [0x078cfb, 0x07fb07];
             var alphas:Array = [.05, .05 ];
             var ratios:Array = [0x00, 0xFF];
             var matr:Matrix = new Matrix();
             matr.createGradientBox(162, 200, 0, 0, 0);
			 var spreadMethod:String = SpreadMethod.PAD;//SpreadMethod.PAD, SpreadMethod.REFLECT
             rect.graphics.beginGradientFill(fillType, colors, alphas, ratios, matr, spreadMethod);
			 rect.graphics.drawRect(0, 0, rWidth, rHeight);
             rect.graphics.endFill();
			 rect.x = 162;
			 rect.y = 200;
			}
			stage.addEventListener(MouseEvent.MOUSE_MOVE,mouseStretchRotate);
		}
		 public function mouseStretchRotate(e:MouseEvent):void 
		{
			for (var i:uint = 0; i<rectArray.length; i++ )
			{
			 var radian:Number = Math.atan2(mouseX, mouseY + 1);
			 var angle:Number = i * (720 / Math.PI * radian);
			 rectArray[i].rotation = angle;
			 rectArray[i].scaleX = mouseX * .005;
			 rectArray[i].scaleY =  mouseY * .005;
			}
 
 
		}
		private function init(e:Event = null):void 
		{
			removeEventListener(Event.ADDED_TO_STAGE, init);
			createRectangles();
		}
 
	}
 
}



Processing Code

C# Code

ActionScript Code

Fun with Yahoo! Pipes JSON – C# – ActionScript3

May 25th, 2009 by Brendon Smith

What are yahoo pipes and why should I care? Yahoo! Pipes is a web application from Yahoo! that provides a graphical user interface for building data mashups that aggregate web feeds, web pages, and other services, creating Web-based apps from various sources, and publishing those apps. The site works by letting users “pipe” information from different sources and then set up rules for how that content should be modified (e.g. filtering). A typical example is New York Times through Flickr, a pipe which takes The New York Times RSS feed and adds a photo from Flickr based on the keywords of each item. The site is currently in beta. – Wikipedia

SeaCloud9 Pipes Yahoo pipes is an excellent tool for remixing the web into the way your would prefer the web to be. You can use pipes to sort out information what kind of information? Just about anything that is out there and free. So this naturally can come in handy. For example maybe I want to find a video I can make a pipe to search multiple websites like college humor, metacafe, or youtube all at once. You could also create a pipe to find all the homes that are being foreclosed in a given area the uses are only limited to your own imagination. This information comes to the end user in a variety of formats like RSS, ATOM, or JSON. Yahoo Pipes is only one example of many MashUp tools currently available on the web. You can also create mashups from scratch using libraries like cURL etc..

In this tutorial I will show you how to create an RSS/JSON reader in both C# and actionscript 3 with Silverlight and Flex skins. Silverlight and Flash/Flex are both RIA technologies and this is a field that will be extremely useful as far as the future of web applications are concerned. These technologies allow developer to make desktop applications, mobile applications, and web applications so you can imagine how useful it truly is to be versed with utilizing these technologies. My reason for doing this tutorial is simple to have fun. One of the neat things that yahoo pipes allows you to do with Yahoo Pipes is sort the information based on criteria that is displayed on the query string so I also have one example where the user can search for a video etc.. by typing a query into the textbox and hitting search pretty easy. Both of the examples will be re-factored but all can be used with minor tweaking of the code and like I said I just wanted to have fun so you can feel free to download the exampls and do whatever you want with them. These are simple examples just to display how to use JSON w/ Yahoo Pipes. The C# code has references (using statements) that are not required. I simply haven’t had time to remove them I wanted to use Silverlight3 play with the 3D capabilities and themeing. I also need to place in a little regexp to clean up the search string that is sent to Yahoo Pipes for example a space would be %20 but hey you know I don’t want to give away everything now do I. Also the flex example will wreck if you click on too many tabs to begin with this is a known issue I plan on creating classes out of both that create the text area element and have getter and setter.

simpleRSS/JSON in Silverlight3

?View Code CSHARP
using System;
using System.Text;
using System.Json;
using System.Collections;
using System.Collections.Generic;
using System.ServiceModel.Syndication;
using System.Collections.ObjectModel;
using System.Text.RegularExpressions;
using System.Linq;
using System.Xml;
using System.Xml.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Data.Services.Client;
using System.Threading;
using System.Windows.Browser;
using System.IO;
using System.Windows.Controls.Theming;
using System.Runtime.Serialization.Json;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace myFeedReader
{
    public partial class Page : UserControl
    {
        public string myURL;
        public string pipeOut = "";
        public string pipeTitle = "";
        public string returnString = "";
        public string pipeLinkedUP;
        public SearchLocator model = new SearchLocator();
        public IAsyncResult asyncResult;
        public string myJSONText = "";
        public string SearchVideo_URL = "";
        public string myJSONOUT;
        public DataContractJsonSerializer json = new DataContractJsonSerializer(typeof(JsonFeed));
        WebClient client = new WebClient();
        public Page()
        {
 
            InitializeComponent();
 
            XDocument feedXML;
            feedXML = XDocument.Load("Feeds.xml");
            var feeds = from feed in feedXML.Descendants("Feed") where feed.Attribute("status") == null || feed.Attribute("status").Value != "disabled" select new FeedDefinition { Name = feed.Element("Name").Value, Url = feed.Element("Url").Value };
            foreach (var feed in feeds)
            {
                feed.Name.ToString();
                feed.Url.ToString();
            }
            ddlFeeds.ItemsSource = feeds;
            myURL = "http://feeds.wired.com/wired/index?format=xml";
            BuildJson("http://pipes.yahooapis.com/pipes/pipe.run?Search=adobe&_id=aE4GjZv63BGt4u90l7okhQ&_render=json", "1");
            // Make HTTP request to get feed
            WebClient client = new WebClient();
            client.OpenReadCompleted += new OpenReadCompletedEventHandler(client_OpenReadCompleted);
            client.OpenReadAsync(new Uri(myURL));
        }
        public void ResponseHandler(IAsyncResult asyncResult)
        {
            HttpWebRequest request = (HttpWebRequest)asyncResult.AsyncState;
            HttpWebResponse response = (HttpWebResponse)request.EndGetResponse(asyncResult);
 
            if (response.StatusCode == HttpStatusCode.OK)
            {
                var jsonFeed = json.ReadObject(response.GetResponseStream()) as JsonFeed;
                PipeOutput mypipe = new PipeOutput();
                int HiNum = jsonFeed.value.items.Length - 2;
                for (int i = 0; i <= HiNum; i++)
                {
                    var item = jsonFeed.value.items[i];
                    if (item.description != null && item.title != null && item.link != null)
                    {
 
                        this.Dispatcher.BeginInvoke(delegate()
                        {
                            pipeOut = item.description.ToString();
                            pipeLinkedUP = item.link.ToString();
                            pipeTitle = item.title.ToString();
                            returnString = Regex.Replace(pipeOut as string, "<.*?>", "");
                            returnString = Regex.Replace(returnString, @"\n+\s+", "\n\n");
                            returnString = HttpUtility.HtmlDecode(returnString);
                            TextBlock myPipeText = new TextBlock();
                            HyperlinkButton myPipeLink1 = new HyperlinkButton();
                            myPipeText.Foreground = new SolidColorBrush(Colors.White);
                            myPipeLink1.Content = pipeTitle;
                            myPipeLink1.NavigateUri = new Uri(pipeLinkedUP);
                            myPipeLink1.VerticalAlignment = VerticalAlignment.Top;
                            myPipeLink1.HorizontalAlignment = HorizontalAlignment.Left;
                            myPipeLink1.TargetName = "_blank";
                            myPipeText.Width = 400;
                            myPipeText.VerticalAlignment = VerticalAlignment.Top;
                            myPipeText.HorizontalAlignment = HorizontalAlignment.Left;
                            myPipeText.MinHeight = 60;
                            myPipeText.MaxHeight = 1000;
                            myPipeText.Margin = new Thickness(0);
                            myPipeText.TextWrapping = TextWrapping.Wrap;
                            myPipeText.Text = returnString;
                            if (myJSONText == "1")
                            {
 
                                pipeContent.Children.Add(myPipeLink1);
                                pipeContent.Children.Add(myPipeText);
                                txtLoader1.Visibility = Visibility.Collapsed;
                                scl1.Visibility = Visibility.Visible;
                                pipeContent.Visibility = Visibility.Visible;
                                pipeContent.MaxHeight = 300;
 
                            }
                            if (myJSONText == "2")
                            {
                                pipeContent.Children.Add(myPipeLink1);
                                pipeContent.Children.Add(myPipeText);
                                txtLoader1.Visibility = Visibility.Collapsed;
                                scl1.Visibility = Visibility.Visible;
                                pipeContent.Visibility = Visibility.Visible;
                            }
                            if (myJSONText == "3")
                            {
                                pipeContent1.Children.Add(myPipeLink1);
                                pipeContent1.Children.Add(myPipeText);
                                txtLoader2.Visibility = Visibility.Collapsed;
                                scl2.Visibility = Visibility.Visible;
                                pipeContent1.Visibility = Visibility.Visible;
 
                            }
                            if (myJSONText == "4")
                            {
                                pipeContent2.Children.Add(myPipeLink1);
                                pipeContent2.Children.Add(myPipeText);
                                txtLoader3.Visibility = Visibility.Collapsed;
                                scl3.Visibility = Visibility.Visible;
                                pipeContent2.Visibility = Visibility.Visible;
                                cnvVideo.Visibility = Visibility.Visible;
                                txtLoader4.Visibility = Visibility.Collapsed;
 
                            }
                            if (myJSONText == "5")
                            {
                                txtLoader4.Visibility = Visibility.Collapsed;
                                cnvVideo.Visibility = Visibility.Visible;
                                pipeContent3.Children.Add(myPipeLink1);
                                pipeContent3.Children.Add(myPipeText);
                                pipeContent3.Visibility = Visibility.Visible;
                                videoContent.Visibility = Visibility.Visible;
                                txtLoader5.Visibility = Visibility.Collapsed;
                            }
 
                        });
 
                    }
                }
 
            }
            //This is a hack that will be taken out later.
            if (myJSONText == "3")
            {
                BuildJson("http://pipes.yahooapis.com/pipes/pipe.run?Search=Rich%20Internet%20Applications&_id=aE4GjZv63BGt4u90l7okhQ&_render=json", "4");
                Console.WriteLine("I was executed");
            }
            if (myJSONText == "2")
            {
                BuildJson("http://pipes.yahooapis.com/pipes/pipe.run?Search=Rich%20Internet%20Applications&_id=aE4GjZv63BGt4u90l7okhQ&_render=json", "3");
            }
            if (myJSONText == "1")
            {
                BuildJson("http://pipes.yahooapis.com/pipes/pipe.run?Search=SilverLight&_id=aE4GjZv63BGt4u90l7okhQ&_render=json", "2");
            }
        }
 
 
 
        public class PipeResponse
        {
            public string myJSONOUT;
        }
        public void BuildJson(string myJSON, string test)
        {
            myJSONText = test;
            try
            {
                HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(new Uri(myJSON));
                Console.Write(myJSON);
                asyncResult = request.BeginGetResponse(new AsyncCallback(ResponseHandler), request);
            }
            catch(Exception e)
            {
                Console.Write(e);
            }
 
 
        }
 
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            itemsList.Visibility = Visibility.Collapsed;
            itemContent.Visibility = Visibility.Collapsed;
            object myFeed = ddlFeeds.SelectedItem;
            FeedDefinition MyFeed = new FeedDefinition();
            MyFeed = myFeed as FeedDefinition;
            myURL = MyFeed.Url;
            // Make HTTP request to get feed
            WebClient client = new WebClient();
            client.OpenReadCompleted += new OpenReadCompletedEventHandler(client_OpenReadCompleted);
            client.OpenReadAsync(new Uri(myURL));
        }
 
        private void Button_ClickVideo(object sender, RoutedEventArgs e)
        {
            model.searchTerm = txtSearch.Text.ToString();
            SearchVideo_URL = "http://pipes.yahooapis.com/pipes/pipe.run?Search=" + model.searchTerm + "&_id=aE4GjZv63BGt4u90l7okhQ&_render=json";
            BuildJson(SearchVideo_URL, "5");
            txtLoader5.Visibility = Visibility.Visible;
        }
 
        void client_OpenReadCompleted(object sender, OpenReadCompletedEventArgs e)
        {
            if (e.Error == null)
            {
                // Load feed into SyndicationFeed
                XmlReader reader = XmlReader.Create(e.Result);
                SyndicationFeed feed = SyndicationFeed.Load(reader);
                // Set up databinding
                itemsList.DataContext = (feed as SyndicationFeed).Items;
                itemsList.Visibility = Visibility.Visible;
            }
 
        }
 
        private void itemsList_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            itemContent.Visibility = Visibility.Visible;
            // Set up databinding for detail view
            itemContent.DataContext = (sender as ListBox).SelectedItem as SyndicationItem;
        }
 
    }
 
    // Helper classes to clean up and shape received data for UI databinding
    public class HtmlSanitizer : IValueConverter
    {
 
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            // Remove HTML tags and empty newlines and spaces
            string returnString = Regex.Replace(value as string, "<.*?>", "");
            returnString = Regex.Replace(returnString, @"\n+\s+", "\n\n");
            // Decode HTML entities
            returnString = HttpUtility.HtmlDecode(returnString);
            return returnString;
        }
 
        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
 
    public class LinkFormatter : IValueConverter
    {
 
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            return ((Collection<SyndicationLink>)value).FirstOrDefault().Uri;
        }
 
        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
    public class JsonFeed
    {
        public PipeResponseValue value { get; set; }
 
    }
    public class PipeResponseValue
    {
        public Pipe[] items;
    }
    public class Pipe
    {
        public string title { get; set; }
        public string link { get; set; }
        public string description { get; set; }
    }
    public class PipeOutput
    {
        public string output { get; set; }
        public object image { get; set; }
        public Uri pipeLink { get; set; }
        public object pipetitle { get; set; }
    }
 
 
}

simpleRSS/JSON in Flex

?View Code ACTIONSCRIPT
import mx.containers.HBox;
import SearchLocator;
import mx.core.Application;
import mx.utils.ObjectUtil;
import mx.rpc.events.ResultEvent;
import com.adobe.utils.XMLUtil;
import com.adobe.serialization.json.JSON;
import com.adobe.xml.syndication.rss.Item20;
import com.adobe.xml.syndication.rss.RSS20;
import nl.demonsters.debugger.MonsterDebugger;
import flash.events.Event;
import flash.events.IOErrorEvent;
import flash.events.EventDispatcher;
import flash.events.SecurityErrorEvent;
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.net.navigateToURL;
import flash.net.URLRequestMethod;
Security.loadPolicyFile("http://life.brendonsmith.com/public/crossdomain.xml");
Security.loadPolicyFile("http://pipes.yahooapis.com/crossdomain.xml");
Security.loadPolicyFile("http://seacloud9.org/crossdomain.xml");
Security.allowInsecureDomain("*");
Security.allowDomain("*");
public var RSS_URL:String = new String("");
public var loader:URLLoader;	
public var loader1:URLLoader;
public var loader2:URLLoader;
public var window_id:String;
public var window_render:String;
public var outXML:XMLList;
public var rss:RSS20;
public var body:XMLList;
public var d:MonsterDebugger = new MonsterDebugger(this);	
public var check:int = 0;
public function init():void
{
	loaderMovContainer.visible = true;
	outputFieldContainer.visible = false;
	onXML('http://life.brendonsmith.com/feed', 'one');
 
 
}
public function onSearchVideo(p_event:MouseEvent=null):void
{
	RSS_URL = "http://pipes.yahooapis.com/pipes/pipe.run?Search=" + SearchLocator._instance.searchTerm + "&_id=aE4GjZv63BGt4u90l7okhQ&_render=json";
	trace(SearchLocator._instance.searchTerm + "Search Run");
	window_render = "four";
	loader1 = new URLLoader();
	window_id = window_render;
	var request:URLRequest = new URLRequest(RSS_URL);
	request.method = URLRequestMethod.GET;
	//load the feed data
	//listen for when the data loads	
	try
	{
	loader1.load(request);
	loader1.addEventListener(Event.COMPLETE, onDataJSON);
	//load the feed data
 
	}
	catch(e:Error)
	{
		trace("Error: " + e.message);
	}
	trace("Search Excuted");
}
public function onXML(RSS_URL:String, window_render:String):void
{
check = 1;
loader = new URLLoader();
window_id = window_render;
var request:URLRequest = new URLRequest(RSS_URL);
request.method = URLRequestMethod.GET;
 
//listen for when the data loads
	try
	{
	loader.addEventListener(Event.COMPLETE, onDataLoad);
	//load the feed data
	loader.load(request);
	}
	catch(e:Error)
	{
		trace("Error: " + e.message);
	}
}
 
public function onJSON(RSS_URL:String, window_render:String):void
{
 
loader1 = new URLLoader();
window_id = window_render;
var request:URLRequest = new URLRequest(RSS_URL);
request.method = URLRequestMethod.GET;
//load the feed data
//listen for when the data loads
	try
	{
	loader1.load(request);
	loader1.addEventListener(Event.COMPLETE, onDataJSON);
	//load the feed data
	}
	catch(e:Error)
	{
		trace("Error: " + e.message);
	}
 
}
 
//called once the data has loaded from the feed
public function onDataLoad(e:Event):void
{
//get the raw string data from the feed
var rawRSS:String = URLLoader(e.target).data;
//parse it as RSS
parseRSS(rawRSS);
}
public function onDataJSON(e:Event):void
{
	try
	{
	var rawJSON:Object = JSON.decode(loader1.data);
	parseJSON(rawJSON);
	//load the feed data
	}
	catch(e:Error)
	{
		trace("Error: " + e.message);
	}
//parse it as RSS
}
public function parseJSON(data1:Object):void
{
//parse the raw rss data
var Items:Object = data1;
var data:String;
//get all of the items within the feed
trace(Items.value.items);
var itemsJSON:Array = Items.value.items;
//loop through each item in the feed
var outXML:XMLList = new XMLList()
trace(itemsJSON);
for (var i:int = 0; i < itemsJSON.length; i++ )
{
		if (Items.value.items[i].title != null && Items.value.items[i].description != null && Items.value.items[i].link != null)
		{
		var itemTitle:String = Items.value.items[i].title.toString();
		var itemDescription:String = Items.value.items[i].description.toString();
		var itemLink:String = Items.value.items[i].link.toString();
		trace(itemLink); 
		trace(itemDescription);
		outXML += buildItemHTML(itemTitle, itemDescription, itemLink);
		}
}
	data = outXML.toXMLString();
	switch(String(window_id))
				{
					case 'one':
					outputField.htmlText  = data;
					break;
					case 'two':
					loaderMovContainer1.visible = false;
					model.visiblityOne = true;
					loaderMovContainer1.height = 0;
					loaderMovContainer1.width = 0;
					outputField1.htmlText  = data;
					break;
					case 'three':
					outputField2.htmlText  = data;
					break;
					case 'four':
					outputFieldVideoSearch.htmlText  = data;
					break;
				}
 
}
//parses RSS 2.0 feed and prints out the feed titles into
//the text area
public function parseRSS(data:String):void
{
//XMLSyndicationLibrary does not validate that the data contains valid
//XML, so you need to validate that the data is valid XML.
//We use the XMLUtil.isValidXML API from the corelib library.
//create RSS20 instance
var rss:RSS20 = new RSS20();
//parse the raw rss data
rss.parse(data);
//get all of the items within the feed
var items:Array = rss.items;
//loop through each item in the feed
var outXML:XMLList = new XMLList()
for each(var item:Item20 in items)
{
//print out the title of each item
		var itemTitle:String = item.title.toString();
		var itemDescription:String = item.description.toString();
		var itemLink:String = item.link.toString();
		trace(itemLink); 
		trace(itemDescription);
		outXML += buildItemHTML(itemTitle, itemDescription, itemLink);
}
	data = outXML.toXMLString();
	check = 0;
	switch(String(window_id))
				{
					case 'one':
					loaderMovContainer.visible = false;
					loaderMovContainer.height = 0;
					loaderMovContainer.width = 0;
					outputFieldContainer.visible = true;
					outputField.htmlText  = data;
					break;
					case 'two':
					outputField1.htmlText  = data;
					break;
					case 'three':
					loaderMovContainer2.visible = false;
					model.visiblityTwo = true;
					loaderMovContainer2.height = 0;
					loaderMovContainer.width = 0;
					outputField2.htmlText  = data;
					break;
				}
}
public function buildItemHTML(itemTitle:String, itemDescription:String, itemLink:String):XMLList
{
	if (itemTitle != null && itemDescription != null && itemLink != null)
	{
	default xml namespace = new Namespace();
	var body:XMLList = new XMLList();
	body += new XML("<b>" + itemTitle + "</b>");
	try
	{
	var p:XML = < description > { new XML("<p>" + itemDescription + "</p>") }</description>;
	}
	catch (e:Error)
	{
		trace("Error: " + e.message);
		p = < description > { new XML("<p>" + "Their has been an error" + "</p>") }</description>;
	}
	var link:XML = <a></a>;
	link.@href = itemLink;
	link.font.@color = "#990000"; 
	link.font = "More...";
	p.appendChild(link);
	body += p;
	trace(body);
	}
	return body;
}

Live Examples
Flex JSON / RSS example using Yahoo Pipes
Silverlight JSON / RSS example using Yahoo Pipes

Download
Flex Example
Silverlight3 Example

Infinite Canvas

May 1st, 2009 by Brendon Smith

Taco ride last week was awesome perfect weather for a twenty mile bike ride.  I had a blast but its not hard to when you have the perfect weather and good group of friends to go out with:)  I have also been trying to take more photographs.  I took a few panoramics out in California on Highway 1 and posted them to my Picasa Account I have also a huge back catalog of panoramic photographs I have taken and will soon go through.  I have also been playing around with Processing and Context Free Art and I find them fun to play with.  You can create some stunning work with them and they are proving to be fun tools. Context Free art is also based on C++ and it make me curious to play with the Alchemy toolkit and see if I can convert it to actionscript which would be awesome the only thing I am lacking these days is time.  I could make good use out of more time.  Seems to be my biggest block. I am looking forward to playing around with context free art more! You can create some cool imagery with it. It was also recently mentioned in Make Magazine.

Thoughts on Ruby on Rails.  Well it is cool and it is pretty ridiculously easy to build web applications in.  I have been working on a new project at work that is a complete re-write and I am very comfortable with C# so it makes it hard to want to dump that skill set and learn a new skill.  I still have to code in both so that is good and sometimes I make myself create a project in a few languages to keep myself sharp.  It has not been easy but I can proudly say I have taught myself a new and useful skill.  I have spent an insane amount of time in the debugger but I is useful when it comes to figuring out someone else code without asking.  I also feel I have hit good stride with OOP and to put it simply most of the time I can just program and I am feeling extremely confident in my skill set and at this point my only block is time itself.  My favorite tool I think right now to develop Rails in is Netbeans although I also dabble with Aptana and have books on both eclipse and netbeans.  Sometime I admit changing back in forth from environments can be difficult but I am getting better at adjusting to these changes!  I am also comfortable now on developing with just about any opensource tool and find myself using SVN for personal projects now! I like alot of things about rails specifically how easy it is consume web services rest is built into Rails so it is easy to create and consume web services this also comes in handy when building RIA’s it is cinch to pass your information to Silverlight or Flash or whatever.  ROR easily allows you to generate ATOM, RSS, and JSON in a matter of seconds so my thoughts are ROR rocks it is also easy to find resources and tools on the web need a quick code plugin?  Go and look at AgileWebDevelopment.com want to check out opensource applications etc, go check out the GIT Hub.  Rails is cool and easy for developers I am looking forward to creating more projects with Ruby on Rails!

Thoughts on the Flash Platform. We are at a crossroads and what you will see is the influx of web applications absolutely invading your home!  What I mean to say is imagine this you go to the local grocery and because of RFID tags you have at home they will know and suggest what you may be out of and what you might like to buy?  How will this happen you ask well actually it is quite simple because the store will have you history and you will have tagged items we will make your shopping simple.  We will base your wants and needs off of your base settings and if they match we will up sell you based on what we would believe you would want and need probably based off of a sweet algorithm.  So I don’t know if you noticed but flash or the Flash Platform is going to overcome home electronics, mobile, and gaming within the next two years!  It is what we all wanted and worked for; for so many years the operating system will become more in the background trivial it will be all about the delivery and speed of small applications embedded in all sorts of places you never expected them to be in it is not far off the horizon!  Adobe just sealed a deal to make the flash player avilable to every HDTV do you think that is significant? I do!

Not too mention flash is set to be a delivery platform for social network games not just on facebook but on the Wii.  Nintendo has made a deal with Adobe for wiiware to support the flash player and this is also great news.  I recently check coppercube out and it is proving to be an interesting application you can create flash player 9 applications or windows excuteables and it supports a wide array of 3d formats!  I appears to me that someone at CopperCube must be a master at alchemy because it seems to me that this product had to use alchemy in some fashion. In all honesty I could not be more excited with where flash is headed because it is an excellent plugin that should be used on more devices and AS 3.0 is a mature language with lots of great libraries of code that make it easy to develop for!

myUniveRSS goes too Facebook

March 28th, 2009 by Brendon Smith

I have been very busy for at work learning Ruby on Rails.  I have even managed to create a cool facebook application using Ruby on Rails and AS3/Papervision3D feed reader I also utilized facebooker rails plugin. It is currently not open to the public but will be soon.  I still have a few bugs to work out it is a little challenging when it comes to RSS/Crossdomain/XML/Flash/RubyOnRails all in one little facebook application.  I have also recently ordered a book Flex on Rails!  I do love the way rails handels REST and XML it is so easy to make applications that can spit out JSON and XML.  With the facebook it is not exactly easy to share ones personal information (what I mean to say is their are limitations to the api and is secure and built this way on purpose to protect users) but I can see now how something like Ruby on Rails + AS3 could be used to generate some very cool social web games.  I do think that the video game models of the past are limited and social networks will open new niches for social/video games that are revenue generated by advertising.  When you think about most facebook applications they are relatively simple although I see more useful applications coming to social networks and I see social networks creating a webOS or webtop.  I will be taking the same application and make it available for wordpress plugin as well.  It is fun and challenging making facebook applications.  I have also been busy working on my next portfolio which I  have been working on for a considerable time.  I am also releasing a commercial site aimed at getting myself some freelance contracts and jobs.  In short I want to code widgets that people want for blogs, iphone/android applications, facebook and Open Social.  I believe there will be a growing need for companies to place their content within other applications that people use not too mention the fact that these  applications are adopted by users much more quickly than traditional applications.  This is not to say that I will stop working on traditional applications.  I will work on interactive web sites and branding sites for clients these web applications will be intuitive for the users to update and be primarily based off of open source stacks.

myUniveRSS will be on facebook soon

In other news I gave a presentation to the Lincoln .Net user group on Ruby on Rails it went well and I didn’t stutter too much. Although I did call esb, fsb in a slip (ha ha)  In short we created a simple task list.  You can find the notes and simple example application here.

I have also been looking at the new version of Silverlight3 and it does look pretty sweet they have a few pixel shaders and perspective 3D built in now.  I am sure that silverlight3 will be an excellent skill to complement my C# skills.  I hope the Moonlight Project can catch up to where silverlight3 is currently.  I still don’t think silverlight3 will be as useful as Flex, I guess I just have a prejudice for the Flash Platform.  I really love flash.  I am also looking forward to Flash Catalyst a new product from adobe that will bridge Fireworks / Photoshop directly into Flex which will be great to say the least! I found a cool Netbeans plugin the Flexbean and I personally use Netbeans quite a bit on my Ubuntu box I find it extremely helpful when working with Ruby On Rails or whatever language for that matter.

Accelerated 3D Web via Khronos/Mozzilla 3D is coming to javascript which should be interesting no question about it javascript is very powerful just very frustrating to behave consistenly in multiple browsers.  This should prove to be interesting and with ie8 now I wonder if ie8 will support it?

Does flash matter on mobile devices?  Yes of course it does this is one feature the iPhone and Windows mobile Flash Lite is wonderful but we want the whole enchilada! Well it is coming to the Android Platform for sure! It will only be a matter of time before Silverlight follow suit.  If you didn’t know Microsoft released an iPhone app PhotoSynth for those of you who don’t know photosynth connects multiple pictures of places and displays them in a kind of pseudo panoramic images that are very cool and one can’t help but think silverlight might not be far behind.

Unity 3D for the iPhone why use it?

The numbers speak for themselves people are willing to shell out an arm and a leg for simple racing games Unity3D has been around for awhile and it is developing into a great engine for content on the Wii and iPhone.  This is not the first time I have mentioned this product either.

I have also purchased a book from O’Reilly Head First Design Patterns! The reason is simple not coming from an OOP  background it has been challenging to teach myself OOP and now that I understand OOP it would be ideal for me to become  familiar with design patterns not just MVC but multiple design patterns. I see this as helping myself out in future jobs.  I will be able to look at most corporate applications and just get it (little less time dedicated to the debugger).  This will help me see what their programmers are doing and know why they have programmed in the manner they have.  This book also sheds lots of light on MVC that is used in many frameworks like pureMVC, CakePHP, and of course Rails. is so nice now that spring is finally here!

We are looking forward to going on Taco Ride.  Well Lisa and I have decided to go back to Ireland this summer.  So it should be a fun trip with lots of photos to share with you all.


St. James Gate Dublin

really cool podcasts:

FlasherMag

Railscasts

Papervision3D 3D Picasa

January 19th, 2009 by Brendon Smith

I have been busy at work and in my spare time I have been working on redoing my portfolio.  It is my goal to have a new version up soon and I will most likely be removing the old.  Through this process I have increased my knowledge of flex and as3.  I have been displaying a few alphas on my blog these will eventually all be rolled into the main application.  So here is yet another alpha.  I have created a Papervision3D RSS parser for Picasa.  Please note on google code you can find a library for AS3 Picasa I choose not to use it because it did not suit my specific needs in this project.  I found an extremely useful library of code that easily allows me to parse out MediaRSS one important thing to point out is because I used picasa not only did I have to parse out the MediaRSS but I had to use flash file reference to check when the images are loaded.  Another tricky gotcha I found was the fact that Picasa will not allow you to embed pictures that are larger than 800 pixels wide in the flash player.  It took me awhile to discover this the odd thing about this in particular is in FireFox it will load your images and render them but in Chrome, IE, and Safari you will see nothing.  The previously mentioned MediaRSS parser will also come in handy when writing mashups that interact with youTube (also utilizes MediaRSS).  I love Picasa and that is why I have chosen to create a 3D version of my Photo Albums. When you click here to see the photo album please note that I have not yet implemented a loader yet.  You can scroll though the images by rolling your mouse wheel. Please be sure to keep in mind this is only an alpha.

Picasa 3D Alpah

This will eventually be incorporated into my new portfolio.  So as you can see I have been very busy. I am also excited to utilize FlashCS4 I love the fact that adobe  has released Pixel Bender.  This will make creating filters a snap and you will be able to use them in After Effects, Photoshop, and Flash.  Adobe has also been working on Flash Catalyst formerly Thermo.  I am also excited to see a new application in the flash family.  I believe this will enable designers to easily port their photoshop documents to Flex without having to write any code(which I am sure they will like).  It will also be nice for developers because it is built to directly integrate into the Flex workflow.   Another development worth mentioning is SWX has released an AS3 Version. So that completely rocks and it makes writing mashups for flash a snap:)  I will be making some of these items flash components and selling them.

PaperVision3D Picasa Album Reader Alpha
MediaRSS AS3 Code Library
Pixel Bender Tutorial

Alchemy Its No Myth

November 27th, 2008 by Brendon Smith

The future of web applications lies in the hands of rich internet application developers. The two main platforms of the future will be Adobe Flash/Flex/Air and Silverlight. This should be extremely apparent to most web developers now. Web applications have been evolving more and more to act like desktop applications. In web 2.0 we saw many applications that utilize AJAX. AJAX should be required for most if not all web applications today because people have come to expect interactions AJAX enables developers to create. The problem with AJAX lies in the fact that you have to create css, javascript, and xml and then have the browser execute it. This causes problems because different browsers execute the same code with a variety of results. The end result to the developer; well I think it was covered in Dante’s Inferno somewhere around the Ninth Circle of Hell. It isn’t a pleasant place to be making things work in multiple browsers sucks it’s very difficult it is doable but ads to your production costs. In comes our savior RIA’s why because they use plugins. Now you can actually develop an application and expect it to work in a specific manner every time you use it. Who would have thought? Adobe flash is by far the most developed RIA platform to date. Adobe has also made many strides to open source its code and share with the community. Today there are numerous tools that will allow you to build swf files.

Alchemy Its No Myth

Recently Adobe announced Alchemy they have been talking about it for years but it is now out on their labs site for download. So what is Alchemy it enables the developer to utilize any c/c++ code that is open source and automagically convert it into something more useful an SWC file that can be utilized in flash! So you can now execute the code in the Flash Player and this of course rocks. You have already seen people utilizing it and creating games with it like Doom in flash. I think is well worth looking at some of those old c/c++ projects over on sourceforge and experimenting with Alchemy.

Now to be fare they are not the only company to think of a solution like this. If you look at silverlight you will find that you can utilize the Dynamic Language Runtime(DLR) and this allows developers for the most part to pick and choose their favorite programming language and work with it like ruby, java, or php you get the idea. At first I must admit I really hated the idea of Silverlight but over the years and after studying the new release I am sold. I have been working on applications for a new version of my portfolio and I will be utilizing both Silverlight and Flash. One thing I might add about the dynamic language runtime is it is different from Alchemy. Why? The dynamic language runtime allows developers to utilize multiple languages in a project when it is done it is sent to the compiler and becomes bytecode. When you use alchemy you are using LLVM it actually converts the code into AVM2 bytecode. I would suggest reading Nicolas Cannasse’s blog it will give you a clearer perspective at what Alchemy actually is and what it means. I am anxious to see what Alchemy can do and as a result I have installed in on a virtual Ubuntu machine. One thing that is nice about the DLR is you can mix different languages into the same project you can also share the same variables across multiple languages while this may not be good for large projects and could generate unmanageable code I can see it coming in handy in a pinch. One thing I might add about silverlight is I believe that Microsoft is going to port lots of .Net to run in silverlight.

So what platform do you develop for? I say both. Everyone loves flash and flash will be on ARM devices soon. It already has Android and Windows Mobile devices. Adobe engineers will make it work! For now their seems to be no sign of Apple’s iPhone or iPodTouch devices utilizing flash which really sucks for the user but is evidently good for Steve Jobs. It seems apple is destined to make the same mistakes over and over again. What developers really want is to create something once and run it anywhere and everywhere. Silverlight will soon go mobile too and I would expect them to run into the same issues on apple devices which is a shame for the consumer I guess they will be able to sell more iTunes app this way though.

Thoughts on Alchemy it took sometime to install I had to change the default config file that Alchemy came with for Ubuntu it was looking for the syslinks for LLVM in the wrong spot in short just change the location in the config file than run it also make sure you have all your paths correct in .bashrc once you have these you should be good to go some of the information on the labs website is maybe a little difficult to interpret. I also found these links (Alchemy has arrived eventually! And Solution for nothing on Linux) and they helped solve my problems. If anyone want I can post my .bashrc and config just let me know.

In other news:
Processing is now out of Beta!
You can find books on Processing here.

Links of Interest:
Alchemy on Adobe Labs
Understanding Adobe Alchemy
Nicolas Cannasse Weblogs on Adobe Alchemy
DoomQuakeHow to edit Quake Code in Visual Studio
X2O Project
Ensemble
Flash Goes Mobile

PaperVision3D RSS Reader Alpha

November 15th, 2008 by Brendon Smith

Well I have been working on an RSS feed reader that is papervision3d based it is still nowhere near where I would like it to be. I have about a slew of other ideas on how to improve this project and I am just getting started that is why it is an alpha. I have a great deal of code refactoring to do so as a result I will not be sharing the code. I have thought about this project for sometime. I love papervision3d and I think out of all the as3 library’s out there for 3D code this is the weapon of choice for me. It has a so many features that it is impossible to list them all on this blog post. I have also been playing around with SWX and really looking forward to an as3 version of it. I am well aware of the flash.net Local connection library but with the latest version of the flash player and new security settings I have shied away from using it with as3 Papervision3d code. I have also been thinking about redoing this project using an earlier version of PV3D. The great white beta is awesome love it and I am not sure if my time is better spent working on an older version that may run as2 or working on improving Papervision3d itself. I have noticed it’s response to planes that are textured with dynamic text can be difficult for example if I amp up this feed reader to over 20 posts it crashes. I am looking forward to the opportunity of maybe finding some fixes for these problems myself. I discovered this issue while populating it with 40 blog posts to render at one time. The code runs an array that is populated with the xml using a for loop and push in as3 the reason why I did not combine the for loop xml and the actual creation of the posts is due to the bitmap error I am currently recieving in PV3D2. One way I could improve this code is to create an object that contains all the feed data and create a timer that slows down the actual execution of the code so that papervision3d has enough time to apply the textures to the planes. I would also like to add some special effects papervision3d allows you to wrap your displayobject3d’s with an effects layer that makes for some ridiculously cool effects. So please don’t take this as a finished product I have hear because it is not! I have also thought about creating a feed reader that has cubes with movie textures that are created to house all the text (as in all 40 posts). I could do this by dynamically creating the movies in an array of Movie Materials that are interactive this way I would not have to clog the PV3D side of the code. I may choose to go that route in the near future. It is fun to work on these projects and It helps keep my mind sharp. I throughly enjoy creating stuff and use these experiments both to help me on my new portfolio and my OOP skills in general. I find this stuff fun and exciting if you can believe that. I get a real kick out of doing something new! I will also be redoing this project in Silverlight using Kit3d. The reason for this is simple because I can. I don’t really believe in saying one technology is better than the other. I just really like to play with all technologies and want to learn something new. I guess I am technologically agnostic. I just want an end result one that can be viewed on any computer with the same result and that is usually difficult thanks to Microsoft technologies but they have been making strides to make silverlight play well on all computers and I like the ability to use C# as an option not to mention the DLR with Silverlight.


PaperVision3D RSS Reader Alpha Click Here – Please be patient no loader yet.

So what have I been up too? Well building a new computer for starts my AMD died and it was my Ubuntu box. Instead of going out there and purchasing a computer I have decided to put it together myself. I have 90% of the parts now. I should have it completed in the next 3 weeks. It will run Ubuntu/Vista on a dual boot 1.5 terabyte hard drive, Quad Core, 16gb RAM, in a shell that lights up and looks like HAL9000. I will also continue working on my flash experiments and polishing them I would like my new portfolio to resemble CompizFusion Ubuntu I will utilize as3 and silverlight2 to do this. I would like to create one version using Silverlight and the other in as3. I want them to be as similar as possible displaying both technologies and allowing the user to pick which version they would like to see. It is one of my more ambitious projects to date. Things at work are going well I love working on Salesgenie.com and I am fortunate to work with exceptionally bright and passionate people that I am constantly learning from! So my skills have been improving rapidly! I am also ready for winter to set in. I have a plethora of books to consume and numerous magazines piling up and begging my attention! This winter won’t all be technical jargon though I have to throw in some art and literature to be a full rounded person you know. Tomorrow at the Joslyn I am going to see Diego Rivera you know Frida’s husband and looking forward to it. On a side note I found this video on Youtube of Joshua Davis thought I was way cool really like his work!

I will also be working on improving my exceptionally simple generative art application. I have been thinking of numerous ways I can and will improve it in the near future. The feed reader in Papervision3d and the generative art application will eventually be apart of my new Portfolio once they are polished and as you can see they are both along ways from that. This stuff takes time and their never seems to be enough time in the day. Oh well I know the weather is getting cold and that gives me a good excuse to polish my work!

What I have been reading lately:

4X4 Life and Oblivion
Robert Penner
Mathographics Recommended by the Flash Blog

Cool Librarys of Code:
Flare
Birds Eye
PaperVision3D

Cool Posts:
Flash Mathographics
gSkinner Flash Audio Demo