Other Websites

  • SeaCloud9 Interactive
  • SeaCloud9 Commercial Development
  • i-os
  • stArcade9

Brendon Smith Social Networks

  • On Linkedin
  • Bookmarks
  • On Twitter
  • On Facebook
Open ↓ Close ↑
  • Home
  • Subscribe
Browse: Home / C#
i-create | therefore-i am
i-create | therefore i-am | a blog about opensource technology and rich internet applications

C#

Mono is Spreading

By Brendon Smith on December 19, 2009

What is mono?  Mono is the OpenSouce version of C# and the project by Novell / M$ is growing rapidly.  It is amazing to me to see the growth and speed of the Mono Project!  It is rapidly catching up to the current Silverlight version.  Check out Moonlight 2.0 if you haven’t yet and install [...]

Posted in .net, C#, Microsoft, Mono, Open Source, Silverlight | Tagged C#, Mono, RIA, Silverlight | Leave a response

Technologically Agnostic

By Brendon Smith on June 6, 2009

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 [...]

Posted in .net, ActionScript, Adobe, C#, i-create, Silverlight | Tagged ActionScript, art, C#, Flash Develop, Open Source, Silverlight | Leave a response

Fun with Yahoo! Pipes JSON – C# – ActionScript3

By Brendon Smith on May 25, 2009

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 [...]

Posted in .net, ActionScript, i-create, Silverlight | Tagged ActionScript, C#, JSON, Yahoo Pipes | 1 Response

Silverlight 2 RSS Reader

By Brendon Smith on October 26, 2008

Well here it is I have been playing around with Silverlight2 and it is astronomically better than Silverlight1!  This is an extermly simple feed reader with no design add more or less a proof of concept.  I have been trying to do things in ActionScript and the do them in C#/SilverLight.  I have leaned a [...]

Posted in i-create, Silverlight | Tagged ASP.NET, C#, Silverlight | Leave a response

ActionScript3 SharedObject / FlashVars

By Brendon Smith on March 14, 2008

Custom C# Control:

Note this is only part of the control. With a little more work you can easily make is so you can drop it on a page and simply name the FlashAudioVariable to point to the name of the flv.

Panel pnlAudioContainer = new Panel();
pnlAudioContainer.ID = string.Concat(this.ID, "_pnlAudioContainer");
pnlAudioContainer.Style.Add("float", "left");
pnlAudioContainer.Style.Add(HtmlTextWriterStyle.Width, "100%");
pnlAudioContainer.Style.Add(HtmlTextWriterStyle.Height, "2px");
Panel pnlAudio = new Panel();
pnlAudio.ID = string.Concat(this.ID, "_pnlAudio");
pnlAudio.Style.Add("display", "inline");
pnlAudio.Style.Add("float", "right");
pnlAudio.Style.Add("_margin-top", "-23px");
pnlAudio.Style.Add(HtmlTextWriterStyle.Width, "90px");
pnlAudio.Style.Add(HtmlTextWriterStyle.Height, "30px");

string Flashobjectstart = "<noscript><object classid=’clsid:d27cdb6e-ae6d-11cf-96b8-444553540000′ codebase=’http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0′width=’90′ height=’30′ align=’middle’><param name=’movie’ value=’yourlocatointo.swf’ /><param name=’quality’ value=’high’ /><param name=’bgcolor’ value=’#FFFFFF’ /><param name=’FlashVars’ value=’myVid=rtmp://video/audio/location/";
string Flashobjectmid = "’ /><embed src=’yourlocatointo.swf’ flashvars=’myVid=rtmp://video/audio/location/";
string Flashobjectend = "’ quality=’high’ bgcolor=’#FFFFFF’ width=’90′ height=’30′ align=’middle’ type=’application/x-shockwave-flash’pluginspage=’http://www.macromedia.com/go/getflashplayer’ /></object></noscript>";
string FlashJS1 = "<script language=’javascript’ type=’text/javascript’>FlashAudio(‘";
string FlashJS2 = "’);</script>";
string FlashAudio = string.Concat(Flashobjectstart, audioFileName, Flashobjectmid, audioFileName, Flashobjectend);
string FlashAudio2 = string.Concat(FlashJS1, audioFileName, FlashJS2);
pnlAudio.Controls.Add(new LiteralControl(FlashAudio));
pnlAudio.Controls.Add(new LiteralControl(FlashAudio2));
pnlCaptionMain.Controls.Add(pnlAudioContainer);
pnlCaptionMain.Controls.Add(pnlAudio);

