Has anyone actually been able to build a FLV player with Flex 2?

I have been playing around with a FLV player in Flex 2, but I
keep on running into one big problem: I never get a picture. Sound
is not a problem, and all code seems to do exactly what it should.
Except for the video showing up... I have tried loads of examples,
read all of the docs I could get my hands on, but it all ends the
same: no picture.
The best solution (imho) I found is listed below, but still
it does not do what it is supposed to do. Still, I only get audio.
If there's anyone who's got a player working with the Video
object using Flex 2 (SDK), I would *love* to hear your solution.
Michiel.
The source:
package Assets {
import flash.display.Sprite;
import flash.net.NetConnection;
import flash.net.NetStream;
import flash.media.Video;
import flash.text.TextFieldAutoSize;
import flash.text.TextField;
import flash.events.Event;
import flash.events.TimerEvent;
import flash.events.NetStatusEvent;
import flash.utils.Timer;
public class simpleFlv extends Sprite{
private var _video:Video;
private var _stream:NetStream;
private var _playbackTime:TextField;
private var _duration:uint;
private var _timer:Timer;
public function simpleFlv(){
_duration = 0;
_playbackTime = new TextField();
_playbackTime.autoSize = TextFieldAutoSize.LEFT;
_playbackTime.y = 20;
_playbackTime.x = 20;
_playbackTime.text = "Buffering …";
_timer = new Timer(1000);
_timer.addEventListener(TimerEvent.TIMER, onTimer);
_timer.start();
public function playMyFlv(flvUrl:String): void {
_video = new Video();
var connection:NetConnection = new NetConnection();
connection.connect(null);
_stream = new NetStream(connection);
_stream.play(flvUrl);
var Client:Object = new Object();
Client.onMetaData = onMetaData;
_stream.client = Client;
_video.attachNetStream(_stream);
_stream.addEventListener(NetStatusEvent.NET_STATUS,
onNetStatus);
addChild(_video);
addChild(_playbackTime);
private function onMetaData(data:Object): void {
_duration = data.duration;
private function onNetStatus(e:NetStatusEvent): void {
_video.width = _video.videoWidth;
_video.height = _video.videoHeight;
private function onTimer(t:TimerEvent): void {
if( _duration > 0 && _stream.time > 0 ){
_playbackTime.text = Math.round(_stream.time) + " / " +
Math.round(_duration);
}

Hi Chielosos,
In your code, after
import flash.utils.Timer;
You may need to add
NetConnection.defaultObjectEncoding =
flash.net.ObjectEncoding.AMF0;
SharedObject.defaultObjectEncoding =
flash.net.ObjectEncoding.AMF0;
Hope it works,
Jeffrey

Similar Messages

  • TS1424 has anyone not been able to get the installer to properly load and get a message like: This installer is intended for 32 bit versions of windows. Please download and install 64 bit iTuines installer instead? and even if you uninstall and reinstall

    Has anyone not been able to get the iTunes installer to load properly and get a message like this: This iTunes installer is intended for 32 bit versions of windows. Please download and install 64 bit iTunes installer instead. I have tried repeatedly to get this to load, I have uninstalled iTunes completely and reinstalled and still get the same message. I have windows XP and a brand new ipod touch which I am trying to load.

    Yes, it's come up a number of times. If you look to the right under "more like this", you'll find threads that may offer useful suggestions.
    Regards.

  • Old school, has anyone here been able to install and run Logic Pro 9.1   on a dual 1.8 G5 PPC? I know LP9 is not officialy supported on non Intel CPUs, But  9.0.0 and 9. 02 are ok on the G5 PPC as it is universal Binary, while I hear 9.1 wont work

    has anyone here been able to install and run Logic Pro 9.1   on a dual 1.8 G5 PPC? I know LP9 is not officialy supported on non Intel CPUs, But  9.0.0 and
    9. 02 are ok on the G5 PPC as it is universal Binary, while I hear 9.1 wont work.

    ok thanks, that's what I tought,looks like apple machines are only good for two - three years, the software developers are ahead of the hardware to a certain point, love macs but this is forcing us to buy new macs just to keep  up with development. There was a time it was the opposite.
    By the time we get up on new stuff it's time to change again. Gotta be rich to deal with macs ...LOL

  • My purchased download of Photoshop Elements did not work and I have been trying to reach a real person at Adobe.  Has anyone ever been able to do that.  If so can you tell me how to do that.

    My purchased download of Photoshop Elements did not work and I have been trying to reach a real person at Adobe.  Has anyone ever been able to do that.  If so can you tell me how to do that.

    Hi vision4success ,
    I would like to gather some information regarding your issue, So, please answer the questions below:
    What is the exact issue that you are facing?
    Do you get any error while installing Photoshop element?
    What is the Operating System that you are using?
    Since when you are facing this problem. Has it ever worked for you?
    What all steps did you try from your end?
    If you have any other details regarding the issue that might help us, please feel free to mention that as well.
    Waiting for you reply.
    Regards,
    Sarika

  • HT201413 Has anyone ever been able to contact the apple ipod software update server?

    I am coming up with a 'can not contact apple ipod software update server'
    Has anyone ever been able to contact the apple ipod software update server at all and if not is there a way to contact them directly?

    yes.  you may need to reset your network settings.  settings - general - reset - reset network settings.
    then reconnect to your wifi and try again

  • Has anyone ever been able to get a Windows VPN to work on Airport Express?

    I've got an Aiport Express hooked up as my primary router for my home network. My laptop is running Windows XP and I'm using SafeNet as the VPN client. When I use any PC based router and open port 500 I cang et the VPN to work no problem. As soon as I started using the Airpot, I can get the initial authentication to work, but all secured data packets keep getting dropped. I have a feeling it's because UDP port 500 isn't being passed through (though apple's documentation says VPN passthrough is supported), but I'm not sure.
    I've seen a number of people with the same problem, but I haven't seen anyone get it to work. Has anyone been able to do this using IPSEC based VPN?
    Thanks,
    Dave

    I'm an IT guy myself, with quite a bit of VPN experience under my belt, and I've thrown everything I know at the Airport with no success. I have a feeling the problem could be one of two things.
    1. The port forwarding feature is TCP only (ipsec needs 500 UDP)
    2. The VPN passthrough function is interfering with PC based VPN, and has only been tested with Apple VPN software.
    Has anyone tried contacting Apple support with this issue? Any official responses?

  • Has anyone ever been able to boot Clonezilla on a macbook?

    Is there any way at all to boot Clonezilla on a Macbook? Either a bootable Live USB stick or Live CD.
    Judging by the results of a google search, it would seem this is not possible.

    I'm an IT guy myself, with quite a bit of VPN experience under my belt, and I've thrown everything I know at the Airport with no success. I have a feeling the problem could be one of two things.
    1. The port forwarding feature is TCP only (ipsec needs 500 UDP)
    2. The VPN passthrough function is interfering with PC based VPN, and has only been tested with Apple VPN software.
    Has anyone tried contacting Apple support with this issue? Any official responses?

  • Has anyone ever been able to leave openbox for good?

    I just went on a little adventure over the past couple of days trying out different WMs and DEs.  I went from XFCE, to gnome, to XFCE, then compiz stand-alone and back again.  I found that in every environment I was trying to make it feel more like my openbox setup.  Finally I realized that I needed to come back to my comfort zone.  I must confess, the main thing I miss from using other DEs is compiz and its wobbly, snapping windows.  Not to mention expo, and the desktop wall.  However, I hate dealing with all the crap that comes with a DE, and compiz standalone is just not there yet.  I also dabbled in awesome because I like the idea of being able to tile my windows, but I don't work enough in terminals to go that far. 
    Has anyone else ever tried to leave openbox? If so, why? Did you leave for good?

    The OP's question implies that you would want to leave Openbox.
    Btw, for those who enjoy the merits of tiling WMs, just configure your openbox to behave like one. I have the following in my rc.xml file which lets me very quickly arrange windows in a tiled layout with no wasted space on my desktop using the MoveToEdge and GrowToEdge actions. Using these actions on windows without decorations lets you created any tiled layout that you want (I tried Awesome before Openbox but just couldn't stand the limited layout options). All it takes is a few drags and clicks.
    <mouse>
    <context name="Frame">
    <mousebind button="W-Left" action="Drag">
    <action name="Raise"/>
    <action name="Unshade"/>
    <action name="Move"/>
    </mousebind>
    <mousebind button="W-Right" action="Drag">
    <action name="Raise"/>
    <action name="Unshade"/>
    <action name="Resize"/>
    </mousebind>
    <mousebind button="S-W-Left" action="Drag">
    <action name="Raise"/>
    <action name="Unshade"/>
    <action name="Move"/>
    </mousebind>
    <mousebind button="S-W-Right" action="Drag">
    <action name="Raise"/>
    <action name="Unshade"/>
    <action name="Resize"/>
    </mousebind>
    <mousebind button="W-S-Middle" action="Click">
    <action name="ToggleDecorations"/>
    </mousebind>
    <mousebind button="W-Left" action="Click">
    <action name="GrowToEdgeWest"/>
    </mousebind>
    <mousebind button="W-Right" action="Click">
    <action name="GrowToEdgeEast"/>
    </mousebind>
    <mousebind button="W-Up" action="Click">
    <action name="GrowToEdgeNorth"/>
    </mousebind>
    <mousebind button="W-Down" action="Click">
    <action name="GrowToEdgeSouth"/>
    </mousebind>
    <mousebind button="W-S-Left" action="Click">
    <action name="MoveToEdgeWest"/>
    </mousebind>
    <mousebind button="W-S-Right" action="Click">
    <action name="MoveToEdgeEast"/>
    </mousebind>
    <mousebind button="W-S-Up" action="Click">
    <action name="MoveToEdgeNorth"/>
    </mousebind>
    <mousebind button="W-S-Down" action="Click">
    <action name="MoveToEdgeSouth"/>
    </mousebind>
    </context>
    You could of course skip the mouse and create some keyboard bindings to handle all of this too.

  • N8 Has anybody actually been able to voice- call a...

    See subject pse.
    Solved!
    Go to Solution.

    the vopium people seem to have sorted out their problems.  On trying this morning a free-of-charge skype call was possible via wlan with vopium on the N8 here in Germany.

  • Has anyone been able to upload an ibooks file with audio only files (m4a) in it? I keep getting the following error message during the upload in iTunes Producer: ERROR ITMS-9000: "Files of type audio/x-m4a are not allowed outside of widgets.

    Has anyone been able to upload an ibooks file with audio only files (m4a) in it? I keep getting the following error message during the upload in iTunes Producer: ERROR ITMS-9000: "Files of type audio/x-m4a are not allowed outside of widgets. then it names the file as an m4p file. Everything works beautifully on the iPad through Preview, and validates through iTunes Producer up until the attempted upload. If you've been able to accomplish this, please let me know how you prepared your audio files. Many thanks.

    Hello Fellow iBook Authors!
    Today I received the same error that you all have been discussing.  I tried selecting the DRM
    and this did not work for me, though I'm glad it did for some.  Here's what I did as a work-around. . .
    Since iBooks Author did not have a problem with Videos, I simply used one of my video programs, ScreenFlow to turn the audio into a video file m4v.  I added an image and extended the length or timing of the image to span the length of the audio file.  Then exported as an .mov.  I then opened QuickTime and opened the file and exported the file to iTunes. 
    You can use iMovie, Camtasia or any other progam that will allow you to export the audio as a movie file.  Does this make sense?  I hope this helps, at least in the short-term.
    Michael Williams

  • Has anyone been able to sync new i-phone with a 2004 Volvo XC 90? Old phone worked perfectly. This one does not pair even though new software update says it is now discoverable.

    Has anyone been able to sync new i-phone with a 2004 Volvo XC 90 with dealer installed bluetooth. New software download says it is now discoverable but pairing failed.

    Is "NILESH" the name of your computer or perhaps the name of your iPhone? What are you trying to achieve by connecting your iPhone to your PC via Bluetooth?
    Only certain Bluetooth profiles are supported by the iPhone, the list of supported profiles is listed here: http://support.apple.com/kb/HT3647
    If you are attempting to use another profile then an unsupported message is to be expected.

  • Has anyone actually got the Green Screen feature to work?

    Has anyone actually got the Green Screen feature to work? I've been trying for about 8 hours, absolutely no success. I have followed the iMovie Help instructions and the examples on the internet, over and over again. I've tried every imaginable variation on the instructions. Nothing from my green movie shows up. The green in my video is pure green - 100% green, 0% red and 0% blue. Yet the non-green images in the video aren't getting displayed at all. Several other people have mentioned a similar problem on these forums and they are all "unanswered". Is that because this is an unsolvable problem? Is it an iMovie bug? Sigh. I'm a big fan of Apple but stuff like this gives them a bad name.

    After several more hours of diagnosis I have identified some conditions which can make Green Screen slightly work (but not much). The condition is as follows. The green screen clip must be carefully dropped at the beginning of a video clip, such that at least the first two seconds of the green screen clip (no less, but no more or the clip will become attached to the previous clip and then it's broken again) are displayed over the PREVIOUS video clip. But the green screen will not work on the previous clip, only on the second clip. So you will always lose the first two seconds of the green screen video. It took me a lot of experimenting to discover this anomaly.
    Clearly this is a bug, but since not all users on the internet experience this bug, (some online videos shows that Green Screen actually works as advertised) it's most likely related to the video card driver. My video card is an ATI 4870. If you have such a card, there's probably no hope that you can get this feature to work unless Apple fixes the driver or possibly the iMovie application, or you use my tricky workaround.

  • EBuyNow - has anyone actually received anything fr...

    Hi everyone,
    In early October I purchased the Freetalk camera for a Sharp Aquos TV from ebuynow. At this point they were showing out of stock with an expected delivery date of October 13th. October 13th my EBuynow account said "At warehouse - Will ship shortly".
    On October 17th asking what was happening - at which point I was told the cameras will only be in stock on November 5th (so why did it say at warehouse?) and received $2 skype credit as a gift. I was a bit annoyed, but could cope with another 2 weeks wait.
    November 1st, I receive an email saying these devices will only be in stock on November 20th. On the 20th, I tried to logging into my account to see what was happening, only for their system to say it didn't recognise my account. Even trying to reset my password returned an "account not found" message.
    As a result, I emailed them asking what xxx xxxx was going on (I've been waiting a month for this camera and keep getting dicked around) only for them to reply stock is now arriving on December 5th. Went on their website to confirm and their website says stock arriving on December 6th - so I have a feeling I'm going to get screwed over on this again.
    Has anyone actually received anything from ebuynow? Or should I just ring my credit card company and get them to reverse the charges? For me it seems the only thing this "global logistics company" does well is take your money.

    Hello,
    We have asked eBuyNow to investigate your order status.
    Normally this supplier performs well and resolves customer queries promptly.
    TIME ZONE - US EASTERN. LOCATION - PHILADELPHIA, PA, USA.
    I recommend that you always run the latest Skype version: Windows & Mac
    If my advice helped to fix your issue please mark it as a solution to help others.
    Please note that I generally don't respond to unsolicited Private Messages. Thank you.

  • Has anyone actually received an answer to a question?

    I posted a question two weeks ago, about flash player just going to a black screen when maximized to full screen and NEVER received an reply.  Has anyone actually gotten an answer to any question by this method? 
    To ADOBE:  I'm sure this is a waste of time, since I doubt anyone from Adobe actually reads these things, but I need to vent.  This is the crappiest customer service I have ever experienced.  Instead of actually having someone at your company respond to e-mail questions you put the burden of solving YOUR PROBLEM to your other customers.  This is a disgusting habit and if there is another option out there other than flashplayer, I'm going to find it, use it and start recommending it to everyone I know.  Your company is crap.

    Problem I have is the swatch doesn't come along for the ride.
    Illustrator makes a gradient from color to clear that can go on top of a raster image and print fine on any output device we've ever owned. InDesign has the gradient feather option which is similar but requires for the two major output devices we have us to either create a TIFF or RIP the item through a prepress system (RAMPage Harlequin RIP, GMG Color Proof's Adobe PDF Print Engine) and send a flattened file. Either way it is Flattened Filesville if you are using InDesign, not if you are using Illustrator.
    If you paste just the swatch and not a group you get this:
    It's been a gripe of mine with InDesign for years (I know there is a feature request form) and the only solution I know of is to flatten files. I've had several workflow vendors promise a good solution and all of them boil down to sending the file through Product X and spitting out a normalized (flat as a pancake) file to the output device's RIP and turning all their color management tricks off on the output device. I know I can do this, but I don't want to have to RIP every single job that is a one off single – twenties quantity poster through a RIP the same way I do an offset job. It just makes me feel like the textbook Bob Levine adage of "your printer is stuck in 1995" kind of scenario. We aren't talking hokey cheapo output devices too. I'm talking first birthday over two hundred kilobuck output devices.

  • Has anyone else been having hard drive issues with 13" MacBook Pro barely a year old?

    Has anyone else been having hard drive issues with 13" MacBook Pro barely a year old?

    Yes, BUT...
    ... there are many problems that are really easy to eliminate by replacing the Hard drive, including ones that have nothing to do with actual Drive Hardware failure. These include corrupted install of Mac OS X, its EFI partition, clobbered partition tables, or the appearance of Bad Blocks in a critical area.
    Any of these problems can sometimes be eliminated by re-initializing the entire drive and writing Zeroes, and re-installing from scratch. The trouble is, this process takes hours to complete, and is not guaranteed to be successful -- you may still need a new drive after all that effort.
    I learned from my Plumber that consumers have no appetite for solutions that might work, and detest return visits for any related problems whatsoever. You or your friend may have had your drive replaced, not because it actually failed, but because the situation was troublesome, and the provider thought you would not tolerate anything less than a crisp, complete fix on the first attempt. And based on the cost of technician time, it may have even been cheaper that way.

Maybe you are looking for

  • Login to Oracle 8i Server from a remote location.

    Hi Experts, I wish to connect to Oracle 8i Server at Site 1 from Site 2. Situation Site 1     -     Oracle 8i on Win 2K. This is behind a firewall FW1. Is in Win NT Domain1. Site 2     -     Oracle 8i Client on Win 98. This is also behind (a separate

  • Front Row versus iTunes

    Upgraded my G5 dual 1.8 tower to Leopard. Couldn't wait to use Front Row on the 30" Apple Cinema Display. Heart-broken to discover that all my movies and tv shows from my iTunes library are practically unwatchable when played through Front Row. The v

  • Is it possible to convert music on my PC to a playable new ipad format without using itunes?

    I am considering buying the Seagate Goflex external drive to stram movies to the new ipad in order to save GB space.  Is it worth the $200.  also,I want to stram music from this device(if i buy it as well.  Can I convert the music toa format playable

  • Please Clarify the Errors (Case Structure)

    I am using numeric case structure but I don't understand the errors, can anyone clarify what they are mean and what I have to do to change it. Thank you in advance.

  • Enter a password to unlock the disk _backup

    i get this periodically, but I don't understand why.