Anyone have Simple Code to Play an .Flv file on a Website?
Hi,
Can someone please tell me how to make a web page play a .flv file.
Simple, basic code would do.
I have an .flv file uploaded on my website.
How do I get the Flash Player to play the file when someone visits the page?
Again, all I'm looking for is simple code.
Thanks,
Joe
add an flvplayback component to your swf. give it an instance name (say flv). then use:
flv.contentPath="yourflv.flv"; // for as2
flv.source="yourflv.flv"; // for as3
Similar Messages
-
Does anyone have the code to use an image button as the reset button?
Does anyone have the code to use an image button as the reset button? I'm finally at the end of the form and got the submit button to work as an image button, but cannot do the same with the reset button. Any help is greatly appreciated!
I agree.
http://www.456bereastreet.com/archive/200909/almost_never_add_a_reset_button_to_a_form/
Nancy O. -
Standalone app (AIR?) for playing local FLV files
Can someone point me to a desktop app (Windows and Mac) that can play local FLV files?
Thanks!I don't know about an AIR application but you could make any Flash video player you want to create into a stand-alone simply by publishing it as a "Projector" file. So create your own custom player and include your own branding in the design.
Or does this need to have a "browse to file" capability? Have never added that to a vid player so I'm not sure how that would work out.
But here is a simple little .flv video editor that I sometimes use to check out video files:
http://download.cnet.com/Moyea-FLV-Editor-Lite/3000-2168_4-10912717.html
It's a video editor, not just a player... but it's free, and allows you to open and play .flv files.... maybe a temp solution ??
Best wishes,
Adninjastrato -
How to play a FLV file located in a second FMS?
How to play a FLV file located in a second FMS not directly accessible by the flash client?
- I am publishing an audio stream from the flash client to a FMS;
- This FMS then publishes the stream to a second FMS, which records the stream to a FLV;
How can I play in the client the FLV audio file that I recorded in the second FMS?
- The first FMS is accessible by the flash client, but the second FMS is only accessible by the first FMS.
thanks in advance
fabioAnswer in http://www.flashcomguru.com/forum/forum_posts.asp?TID=4276&PN=1&TPN=1
-
Play another flv file in between a flv file
Hi,
I am trying to find a way to play another flv file in between
a flv file. Say, I play flv A for 10 seconds then play flv B and
then resume back to flv A where it just stopped.
Is it possible to do this and roughly how to do it?
Thanks!
Rexhhhzzz wrote:
> I am new to flash. Can the Adobe Flash player play an
external flv file
> directly?
No it can't, you need SWF to load the file within.
Best Regards
Urami
Beauty is in the eye of the beer holder...
<urami>
If you want to mail me - DO NOT LAUGH AT MY ADDRESS
</urami> -
Simple code help with streaming 1 file
I set up the Flash Media Server 2.0 on Windows (test box)
under the host dl35.tamu.edu (behind a firewall so I don't mind
giving it out)
Under the applications directory I create a directory called
test
Under this directory I place a flash movie called motion.flv
In this same directory I copy the main.asc that comes with
the Flash 8 software
I load the "test" application and use _definst_ as the
instance name
In Flash Professional 8 I create a new fla called test.fla
I embed a movie and use the ClearOverAll.swf as the skin for
the movie.
Under the Paramaters Tab I edit the content path to point to
rtmp:"//dl35.tamu.edu/test/_definst_/motion.flv
I test produce the html code and indeed the server shows a
connection even though nothing is playing.
Here is probably where I am most confused but I might have
done something wrong with the above as well. I am not a Flash
programmer, I am a network guy. All I want to do is the bare
minimum in the simplest form of streaming. I could not find code
samples that worked including the tutorial on the Adobe site (seems
to be fairly common). Digging through other examples I "believe" I
found what I wanted but apparantly I did not implement it correctly
or it is not what I need after all and I would like someone to
verify. The below is the action script that I found that I placed
within the test.fla. Is this wrong to do?
nc = new NetConnection();
nc.connect("rtmp://dl35.tamu.edu/test/_definst_");
ns = new NetStream(nc);
my_video.attachVideo(ns);
ns.setBufferTime(0);
ns.play("test");
Is the above correct? Given the names I have told you, what
should be changed. Also does this even need to go here? Is it
supposed to be in an action script file all by itself? At any rate
when producing this to html there are several errors:
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 16:
Statement must appear within on/onClipEvent handler
nc = new NetConnection();
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 17:
Statement must appear within on/onClipEvent handler
nc.connect("rtmp://dl35.tamu.edu/test/_definst_");
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 19:
Statement must appear within on/onClipEvent handler
ns = new NetStream(nc);
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 20:
Statement must appear within on/onClipEvent handler
my_video.attachVideo(ns);
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 21:
Statement must appear within on/onClipEvent handler
ns.setBufferTime(0);
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 22:
Statement must appear within on/onClipEvent handler
ns.play("test");
Total ActionScript Errors: 6 Reported Errors: 6
Goal: All I want to do is stream 1 file.. just 1. I have no
way of knowing whether this server works before taking this simple
step. It would be nice is Adobe delivered out of the box streaming
samples like all of the other streaming servers we support do. But
I digress. Any help is will be appreciated beyond any means that I
can appropriately convey including a sample code package that works
that I can just change a few lines in so I can understand what is
happening.Imstamu, I'm relatively new to this myself, but I did notice
a few items in your message that I wanted to comment on. First, the
error messages you're coming up with may be the result of putting
the actionscript in the video object itself, rather than in the
timeline for the main SWF movie. What I think you may want to do is
put the actionscript in a layer called "Actions" in the main
timeline, select the keyframe for that layer in frame 1, and put
the actionscript in that keyframe. If you have put it in the video
object (or in some other object such as a button, etc.), you can
get errors of the type you are reporting (at least it has happened
to me). However, as noted below, you may not need that actionscript
at all.
Second, you may want to try placing a directory under the
"test" directory called "streams", putting another directory called
"_definst_" beneath the "streams" directory, and putting the FLV in
the _definst_ directory. This is where FMS is looking for the files
to stream, as I understand it. (It sounds from your description
like you have placed the FLV directly below "test".) Directly below
test *is* the right place for main.asc, as you have done.
IMPORTANT: In terms of the path you use in the contentPath variable
in the video player object, the path for the directory actually
holding the FLV should *still* be
rtmp://dl35.tamu.edu/test/_definst_/motion.flv, as you have done --
i.e., "streams" should not appear in the contentPath variable.
Don't ask me why, but this worked for me. The reason the server is
showing a connection is that you have put a "test" directory in the
right place, and thus have registered the application from the
point of view of FMS, but you have not put the FLV in the right
place, and so FMS can't find the FLV file in the path you've
specified.
Third, are you using the FLVPlayback component in the swf
file? (From the fact that you're using one of the canned Flash
skins, it sounds like that's the case.) If so, and if you're just
streaming one movie, you don't need to worry about the code to open
up a new net connection, new netstream, etc. -- all of that is
embedded in the FLVPlayback object. So all you need to do is put in
the RTMP path to the file --
rtmp://dl35.tamu.edu/test/_definst_/motion.flv -- in the
contentPath variable for the FLVPlayback object; you do not need
the code opening the NetConnection and NetStream objects.
I hope this is useful. As noted, I am fairly new to this
myself, but I have been able to stream files successfully using
FMS, FLV, and Flash. -
Use space bar to play an FLV file
I have an external FLV file on frame 25 of my flash movie. I
would like to make it so the user has to press the space bar for
that FLV to play. Right now it plays automatically when we get to
frame 25. How can I do this?
Thanks,
RichHow do I change to Actionscript 2.0? It won't let me enter
the code. If something is done in Actionscript 3 already, I am
guessing that I can't used 2.0. Then what should I do?
Thanks,
Rich -
Hello,
Here is another question regarding FLV files: I'm developing my AIR application using Dreamweaver. My app will need to play some local FLV files wich will be delivered together with the application (they are not online).
I'm using the built in feature of Dreamwever, wich creates a small SWF called "FLVPlayer_Progressive.swf" when you insert an FLV in the page. If I preview the page in Firefox, everything works fine and the video is played, but if I preview it in AIR, there is just a blank box where the video should be.
All the files are in the site's root folder and are included in the "AIR application settings" (FLVPlayer_Progressive.swf, Clear_Skin_2.swf, video.flv, index.html and application.xml).
I tryed importing the video in Flash (through progressive download) and then creating a small SWF wich would work only as a player but it didn't work either. The only way it worked was if I actually embedded the video in the SWF (so there is no external file), but then I have some audio synchronization problems and I loose quality...
So the problem seems to be that AIR doesn't allow the SWF file to access external files, even if they are in the same folder. Is this a bug or is there a workaroud?
Regards,
ManuelWell, I just spent a few hour trying to make this work, and still nothing... but I think I know now what the problem is.
As you said, after putting an absolute path in (I used "C:\video.flv" for testing) it worked fine! So what I did was create a code that would get the absolute path to the video located in the app-storage folder. I came up with the following:
var flvFile = air.File.applicationStorageDirectory.resolvePath("data/flv/video.flv");
var flvFilePath = flvFile.nativePath;
This code returns flvFilePath as "C:\Documents and Settings\Manuel\Application Data\Test.08196269638DC859464A7A09369FF97BAC18DD7A.1\Local Store\data\flv\video.flv".
I tried suplying this path to the player but it didn't work. So I inserted a new player in Dreamweaver using the path above and I got a message saying that the path can't have any spaces. This seems to be the cause of all my problems! I tried substituting the spaces with "%20" but it didn't work either.
Do you have any ideas? -
How do I play an .flv file ?
I got an email with a .flv attachment. I understand this is a flash file. What do I need to do to play this file?
Windows XP 32 bit
Your site check says I have flash version 10.1.53.64
I never explicitly installed flash, I understand it came bundled with my Chrome browser.
The little twirling thing played ok on your site so I think the software is ok, I just don't know how to invoke it to play the file in my email
EdYou have to install Flash Professional to get the"stand alone" Flash Player. It's a testing component for projects without having to open them in a browser/webpage.
As far as "invoking" an flv. You'd do it like any other media file. "Double click". If Windows then asks you to choose a program to open it with (assuming you downloaded VLC Player), choose VLC as the default for flv files and it will open, your flv will play.
I have about 1500 flv files downloaded from YouTube and hundreds of other news and tube sites. They play just like AVI or MPEG files in VLC. -
Playing a FLV-File in a projector.exe from a network shared folder failes
We want to load and play FLV-Files while our project files
(Projector.exe) and FLV-files are sitting on a network shared
folder with UNC-Path access (\\FILESERVER\sharename\). The problem
is, that the flv-files do not play. If the same application runs on
a local system it works fine. The System.security.sandboxType is
"localTrusted" because it runs in a projector.
We do not want to map the shared folder to a drive letter!
Thank you
Example:
downloadI apologize if u can not load the page, its a hosting company issue, their server goes up and down randomnly so please to retry 15mn later, it will be available. Thanks.
-
Playing a FLV file on the browser
Hello,
I've made and extensive research on the forum about this one but couldnt resolve it here, so i've came up with my own case.
I can only make a swf video to work on a DW page using the insert/media procedure. The flv file shows as a blank window not even the player is showing.
Here is a testing version of the page: http://www.bedeco.ma/TCL.php
The script folder (swfobject_modified.js and expressInstall.swf) as well as the flv file itself, the skin file and the flvplayer progressive file are all there in the root directory at exactely the same level as the testing page.
I've also checked that there is no space whatsoever in the files names...also the flv file is tested successfly using Adobe media player.
the swf file is working but loops endelessely so i want to add controls for the user ..and obviousely the flv format is the way to go.
Help please.I apologize if u can not load the page, its a hosting company issue, their server goes up and down randomnly so please to retry 15mn later, it will be available. Thanks.
-
Does anyone have simple instructions for disabling keyboard shortcuts? Thank you.
I'm really tired of popup boxes when I type 't', 'k' , 'p,' etc., not to mention emails getting sent before I complete writing them.
This happens when you are just typing normally, not holding down Ctrl, Alt, or other modifier keys?
I wonder whether this could be caused by one of your add-ons. Could you test in Firefox's Safe Mode? That's a standard diagnostic tool to deactivate extensions and some advanced features of Firefox. More info: [[Troubleshoot Firefox issues using Safe Mode]].
You can restart Firefox in Safe Mode using either:
* "3-bar" menu button > "?" button > Restart with Add-ons Disabled
* Help menu > Restart with Add-ons Disabled
Not all add-ons are disabled: Flash and other plugins still run
After Firefox shuts down, a small dialog should appear. Click "Start in Safe Mode" (''not'' Reset).
Any difference? -
Strobe Media Playback, basic code not working with FLV file?
I am trying to use the following code with Strobe Media Playback swf 1.5:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title> </title>
<script type="text/javascript" src="scripts/swfobject.js"></script>
<script type="text/javascript">
var flashvars = {};
flashvars.src = "song.flv";
flashvars.poster = "preview.jpg";
var params = {};
params.movie = "StrobeMediaPlayback.swf";
params.allowfullscreen = "false";
params.allowscriptaccess = "always";
var attributes = {};
// Embed the player SWF:
swfobject.embedSWF
( "StrobeMediaPlayback.swf" //swf file name
, "videoDiv" // targeted div
, "652", "366" // width, height
, "10.1.0" // Flash version
, "scripts/expressInstall.swf" //location of expressinstall script
, flashvars
, params
, attributes
</script></head>
<body>
<div id="videoDiv">
<video controls="controls" poster="preview.jpg" width="652" height="366">
<source src="song.flv" type="video/flv" />
<source src="song.ogg" type="video/ogg" />
</video>
</div>
</body>
</html>
However, the page is saying:
We are having problems with playback. We apologize for the inconvenience.
My links do not appear to be broken, I have checked them with Firebug / View Source. Has the javascript changed for Strobe 1.5?Okay, I think I have it *partly* figured out. If I use the link from the example it works:
http://players.edgesuite.net/videos/big_buck_bunny/bbb_448x252.mp4
Does the video have to be online for it to work? -
Playing various flv files in FLVPlayer from HTML
I have a .swf file (id=myVideo) that contains an FLVPlayer
instance (myFLVPlayer) embedded (object and embed) on my web page.
In a separate <DIV> I feature several thumbnails and
descriptions of videos that the visitor can play by clicking the
image.
Can I use javascript to call
myVideo.myFLVPlayer.contentPath="myselection.flv" as an onClick
action in the HTML?
I'm using Flash 8 and AS2.
Any suggestions, examples, or links would be
appreciated.Thanks for the input.
The approach of opening another window doesn't fit in with
the look and feel (design values and aesthetics) of the site. I
suppose I could make a separate .html for each video, keeping the
remainder of the page identical. But this would create a
maintenance nightmare as well as creating more interaction with the
server.
I also realize that I could just put the thumbnails and AS
directly into the .swf and make it work technically. But then as I
add new videos in the future I'd have to make changes to the .fla
and re-publish the .swf. At some point in time, the Stage would
have to be so large as to render that approach impractical. In
addition, it would reduce my flexibility to place thumbnail objects
in the browser window with respect to other HTML/CSS.
So, bottom line is that what I'm looking for is the right way
to go HTML->Javascript->Flash. I know that Javascript can
talk to the Flash instance. The question is, what is the best
approach to allow it to touch the FLVPlayer instance within my
.swf?
Admittedly, it's become more of an issue with me because I'm
using Flash 8 and AS2. Much of the documentation I've found applies
to later versions of both. Because of design changes as the
products evolved, most of that isn't useable for me. It does get
confusing.
Any help, examples, or links would be appreciated. -
Playing two FLV files simultaneously
Hi all --
Need a little help with my video player. Currently, I have
one video (with an alpha channel) playing in the foreground.
Embedded in that video are event cue points. When a specific cue
point is reached, I would like a second video to start playing in
the background. I've been unable to get this to work.
I know my cue points are being recognized because I am doing
a trace and they pop up. However, my video does not play.
I may be using the wrong method, but currently I am using a
second netConnection to play the video into a second video object.
This obviously doesn't work.
Please help!Thanks for your help everyone... here's the code. I'm trying
to get a video to start playing when cue point "3" is reached in
the first video...
Maybe you are looking for
-
I've seen much discussion on this topic or issue. I have a 175 page doucment that needs an active TOC, urls that link, buttons that "go back to TOC" on each page and "to next page - to previous page". You can only see the functions properly in Acroba
-
the title says it all. i have windows 8 DVD and i would like to have a clear instructions on how to install windows 8. I dont understand the need for USB
-
Scan to email on Color LaserJet Pro MFP M177fw
I am trying to download the Printable "Scan to Email" onto my Color LaserJet Pro MFP M177fw but It keeps throwing an error? When I bought the printer (yesterday) i was told that I could set it up to Scan in a document and have it automatically send
-
Creation of staging table - quickest way.
Hi, I need to create a staging table with roughly 370 fields. The sources' specs are not clear and some of the staging table's fields, too. So effectively, first of all I need to understand the staging fields and the source fields. The end user has b
-
I down loaded aurora but can't use browser except in private mode?
I click on aurora icon home page comes up not cursor in search bar. manually add cursor put in web page click on search nothing happens. change to private and it allows me to search where ever