October 1, 2008

Netflix API Available

Netflix has opened up an API to the public for developing applications!

"On behalf of the Netflix API team, I’m very excited to announce the release of the Netflix API and to launch this site for our developer community. We have been impressed with the applications developers have managed to build using our RSS feeds or by screen-scraping the web site, so we can’t wait to see what you’ll do with a supported API!

The Netflix API includes a JavaScript API, REST API and ATOM feeds. Use of the API is free and we even allow commercial use.

Web applications can use the JavaScript API to easily integrate basic Netflix service capabilities, such as allowing a subscriber to add a title to his queue without visiting the Netflix web site or start watching a title instantly."

Sign up for the API here

It will be very interesting to see all the Flash/Flex/AIR apps arriving soon :)

I hope more companies keep following suit like Google, Amazon, and now Netflix.

Cheers!

March 12, 2008

YouTube APIs and Tools

"Anything you can do on YouTube, you can now do from your own website..."

Some features noted:
  • Chromeless Player
  • Flash API
  • JavaScript API
  • GData API Access

Watch yourself!

February 25, 2008

Revisited :: Where is the Web Services Support in Flash CS3?

I posted earlier regarding this isse here.

Approximately 7-8 months ago, John Dowdell, was kind enough to at least respond regarding the issue .

The best part of his response was, "This documentation is in the final review stages and should be on the website towards mid-summer. My apologies for not knowing this context previously, but that's the scoop -- web services weren't easy-peasy out-of-the-box with CS3, but they should be so once again soon, once we generalize the component-creation process. Expect docs up on the website soon."

I could live with that, summer, no big deal however Summer '07 has come and gone and we are now moving towards Spring '08 without any mention from Adobe about an update to include Web Service support of some kind in Flash CS3.

Dissapointed to say the least.

We as flash developers are not without hope thanks entirely to the Adobe Flash/Flex community as a whole. There are now a few possible solutions to get Web Services to come through to the Flash CS3 authoring environment:

Wellconsidered has built a Flash CS3 Component that you can include in your library and access services much like the old As2 component, very easy to use however it has not been fully tested as stated by the author.

Sander Wichers has developed a method by which you can get compiled Flex libraries accessible from your flash library, very interesting workaround and worth the read.

RIA Forge has a post with access to a Subervsion Library which I have not tried out yet.

Carlo Alducente has developed a class as well.

My suggestion is to try all the methods above to see what works and what doesn't.

Again, thanks to all the developers who still recoginize the need for Web Services access in Flash as well as Flex.

It would be nice to hear from Adobe on the continued intention and or the abandonement on this issue.

Cheers,

Des

June 27, 2007

Where is the Web Services Support in Flash CS3?

I have been looking for an answer to this question, just as many others in the flash community, that rely on web services for a majority of their projects.

I was so excited by the new CS3 Upgrade (still am) - but this is the one thing that keeps me from making the full switch from Flash 8 since 90% of my projects connect to web services.

Love the E4X, love the new components, love the AS3, but not loving the missing web services API.

Is Adobe going to release an upgrade to address this? Is someone writing some classes to handle this? Are we left to other devices such as Midnight Coder's WebORB or Flex to handle this?

Below are some links from the Adobe Forums, so I know it's not just me that needs this back in Flash CS3!

http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=15&catid=194&threadid=1272741&enterthread=y

http://store1.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=15&catid=294&threadid=1264107&enterthread=y

Can anyone from the development community shed some light on this issue?

Thanks for reading...

September 16, 2005

Pulling random elements from an array

A handy bit of action script to pull random elements from an array, I recently used this function for a flash piece where I needed 3 random images from a pool of 9 images given from an XML file:

The ActionScript:

var tstArray:Array = new Array(1,2,3,4,5,6,7,8,9);
trace(tstArray)
for(var i:Number = 0; i<3; i++){
          var x:Number = Math.floor((Math.random()*tstArray.length));
          trace("X :: " + x);
          trace("ARRAY VALUE :: " + tstArray[x]);
          tstArray.splice(x,1);          
     }
delete tstArray;
trace("----------------------------------");

Hope someone finds use for this!

-DesDev    

September 9, 2005

LoadVars, C# and HTML

This may or may not be a commonly known issue with Flash/.Net developers.

It was brought to my attention from a friend of mine that he was having an issue when using LoadVars.SendAndLoad() to send a flash form with information and retrieve a status code. What was happening was the result was returning, but with all of the HTML appended to the value of the result.

Immediately, I asked him if the ASPX page was calling Response.End() after the result was written to the page. Sure enough it wasn't. After making the small change to the ASPX code, all was working perfectly.

Below is an example illustrating corrected implementation:

The Flash Code:

var lv:LoadVars = new LoadVars();
var res_lv:LoadVars = new LoadVars();
res_lv.onLoad = function(success:Boolean){
if(success){
          trace(this.nameSent);
     }
}

lv.strName="DesDev";
lv.sendAndLoad("http://localhost/loadVarsExample/vars.aspx",res_lv);


The ASPX (C#) Code:

<head>
<title>An HTML Page</title>
<script runat="server">
protected void Page_Load(Object Src, EventArgs E)
{
  if (!IsPostBack){

     string strName = Request.Form["strName"];
     
     Response.Write("nameSent=" + strName);
     Response.End();
  }
}
</script>
</head>
<body>
<p>This is a paragraph</p>
<p><strong>Bold Text </strong></p>
</body>
</html>


Test out the differences by commenting out Response.End() in the ASPX page.

-DesDev

September 7, 2005

Editable combo box based on a selected index

I'm currrently working on a simple application that includes a combo box list of choices. One of the options is "other" which would then allow the user to input their own.

At first I thought if the "other" option was selected, then have an additional text field added dynamically and allow the user to enter their custom choice there.

I retracted that idea in favor of having the user to be able to add their option on the fly in the dropdown.

Here is the code below in order to get this to function the way I needed it to:

Create a combo box on the stage and name it "my_cb".
my_cb.addItem({label:"Option 1"});
my_cb.addItem({label:"Option 2"});
my_cb.addItem({label:"Option 3"});
my_cb.addItem({label:"Option 4"});
my_cb.addItem({label:"Option 5"});
my_cb.addItem({label:"Option 6"});
my_cb.addItem({label:"Other (click here to type your own)"});

var aObj:Object = new Object();
aObj.close = function(evt:Object) {
var selIndex:Number = evt.target.selectedIndex;
selIndex == 6 ? evt.target.editable=true : evt.target.editable=false;
};

my_cb.addEventListener("close", aObj);
Now when I process my form options, I couldn't use the standard "my_cb.getSelectedItem" method to retrieve the value. So use of the (hidden) "getValue()" method does the trick.
my_cb.getValue();

Hope that helps anyone else looking to achieve this functionality as well!

-DesDev