Load .flv dinamically
Hi,
I stucked in a problem when i was trying to load Approptiate
.flv file dinamically when I click on HTML hyperlinks.
Actually I called a .flv file inside Flash Video using Action
Script and as a result i got the approprite flash file played using
Flash Player 8 but i wanna do the same thing using HTML tag i want
to call the indivudual file using Html hyperlinks at the same
position. i.e.
var my_video:Video;
var connection_nc:NetConnection = new NetConnection();
connection_nc.connect(null);
var stream_ns:NetStream = new NetStream(connection_nc);
my_video.attachVideo(stream_ns);
stream_ns.play("my_movie.flv");
Actually i called .flv file using the above mentioned script
but i wanna do the same using HTML hyperlinks ...........
Now my problem is if we will pass the variables then We have
to assign the value inside Html Page but how?
Similar Messages
-
In my SWF fie, I have an externally loaded FLV file.
I now want to add another FLV that will load and play
automatically when the first one is finished.
I actually want the SWF to jump to a new scene when the first
movie is done.
How can I do that/ what the actionscript?
StevenHey Steven,
I am not very sure but just giving a shot answering it...
You can use FLVPlayback.complete event to detect the
comepletion of first flv and set the path of other flv on complete.
Something like this:
import mx.video.*;
my_FLVPlybk.contentPath = "
http://www.helpexamples.com/flash/video/clouds.flv";
var listenerObject:Object = new Object();
// listen for complete event; play new FLV
listenerObject.complete = function(eventObject:Object):Void {
if (my_FLVPlybk.contentPath == "
http://www.helpexamples.com/flash/video/clouds.flv")
my_FLVPlybk.play("
http://www.helpexamples.com/flash/video/water.flv");
my_FLVPlybk.addEventListener("complete", listenerObject);
Hope that works... -
[AS2] Controlling loaded FLV sound??
While I haven't any hints in the documentation on how to
control a dynamically loaded FLV's sound(volume), everywhere I read
that you create a Sound object on the parent MovieClip. This isn't
working
var nc = new NetConnection();
nc.connect(null);
var ns = new NetStream(nc);
mc.vid.attachVideo(ns); // MovieClip on stage with Video
instance named "vid"
ns.play('TestVideo.flv'); // this all works, video loads and
plays full volume
function onMouseUp(){
var snd = new Sound(mc);
snd.setVolume(25);
What am I doing wrong?I seriously spent 2 hours trying to figure this out and got
no where. I posted this question literally a minute ago, and have
just figured it out:
mc.attachAudio(ns);
I should have posted this question two hours ago ;-) -
I'm using a remote hosting service for my FLV storage (
http://www.blip.tv). When I load
FLVs remotely into my player, they just seem to load infinitely
without play control. All except for 1. There is 1 video that
actually loads and plays just fine, which indicates to me it might
not be a problem with the host.
Below are testing-purpose links. (This is a php script which
passes the flv link to my player). The first one will work and load
correctly, the second link loads forever.
http://behindlacrosse.com/videos.php?video=http://blip.tv/file/get/Treschonde-BehindLacros seEp3249.flv
http://behindlacrosse.com/videos.php?video=http://blip.tv/file/get/Treschonde-BLSummer2006 2549.flv
I've tried this with several different flv's, and only that
first one above ever loads. I'm not doing anything complex with my
code, I use the following actionscript:
_root.playback.play(vidurl);
I've traced the vidurl variable to ensure that the urls are
correct. So I'm really stumped on this one.
One more interesting note.. in Firefox, on that website
linked above, if you click on any of the other videos in the list,
they won't load. It's like the player locked up. But in Internet
Explorer, you can still click other videos to bypass the currently
loading one.
Any help or suggestions at all? I appreciate anything.This is the way I work with videos.
Each video is in a differente frame.
Name you FLV playback like movie1, movie2, etc.
You may have a frontpage that links to each video or place a
button on the keyframe where you want specific video to play. For
example, on movie1, place a button. On movie2, place another
button.
The code below is used assuming you customized your video
controller.
// in a MovieClip named Video Controller insert a play, pause
and stop buttons and a slider//
stop();
import mx.video.*;
movi1.contentPath = "EditedFlash/Text_Edited.flv";
movi1.playButton = VideoControl.my_playButton;
movi1.pauseButton = VideoControl.my_pauseButton;
movi1.stopButton = VideoControl.my_stopButton;
movi1.seekBar=VideoControl.my_seekButton;
var cuePt:Object = new Object ();
cuePt.time =0.5;// title - no voice//
cuePt.name = "Pt1";
cuePt.type = "actionscript";
movi1.addASCuePoint(cuePt);
movi1.addASCuePoint(3.2, "Pt2");
var listenerObject:Object = new Object();
listenerObject.cuePoint = function(eventObject:Object): Void{
if(eventObject.info.name=="Pt1"){
_root.Texto.gotoAndStop("uno");
if(eventObject.info.name=="Pt2"){
_root.Texto.gotoAndStop("dos");
movi1.addEventListener("cuePoint", listenerObject);
//second cue point//
movi1.addEventListener("cuePoint", listenerObject);
listenerObject.complete = function(eventObject:Object):Void {
_root.Texto.gotoAndStop("uno");
movi1.addEventListener("complete", listenerObject);
Hope this helps. -
How to load a flv from 10 second to 20 second ?
BruceMCE wrote:
> I have 3 flv files that I would like to load onto the
stage via corresponding
> buttons. I put one of the flv files on the stage and
named the Instance
> "player" and assigned the following action script to a
button:
> on (release) {loadMovie(player.nonstoprockplayer.swf);
> }
The action is incorrect to start with, so is the entire
arrangement.
If you want to load SWF, you need to load it in level or
movie clip holder
not in FLV file. It's like trying to load something in a GIF
or JPG file
on flash's timeline. Just does not work like that. Level or
holder MC only.
Secondly, if you load FLV you don't load them in holder movie
clip but into
a FLVplayback components and not with loadMovie action.
Check for FLV Playback, under the Components section in your
help files.
You will find action samples on how to set it up.
Best Regards
Urami
!!!!!!! Merry Christmas !!!!!!!
Happy New Year
<urami>
If you want to mail me - DO NOT LAUGH AT MY ADDRESS
</urami> -
Load .flv dynamically or at runtime
Hi,
I stucked in a problem when i was trying to load Approptiate
.flv file dinamically when I click on HTML hyperlinks.
Actually I called a .flv file inside Flash Video using Action
Script and as a result i got the approprite flash file played using
Flash Player 8 but i wanna do the same thing using HTML tag i want
to call the indivudual file using Html hyperlinks at the same
position. i.e.
var my_video:Video;
var connection_nc:NetConnection = new NetConnection();
connection_nc.connect(null);
var stream_ns:NetStream = new NetStream(connection_nc);
my_video.attachVideo(stream_ns);
stream_ns.play("my_movie.flv");Actually i called .flv file using the above mentioned script
but i wanna do the same using HTML hyperlinks ...........
Now my problem is if we will pass the variables then We have
to assign the value inside Html Page but how? -
Error Message When Loading FLV
I'm getting this error message when I run this movie -
"Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095:
flash.net.NetStream was unable to invoke callback onMetaData.
error=ReferenceError: Error #1069: Property onMetaData not found on
flash.net.NetStream and there is no default value.at
Slide_GB_05_fla::MainTimeline/frame1()".
My code to load the five FLV's is -
var nc1:NetConnection = new NetConnection();
nc1.connect(null);
var ns1:NetStream = new NetStream(nc1);
theVideo1.attachNetStream(ns1);
ns1.play("Safety.flv");
var nc5:NetConnection = new NetConnection();
nc5.connect(null);
var ns5:NetStream = new NetStream(nc5);
theVideo5.attachNetStream(ns5);
ns5.play("Dutyfree_3.flv");
var nc3:NetConnection = new NetConnection();
nc3.connect(null);
var ns3:NetStream = new NetStream(nc3);
theVideo3.attachNetStream(ns3);
ns3.play("Hawaii.flv");
var nc4:NetConnection = new NetConnection();
nc4.connect(null);
var ns4:NetStream = new NetStream(nc4);
theVideo4.attachNetStream(ns4);
ns4.play("CatWoman_1.flv");
//ns4.seek(10);
//ns4.pause();
var nc2:NetConnection = new NetConnection();
nc2.connect(null);
var ns2:NetStream = new NetStream(nc2);
theVideo2.attachNetStream(ns2);
ns2.play("CITA_1.flv");
ta1.textField.background = true;
ta1.textField.backgroundColor = 0xC9C1B8;
//ta1.htmlText = "<b>Kinds of PAVES
entertainment:</b><ul><li>Audio
channels</li><li><b>Video
programs</b></li><li>Airshow</li></ul><br><b>Examples
of video
programs:</b><ul><li>Safety</li><li>Comfort
in
Flight</li><li>Destinations</li><li>Movies</li><li>Advertisements</li></ul>";
var lessonInfoXML:XML;
var lessonInfo:URLLoader = new URLLoader();
var smartGraphicFile:String;
lessonInfo.addEventListener(Event.COMPLETE,
onCompleteLessonInfo);
lessonInfo.load(new URLRequest("Slide_Information.xml"));
function onCompleteLessonInfo(evt:Event) {
lessonInfoXML = new XML(lessonInfo.data);
smartGraphicFile = lessonInfoXML.slide5.narration;
ta1.htmlText = smartGraphicFile;
The FLV's load, and I can dismiss the error messages. Any
idea what I'm doing wrong?BALTB seems to be a structure , can you explain how you r trying to loadd
The error may be the Record type B is invalid , the last field is record type , chk whether B exists or not -
Swf does not load flv on server
This has been asked before but it doesn't appear to
have been answered... On my local workstations the swf loads and
runs the flv fine. They are both in the same directory. When I
upload the pair to a server (windows 2003) the swf no longer loads
the flv file. I've tried multiple workstations and two servers with
the same result. No matter where I put the swf/flv pair and no
matter how I try to load the swf (direct URL, in an HTML page by
itself or in the web page) the result is the same....
When I imbed the video in the swf it runs fine, so, the swf
runs okay it is specifically the loading and running of the flv
file by the swf file on the server. I don't think it's a network
issue because I've tested my workstations across the network and it
works fine. It is specifically when the swf tries to load a flv on
a server. I don't get an error message, just a blank swf holder.
It's not the flash code because I've tried multiple playback
components and they all give me the same resutl. Again, it appears
to be specifically related to the swf loading the flv on the
server.
It appears to be something that has happened in the last few
months (maybe I missed an update/) because I know it worked when I
first uploaded the site. It appears to have stopped working in the
last six weeks. I don't check my site on a daily basis but I last
updated my site about the end of January and it was working then...
I'm using studio 8...
THANKS...quote:
Originally posted by:
jcasanova
Is the path
http://www.yoursite.yadayada/yadayada.flv
right?
Are you referring to the url in the object on the html page?
Is that supposed to be the swf?
<param name="movie" value="
http://www.yoursite.yadayada/yadayada.swf"
/>
tyroners,
If you have found a solution, please post it! I have been
working on this all day with no luck. Runs fine on localhost, but
on my WIN2003 server, it just shows the blank swf. I did read that
you also need to upload the skin swf file to the same directory if
you are using one.
I will post too when I fugure this one out
Thanks
G -
Video component failing to load FLV
Hi,
I literally copied the example in the Flex documentation
books below into my Flex mxml file and only changed the URL
location of the flv file, which in my case is a local file, and
when i run the application the video doesn't get loaded at all and
I don't get any debugging information.
Has someone run into this problem too?
Here is the code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute">
<mx:Script>
<![CDATA[
import flash.display.Sprite;
import flash.net.*;
import flash.media.Video;
var videoUrl:String = "
http://localhost//rope.flv";
public function VideoTest()
var connection:NetConnection = new NetConnection();
connection.connect(null);
var stream:NetStream = new NetStream(connection);
var myVideo:Video = new Video(360, 240);
myVideo.attachNetStream(stream);
stream.play(videoUrl);
addChild(myVideo);
]]>
</mx:Script>
</mx:Application>Hi,
I literally copied the example in the Flex documentation
books below into my Flex mxml file and only changed the URL
location of the flv file, which in my case is a local file, and
when i run the application the video doesn't get loaded at all and
I don't get any debugging information.
Has someone run into this problem too?
Here is the code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute">
<mx:Script>
<![CDATA[
import flash.display.Sprite;
import flash.net.*;
import flash.media.Video;
var videoUrl:String = "
http://localhost//rope.flv";
public function VideoTest()
var connection:NetConnection = new NetConnection();
connection.connect(null);
var stream:NetStream = new NetStream(connection);
var myVideo:Video = new Video(360, 240);
myVideo.attachNetStream(stream);
stream.play(videoUrl);
addChild(myVideo);
]]>
</mx:Script>
</mx:Application> -
Loading .FLVs dynamically into a single .SWF
Hey guys, so here's my issue. I've got a site that I'm
working on with a friend of mine who is a software developer. His
comfort is with .net and asp.net. The site we're doing has a media
section where the clients want to be able to upload videos in .flv
format and have these uploaded movies populate a dropdown list.
Instead of having them upload a .swf of an flv player and the
actual .flv movie, we would like to have a single .swf that loads
these .flvs dynamically. So, basically the problem there is that
the location of the .flv file is usually hardcoded, either through
actionscript or through the component parameters window inside
flash itself. So I figure the solution is to have the flv player
inside the swf call to a variable in the database, and when each
video is selected in the dropdown, it is set as that variable. Do
you guys have any tips on that code or any other solutions to my
problem?Yes, you must embed them rather than load them from a url at runtime:
http://www.adobe.com/devnet/flex/quickstart/embedding_assets/ -
More FMS & Flash CS3 not loading FLV
I consider myself an intelligent fellow, but getting Flash
CS3 to stream vis FMS is killing me. I've read the posts here where
people are describing similar situations. I've read several
websites that show kinda similar methods of getting this done, but
none are working! The docs on FMS & CS3 are like in an infinite
loop "see AS2.0/3.0 documentation on how to stream videos" &
when you get there "See FMS documentation on how to stream
videos"!!
I've read this & did it all, no dice:
http://www.mcalister.cc/ddd/flv/index.html
Read this which linked me to above, no dice:
http://livedocs.adobe.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveD ocs_Parts&file=00003495.html
Here is my config:
SERVER running FMS2, Windows Server 2003, IIS6, offsite, but
am able to RDP in.
File structure:
C:\Program Files\Macromedia\Flash Media Server
2\applications\ForRentFlash\streams\small\Cosmo_Small.flv
C:\Program Files\Macromedia\Flash Media Server
2\applications\ForRentFlash\main.asc (sole content being:
load(components.asc))
Where: ForRentFlash = appName
small = instanceName
Flash CS3 development locally & testing movie produces
WHITE SCREEN.
Component Inspector for FLVPlayBack AS3.0 dropped on stage:
Source Content Path:
rtmp://1.2.3.4/ForRentFlash/small/Cosmo_Small.flv (of course with
correct IP)
No matter how I go about this, I end up with: FAILED TO LOAD
rtmp://1.2.3.4/ForRentFlash/small/Cosmo_Small.flv.
Port 1935 was opened on the firewall of the remote
server.Try placing your flv files in a _definst_ directory.....
Here is how mine are set up:
C:\Program Files\Macromedia\Flash Media Server
2\applications\aniridia\streams\_definst_\V032v.flv
I don't use any .asc files, but I'm fairly certain that they
would be in the root of the " aniridia " directory (which is the
application), rather than in the " aniridia\streams\_definst_ "
directory.
My videos would not stream until I put them in the _definst_
directory.
I use an xml playlist with my flv player to call my videos.
My stream syntax looks like this:
rtmp://mydomain.com/aniridia
Don't reference the flv file name.
Good luck! -
Load .flv into empty symbol?
hi
is it possible to load an .flv file into a symbol? i know it
is possible with a .swf file. but it does not seem to work with an
flv. am i doing somethiing wrong or is it not supposed to work?
basically i am trying to make different movies load into a
single movie player (symbol) i can get it to work loading swfs i
made of the individual videos sitting inside their own fla files
but i am just wondering if it is possible to just load the flv
files without the extra complication of the extra fla per video.
i also know that the way i am doing it is the long way round
but i know absolutely nothing of action script and am doing it the
way i was taught in the total training videos that i bought.
cheers !
angusyou should be streaming your flv files. that's what they were
designed to work.
you can use the flvplayback component to do all the coding
for you. all you have to do is assign the flv's location/name and
the component will do the rest. -
Load FLV into FLVPlayback component?
I have an array of videos coming from an XML doc. I am getting the name of my video in the trace statement okay, but am not sure how to go about loading the FLV video into the player. I have an FLVPlayback component on the interface named "video". The video I'm going to load will be ("videos/" + videoArray[0])). What is the proper way in AS 3 to load this video?
var start:Number = 0;
var videoConnection:NetConnection = new NetConnection();
videoConnection.connect(null);
var aStream:NetStream = new NetStream(videoConnection);
aStream.play("myvideo.flv");
aStream.pause();
I hope this will help you -
hi, all
long time listener first time caller, i need some help with a
button, basically the button needs to load a flv through a video
instance not a flv player, I know it sounds a bit cheeky to be
asking someone to help but I have tried most avenues and Im still
stuck.
thankyouThe
NetStream
constructor example always worked for me as the basic starting
point. Be sure to follow the instruction to create the my_video
instance of the Video object. -
Cue points in dynamically loaded flv file through netstream
How can i add cue points to a playlist of flv files which are
loaded dynamically through an xml files. All the sources i have
found over the internet are using flvplayback control :(Lestyn, thanks for the verification. Took me a frantic 4 hours to arrive at the same conclusion. Do these people test their software???
Maddening.
Maybe you are looking for
-
Rejected items of RFQ should not appear in PO
Dear Friends, In a given RFQ i will select/ reject some items but while processing PO with Reference to RFQ system should display only selected RFQ items (RFQ items which have rejection indicator should not appear in PO). validation has been kept for
-
Non-static method getPerimeter() cannot be referenced from a static context
I am getting this error message. I assume it is because getArea( ) and getPerimeter( ) are nonstatic and main is static? Can somebody help me? Thanks in advance! Error messages: non-static method getArea() cannot be referenced from a static context
-
Insert data into Access with Auto-Increment column
Is there anyone out there that has come across this problem I am experiencing? I have a form I'm trying to submit to an Access DB that has an Auto-Incremented Table Column. I have followed Stefan Cameron's instructions to a "T" on his blog page here:
-
Hello, I was trying to update my iMAC to the newest 10.8.4 system by going through software update procedure. It took fifteen to download the update and then required a reboot to load. Once the reboot finished I get an message unable to update due to
-
Open Internet Shortcut with Dreamweaver
I have a user who needs to be able to open an internet shortcut in Dreamweaver. I set the associated program for HTML & HTM to Dreamweaver, but the shortcut still opens in IE. There is no enabled option to change the associated program for Internet S