November 18, 2007

Control Windows Media Player from an Adobe Flex application, part 2


With respect to my previous post, here's a link to a little demo. The figure above shows a screenshot. On the left side you see a list of channels, which is a very simple Flex application showing a DataGrid with single column. Out-of-the-box, the Datagrid allows you to change the sort order by clicking on the header. Clicking on a channel results in the playing of that channel in the WMP object displayed on the right side.



I will publish some source fragments later as well.

9 comments:

Kevin Breed said...

Nice experiment, I think connectivity is everything nowadays (at several levels), thus also the ability to connect different programming languages with eachother.

I know programmers are most often not that much concerned about the content they use in there apps, its just to show that this cool thing works! I use to share this habit, but through the courses of the premaster traject I am now attending I am getting more aware about the impact that technology and its content have on our society and culture. Technology is much more than the ability to create a cool thing that works, so I'm convinced that we, as developers, must be more aware about the implications that our cool apps bring along.

So what I actually wanted to say with this moral talk, is that you should consider to replace the 3FM streams with some of the 3voor12 and/or KinkFM streams. Just for the sake of good taste and a better living for humankind! ;-)

Unknown said...

Hi Kevin, Thank you for your wise words. Being able to connect and mix components that are made independently and by different people is gold. I fully agree. But is there a uniform way of doing this. In a web page the embedded components allow some level of interaction through javascript, but there's no notion of formal interfaces that can be discovered through a local, clientside component broker or something like that.

Kevin Breed said...

As far as I know there doesn't exists something that even comes near 'formal interfaces' or a 'clientside component broker'. For now I'm already happy with the emergence of open API's and web services that allow connectivity on the 'data level'.

I guess we will, most of the time, have to do with the components that are availlable in the chosen language, or environment. Is this is an opensource environment (like Flex) there's usually a whole spectrum of components which can be used.

Josh Santangelo said...

Would love to see your Flex source on this. I'm working on something similar.

Unknown said...

The source code for the is on its way...

You will see that nowhere in the flex code, calls are made to the WMP. The Flex-Ajax Bridge makes a flex app accessible through javascript. It even allows you to hook an event handler that you wrote in javascript to events that are emitted by the flex app.

Anonymous said...

hi i am working similar to this can a view your flex source code...

Juan Freitas said...

Hello Mark,

I'm trying to develop something very similar to your application. I have a flex 3.0 appl. and I want to play (in WMP or any other player) some .WAV files that are in a remote server. I'm using Java to connect the remote server. Could you give me some hint's on how to do this??
I really need some help!, I'm kind of new to flex :s

Best regards,
Juan

Unknown said...

Juan,

I have been a bit busy. Do you still need help?

Juan Freitas said...

Yes,

I still need help :S