Shared Object in ActionScript3 w/ FlashVars:
There are slight differences in the way the flash player 9 handles flashvars. This is a working example of how a custom flv player would use flash vars to call a video or audio file and play it! It also uses a shared object the benefit of this is its persistence (like a cookie on stereiods) if you had say several videos that you wanted to play on several different pages but you wanted the player to stop / rewind and if your user tells it to stop to remember the user told the flash player to stop here is how you would do that:

ActionScript3 SharedObject External Video / Audio in Flashvars:
import fl.video.*;
var flvControl = display;
var flashvars:Object = LoaderInfo(this.root.loaderInfo).parameters;
var flvSource = flashvars['myVid'];
flvControl.autoRewind = true;
var my_so:SharedObject = SharedObject.getLocal("userPref");
if (my_so.data.stopped == undefined) {
flvControl.play();
flvControl.autoPlay = true;
toggle_btn.gotoAndPlay(1);
} else {
flvControl.stop();
flvControl.autoPlay = false;
toggle_btn.gotoAndPlay(2);
}
function completeHandler(event:VideoEvent):void
{
flvControl.seek(0);
flvControl.play()
}
flvControl.addEventListener(VideoEvent.COMPLETE, completeHandler);
flvControl.source = flvSource;
function toggleHandler(event:MouseEvent):void
{
if( flvControl.playing ){
my_so.data.stopped = 1;
my_so.flush();
flvControl.stop();
toggle_btn.gotoAndPlay(1);
}else{
if(my_so.data.stopped == !undefined)
{
my_so.clear();
}
flvControl.play();
toggle_btn.gotoAndPlay(2)
}
}
toggle_btn.addEventListener(MouseEvent.CLICK, toggleHandler);

Posted in ActionScript, C# | Tagged ActionScript, C#, Flash | Leave a response

 
 

3d ActionScript Adobe Air Android Apollo Apple art as3 ASP.NET Blend C# CakePHP CSS Experiment Flash Flash Develop Flex Games Generative Design Google Informatics JavaScript Joshua Davis JSON Life Lingo Linux MashUp Open Source OpenSource PaperVision3D PC History Processing quick tip RIA Silverlight Technology/Internet travel twitter Web Web 3.0 Webware XML Yahoo Pipes

WP Cumulus Flash tag cloud by Roy Tanck and Luke Morton requires Flash Player 9 or better.

  • Monthly
  • Yearly
  • Links
  • February 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • agit8
  • Bit-101
  • D.I.Y.
  • draw.logic
  • Flight404
  • Flong
  • generatorX
  • haXe
  • Jonathan Snook
  • Joshua Davis
  • Jot
  • Kirupa
  • LifeHacker
  • Make
  • NurseOnTheRun
  • octane42
  • PV3D
  • Senocular
  • Sephiroth
  • ShineDraw
  • SWX
  • Tech News
  • Toxi
  • ZeusLabs

Brendon's Photos

P1010139.JPG

Recent Comments

  • morganae23 on Processing JS
  • morganae23 on Processing JS

RSS LifeStream

  • Physics Games in Silverlight on Windows Phone 7
  • Silverlight TV 17: Build a Twitter Client for Windows Phone 7 with Silverlight
  • Arrangement Tips and Tricks: Fills and Transitions | Audiotuts+