Something new to learn…

October 7, 2009

I’ve been gettin’ into something new the last few days. See below:

//Toon de textvelden in het display
  this.addChild(Nowplaying);
  this.addChild(Mededeling);
 
//Laad de stream, inclusief foutafhandeling
  try {
	   snd.load(stream);
	   channel = snd.play();
      }
  catch (err:Error) {
       trace(err.message);
      }
  snd.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
  stage.addEventListener(MouseEvent.CLICK, evthandler); 
 
//Verander de text voor Nowplaying
  Nowplaying.text = "Now playing: ";
 
//Waar wordt er geklikt?
  function evthandler(evt:MouseEvent):void { 
 
     switch (evt.target.name) {         
 
	   case "instance1" : // CityFM Logo 
         var url = new URLRequest("http://www.cityfm.nl/" );
         navigateToURL(url,"_blank" ); 
         url = null;   
         break;          
 
	   case "instance2" : // Play-button  
	     channel.soundTransform = volAan;
	     break;
 
	   case "instance3" : // Pause-button
	     channel.soundTransform = volUit;
		 break;
 
       default :
   }
  }
 
  function errorHandler(errorEvent:IOErrorEvent):void {
	        Nowplaying.textColor = 0xFF0000;
            Nowplaying.text = "Problemen met het laden van de stream...";
        }

For the record, I started working with Actionscript (that’s what that is) three days ago. I’ve never before worked with Flash or Actionscript, ever. Can you guess what it is I’m trying to create?

Comments Off

A fresh start… without a past…

June 17, 2009
Tags: , , ,

If you have been here before, you’re probably wondering were all the posts have gone. Well, I deleted them, threw them out, send them to the big byte-bucket in the sky or whatever you prefer to call it. Anyway, this is my way to start clean and fresh. A new blog, a new theme and a promise: I’ll blog way more regularly then in the past.

Comments Off