Need Preloader For FLVplayback Component
Hi,I'm playing external .flv videos using the 'FLVplayback' component. My client's complaining that they stall and stutter a bit when they start to stream, and wants to know if I can create a preloader for them.Can anyone help or point me in the right direction to create preloaders for this component? Since the .flv is not on the timeline, I don't know where to begin. I found some info on this in the Flash Help files, but it's a little over my head.Thanks very much
Adobe > Flash General Discussion
Posted on: 02/13/2007 05:57:15 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
[f8] FLVPlayback Component
I had made a class to use the FLVPlayback Component.
The code for the class is given below
//------CODE----------
import mx.video.*;
class vidPlayback {
private var my_obj:Object;
public function vidPlayback() {
my_obj = this;
my_obj.my_FlvPlayer.contentPath = "PREDA12.flv";
trace(my_obj.my_FlvPlayer.version);
}
}
//--------CODE----------
my_FlvPlayer is the component's instance name.
Now if i am right, it should trace me the version of the player. Also Player must play the FLV as well.
I m not able to judge where i have gone wrong.
Plz help
Flvplayback Component: Not Getting It
hi,
My neck hurts, I'm so tired and I can't figure this out. I was using Media contoller component but it was freezing my flvs on my site. So, there is an update to the flvplayback component, which I am now using. The video plays on my computer, but not when I upload it. I'm just not getting it.
I put the flvplayback component on my stage, I put the path to my video in the contentpath area. When I export it, it works on my computer. When I upload it, it doesn't. Am I doing something wrong?
It's a separate flv file, I have both the swf and the flv in the same directory. Is there some other code I am missing? Am I supposed to have some sort of code on a frame somewhere? I've been searching and searching but can't find a simple answer although, I know there is one.
Please help. Please, please, please!
HELP With AS3 FLVPlayback Component
Hi,
I imported a video in flash from a URL link referencing a .flv file. I also used one of the available skins and adjusted the parameters accordingly. There is currently no actionscript in this flash file. I have Autoplay set to "false", however, when the player loads, I would like a png image to be displayed as opposed to the first frame of the video. When using the "preview" parameter. I selected a frame which I would want to use as the poster image (19.687). However, I get the following message: "This has no effect on what you see when you run the published SWF. If you want to load a poster image of the FLV at run time, use the Export button to export this image as a PNG file and write ActionScript to load it in at runtime."
I have been unsuccessful in finding any actionscript documentation regarding this process.
Also, I would like to add a time code counter (00:00 / 00:00) but have been unsuccessful writing the code.
One last thing, is there a way to re-load the "actions". I am unable to see the Actions toolbox in the top left hand corner of the Actions window. It will only produce a drop down menu allowing me to select Actionscript 2.0, 3.0 etc...
Would someone be able to help me with one if not all of these issues?
Thanks so much
FLVPlayBack Component
Having a few issues with this component, namely every thing works offline perfectly using a local contentPath, yet when I upload to my webserver when I try the movie my browser activity log states it cannot find the .flv file and the page is blank.
I have amended the contentPath parameter to both a relative path and a full URL to the flv location on my webserver, the URL is definitely correct. I can see the file in the directory the contentPath is directing to in my ftp client.
Is there something I am neglecting to do?
I'm totally stumped
FLVPlayback Component
Please advice on the following inquiry:
I use FLVPlayback component and I want to create a button which will rewind a frame back. Encoding the flv sets the keyframes. Is there a way to take all the keyframes (in order to set the logic for the button), or should I the last one I have gone trough? I need the keyframes because “seek()” sends to keyframe. The logig for the one-frame-forward button is:
var listenerObject:Object = new Object();
var lastTime:Number=0;
listenerObject.playheadUpdate = function(eventObject:Object):Void {
trace("playhead time is: " + eventObject.playheadTime);
lastTime=eventObject.playheadTime;
};
my_FLVPlybk.addEventListener("playheadUpdate", listenerObject);
my_FLVPlybk.seek(lastTime+(1/my_FLVPlybk.metadata.framerate));
FLVplayback Component
I'm trying to create a standalone projector that contains a .flv file, however, I can't seem to point to an embedded .flv file in my library as the content source. Is there a way to do this with the FLVplaybackl component and AS and if so, how? Right now I have a FLVplayback component placed on my stage and six custom UI playback UI components to control playback, etc., all connected with six simple lines of AS to hook the button functionality to the movie.
Edited: 03/27/2007 at 08:29:40 PM by s_mccoy
FLVPlayback Component CS3
I am making a video that will enlarge to full screen using the new Actionscript 3 Flash CS3. There is no bufferTime in the Component Inspector for the FLVPlayback Component. How do I increase the bufferTime for the component?
FLVPLayback Component
I am building a site with multiple videos (FLV) for the user to choose from. I really like the ease of using the FLVPlayback component. My issue is using several instances of the component. How can I use one instance of the component and change the "contentPath" with actionscript? The instances are NOT on the same frame, I move from frame to frame to load in new movie. If doing this is not an isue with over loading the player then I am fine with using several instances.
Thanks for the help!!!
RUss
FLVPlayback Component
Can I get around importing the whole flvplayback class when I use the flvplayback component?
It takes up like 35kb in the swf which is to much if I want to use it in a banner.
Or is there any light version or anything I can do?
FLVPlayback Component
Can I stop the FLVPlayback Component from playing an flv file by using a button of my own design and not the "pause" or " stop" buttons from the component library ?
FLVPlayback Component
I have found where this question has been asked, but never answered. I need to access the buffer.Full and buffer.Empty events while using the FLVPlayback component. Does anyone have an idea on how to do this? I have gotten as desperate as to go through the FLVPlayback source code and I am at a loss. Any help appreciated.
FF On FLVPlayback Component
Hi,
how can I get the current time of a FLVPlayback component to call a seek
for fast forward and rewind?
Or is there a better way instead of the seek function to do this?
TIA
FLVPlayback Component And FMS
Hi all,
I've been trying to get my FMS server to stream to a FLVPlayback component and have had no luck. I have seen numerous posts on this subject in this forum and others, but a lot of it seems related to the older FCS and Flash 8/Actionscript 2.0 so maybe I'm not doing something right for Flash CS3/AS3.0.
Here's what I've got, using the examples from http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/video/FLVPlayback.html#includeExamplesSummary.
I have a file named FLVPlaybackExample.fla, on the stage is a FLVPlayback component instance named "player". The Document class is set to "FLVPlaybackExample". There is a file named FLVPlayback.as in the same directory with the following code:
package
{
import fl.video.FLVPlayback;
import flash.display.Sprite;
public class FLVPlaybackExample extends Sprite {
// private var videoPath:String = "
HELP With FLVPlayback Component
Hi,
I imported a video in flash from a URL link referencing a .flv file. I also used one of the available skins and adjusted the parameters accordingly. There is currently no actionscript in this flash file. I have Autoplay set to "false", however, when the player loads, I would like a png image to be displayed as opposed to the first frame of the video. When using the "preview" parameter. I selected a frame which I would want to use as the poster image (19.687). However, I get the following message: "This has no effect on what you see when you run the published SWF. If you want to load a poster image of the FLV at run time, use the Export button to export this image as a PNG file and write ActionScript to load it in at runtime."
I have been unsuccessful in finding any actionscript documentation regarding this process.
Also, I would like to add a time code counter (00:00 / 00:00) but have been unsuccessful writing the code.
One last thing, is there a way to re-load the "actions". I am unable to see the Actions toolbox in the top left hand corner of the Actions window. It will only produce a drop down menu allowing me to select Actionscript 2.0, 3.0 etc...
Would someone be able to help me with one if not all of these issues?
Thanks so much :)
FLVPlayback Component
Hi,
This is my first time in AS 3, can some body tell me how to get the total and elapsed time and after getting it how do i display it in a text field.
Please help me it is very urgent. I am attaching my code with this mail.
Attach Code
var flvSou:String;
var dynText:String;
myflv.autoPlay = true;
onscreen_play_btn.visible = false;
onscreen_replay_btn.visible = false;
if (myflv.playing==true) {
onscreen_play_btn.visible = false;
onscreen_replay_btn.visible = false;
}
myflv.source = "test.flv";
//myflv.source = root.loaderInfo.parameters.flvSou;
//dynTxt.text = root.loaderInfo.parameters.dynText;
myflv.playPauseButton = playPause_btn;
myflv.stopButton = stop_btn;
myflv.muteButton = mute_btn;
myflv.volumeBar = volume_bar;
myflv.forwardButton = forward_btn;
myflv.backButton = back_btn;
myflv.seekBar = seek_bar;
myflv.bufferingBar = buffering_bar;
myflv.fullScreenButton = fullscreen_btn;
//========================= Actions for Button Controls =========================//
//========================= Actions for Play and Pause Button =========================//
playPause_btn.pause_mc.addEventListener(MouseEvent.CLICK, clickHandlerPause);
function clickHandlerPause(event:MouseEvent):void {
//trace("clickHandler detected an event of type: " + event.type);
//trace("the event occurred on: " + event.target.name);
trace("u clicked pause button");
onscreen_play_btn.visible = true;
//myflv.alpha = .5; // uncomment later
}
playPause_btn.play_mc.addEventListener(MouseEvent.CLICK, clickHandlerPlay);
function clickHandlerPlay(event:MouseEvent):void {
//trace("clickHandler detected an event of type: " + event.type);
//trace("the event occurred on: " + event.target.name);
trace("u clicked play button");
onscreen_play_btn.visible = false;
//myflv.alpha = 100; // uncomment later
if (onscreen_replay_btn.visible==true) {
onscreen_replay_btn.visible=false;
}
}
//========================= Actions for Play and Pause Button =========================//
//========================= Actions for FLVPlayback =========================//
myflv.addEventListener(MouseEvent.CLICK, clickHandlerPauseFlv);
function clickHandlerPauseFlv(event:MouseEvent):void {
//trace("clickHandler detected an event of type: " + event.type);
//trace("the event occurred on: " + event.target.name);
trace("u clicked video component button");
//trace(myflv.totalTime);
if (myflv.playing==true) {
myflv.pause();
onscreen_play_btn.visible = true;
//myflv.alpha = .5; // uncomment later
} else {
myflv.play();
onscreen_play_btn.visible = false;
onscreen_replay_btn.visible = false;
//myflv.alpha = 100; // uncomment later
}
}
//========================= Actions for FLVPlayback =========================//
//========================= Actions for Fullscreen Button =========================//
fullscreen_btn.addEventListener(MouseEvent.CLICK,onFullScreenButtonClick);
function onFullScreenButtonClick(event:MouseEvent):void {
stage.displayState = StageDisplayState.FULL_SCREEN;
//or set it to normal like: stage.displayState = StageDisplayState.NORMAL;
}
//========================= Actions for Fullscreen Button =========================//
//========================= Actions for onScreenPlay Button =========================//
onscreen_play_btn.addEventListener(MouseEvent.CLICK,onScreenPlayButtonClick);
function onScreenPlayButtonClick(event:MouseEvent):void {
trace("working");
if (myflv.playing==true) {
myflv.pause();
} else {
myflv.play();
//myflv.alpha = 100; // uncomment later
onscreen_play_btn.visible = false;
}
}
//========================= Actions for onScreenPlay Button =========================//
//========================= Actions for onScreenReplay Button =========================//
onscreen_replay_btn.addEventListener(MouseEvent.CLICK,onScreenReplayButtonClick);
function onScreenReplayButtonClick(event:MouseEvent):void {
trace("working");
myflv.play();
myflv.seek(0);
onscreen_replay_btn.visible = false;
if (onscreen_play_btn.visible==true) {
onscreen_play_btn.visible=false;
}
}
//========================= Actions for onScreenReplay Button =========================//
//========================= Actions for Stop Button =========================//
stop_btn.addEventListener(MouseEvent.CLICK, StopButtonClick);
function StopButtonClick(event:MouseEvent):void {
myflv.seek(0);
onscreen_replay_btn.visible = true;
}
//========================= Actions for Stop Button =========================//
//========================= Actions for Button Controls =========================//
function onMetadata(e: MetadataEvent):void {
meta.appendText( "FrameRate = " + myflv.metadata.framerate + "
" );
meta.appendText( "VideoDataRate = " + myflv.metadata.videodatarate + "
" );
meta.appendText( "Height = " + myflv.metadata.height + "
" );
meta.appendText( "Width = " + myflv.metadata.width + "
" );
meta.appendText( "Duration = " +myflv.metadata.duration + "
" );
trace(myflv.totalTime);
}
trace(myflv.duration);
trace(myflv.totalTime);
Help: FLVPlayback Component
Im using this component for my case study.
What it is intended for is to load movies
from the selected list from the MenuBar component.
The problem is, when I try to change
the contentPath dynamically for the second time,
it doesn't response. Instead, it displays a buffering animation.
(refer from the attachment)
Here's my sample code:
Code:
myFLVP.contentPath = "intro.flv";
mbListener.change = function(evt_obj:Object) {
var menuItem_obj:Object = evt_obj.menuItem;
var info;
switch (menuItem_obj.attributes.instanceName) {
case "P1-A" :
info = "Db/Movies/p1/DIMM to MoBo.flv";
break;
...
case "P4-F" :
info = "Db/Movies/p1/PSU to MoBo.flv";
break;
}
myFLVP.contentPath = info;
};
edit: Changed _global.cp to info
FLVPlayback Component
Please advice on the following inquiry:
I use FLVPlayback component and I want to create a button which will rewind a frame back. Encoding the flv sets the keyframes. Is there a way to take all the keyframes (in order to set the logic for the button), or should I the last one I have gone trough? I need the keyframes because “seek()” sends to keyframe. The logig for the one-frame-forward button is:
var listenerObject:Object = new Object();
var lastTime:Number=0;
listenerObject.playheadUpdate = function(eventObject:Object):Void {
trace("playhead time is: " + eventObject.playheadTime);
lastTime=eventObject.playheadTime;
};
my_FLVPlybk.addEventListener("playheadUpdate", listenerObject);
my_FLVPlybk.seek(lastTime+(1/my_FLVPlybk.metadata.framerate));
Flvplayback Component ?
I have one instance of an flvplayback component on my stage. I want to use it for multiple flvs. I am having trouble getting the play head to advance to the next labeled frame. My question is: do you have to have separate listener objects for each video that plays? In the code below the listener object is "complete", if I go to the frame labeled "machineshop", do I need to change the listener obejct to something else?
ActionScript Code:
_root.stop();changeTitle("WELCOME");_global.isOn = 2;_root.menu_intro.gotoAndStop("off");_root.menu_welcome.gotoAndStop("on");_root.menu_machine.gotoAndStop("off");_root.menu_mfg.gotoAndStop("off");_root.menu_weld.gotoAndStop("off");_root.menu_assm.gotoAndStop("off");_root.menu_paint.gotoAndStop("off");_root.menu_inspect.gotoAndStop("off");_root.menu_engr.gotoAndStop("off");_root.menu_closing.gotoAndStop("off");/** Requires: - FLVPlayback component on the Stage with an instance name of my_FLVPlybk*/import mx.video.*;var listenerObject:Object = new Object();listenerObject.complete = function(eventObject:Object):Void { trace("Elapsed play time at completion is: " + my_FLVPlybk.playheadTime); //my_FLVPlybk.play(); _root.gotoAndStop("machineshop");};my_FLVPlybk.addEventListener("complete",listenerObject);my_FLVPlybk.contentPath = "videos/Intro 500x278_CD.flv";
FLVPlayback Component
Please advice on the following inquiry:
I use FLVPlayback component and I want to create a button which will rewind a frame back. Encoding the flv sets the keyframes. Is there a way to take all the keyframes (in order to set the logic for the button), or should I the last one I have gone trough? I need the keyframes because “seek()” sends to keyframe. The logig for the one-frame-forward button is:
var listenerObject:Object = new Object();
var lastTime:Number=0;
listenerObject.playheadUpdate = function(eventObject:Object):Void {
trace("playhead time is: " + eventObject.playheadTime);
lastTime=eventObject.playheadTime;
};
my_FLVPlybk.addEventListener("playheadUpdate", listenerObject);
my_FLVPlybk.seek(lastTime+(1/my_FLVPlybk.metadata.framerate));
FLVPlayback Component
hello,
is there a way that the flvplayback component can play mp3 files? if not, what is the best way to play mp3 files and provide an interface for play, stop, etc.
thank you!
FLVPlayback Component
Please advice on the following inquiry:
I use FLVPlayback component and I want to create a button which will rewind a frame back. Encoding the flv sets the keyframes. Is there a way to take all the keyframes (in order to set the logic for the button), or should I the last one I have gone trough? I need the keyframes because “seek()” sends to keyframe. The logig for the one-frame-forward button is:
var listenerObject:Object = new Object();
var lastTime:Number=0;
listenerObject.playheadUpdate = function(eventObject:Object):Void {
trace("playhead time is: " + eventObject.playheadTime);
lastTime=eventObject.playheadTime;
};
my_FLVPlybk.addEventListener("playheadUpdate", listenerObject);
my_FLVPlybk.seek(lastTime+(1/my_FLVPlybk.metadata.framerate));
[F8] Little Problem On FLVPlayback Component
Hi there, I am using the FLVPlayback component to play the external flv. It looks fine. However, the only problem is the "Seek Bar Handle" (the little triangle under the seek bar) doesn't show up until the whole movie finished for the first time. Anyone has encounter this problem before? It there any setting I have missed? Thanks a lot!
you may have a look of the file by this link, the movie last for ~20s:
http://www.gardens-co.com/dev/flv/playFLV2.html
[CS3] Pausing The FLVPlayback Component?
Hi all, I've got a question that should be easy to answer! Its driving me mad that I can't fix it!
I have made an FLV player in flash that reads from an XML stream.
I want to have this stream paused so when it loads the user needs to click play before the video will play. Currently the video plays straight away which is annoying!
At the end of my AS in frame 1 I've added:
Code:
flvDisplay.stop();
Which works in flash, but when I test the SWF in a browser it does not STOP!
I have also tried:
Code:
flvDisplay.pause();
But it still will not pause when the SWF is in an HTML page.
Could some one PLEASE help me! This is driving me mad!
Button On FLVPlayback Component
I have 2 versions of a set of FLV movies -- one designed for visitors with broadband and one designed for visitors with dial-up. I want to offer visitors a choice of which version of the movie to view by putting a radio button group or dropdown menu on the FLVPlayback control. (See, e.g., the NYT homepage control.) How do I customize the control for this behavior?
Thanks.
No Contols With FLVPlayback Component
Hi All,
I have this strange problem. I've inbedded a sfw-movie in a html page. The fsw-movie is nothing more than a FLVPlayback component wich is playing a steaming flv video.
In the component inspector you can select wich skin to use. And when I export the swf form flash and play it in the standalone flash player all is well. I can see and use the playback controls.
When I put the swf inside the html page though and I view the page in my webbrowser (safari and firefox) the controls don't show anymore, nomatter what I do. SkinAutoHide is set to false (but set to true doesn't make a difference).
The swf has all the room it needs in the html page, there is no scaling or cropping going on.
I am baffeled, what is going wrong here? Can anybody help me here?
thanks, Simon
ps. I use Flash 8 professional.
FLVPlayback Component Can't Find .flv
In a test, I import a video to the stage, and use 'Progessive download from Web server', so that the stage contains only the 'FLVPlayback' component which is linked to the location of the actual .flv.
This works fine, I can test my published .swf, and the video plays, no problems.
However, in my actual project, I have the following set up: _level0 contains my main movie, of course. My main movie loads my 'video' movie into a 'target' on the main stage. My 'video' movie contains keyframes and scenes, and my 'FLVPlayback' component has been imported to one of the keyframes in the second scene. In this scenario, the video won't play. When I publish my .swf to test, there's nothing there. Even though the URL to the .flv is correct, it seems Flash can't find the .flv.
Does Flash have trouble finding the .flv [using the above method] when the FLVPlayback component is embedded in an externally loaded movie?
Any suggestions much appreciated. Thanks
Edited: 02/10/2007 at 10:55:11 AM by metrov
Pause Flv At End Using Flvplayback Component
Right now, I have a person alpha channeled out on screen. I placed him there using the flvplayback component and when the flv finishes, he disappears. can anyone tell me how to pause the video when it reaches the end?
i have tried numerous things and i can not get it to work. thanks.
FLVplayback Component Halts Everything
I've been working on getting video into my flash site with the "FLVPlayback component " and i've been able to get it to launch and play locally, however when it does launch when i'm "testing movie", my flash site quits working. I know this is a bit open ended and i'm no flash programmer, but I've been working on this all weekend. Can someone help me to integrate the FLVPlayback component correctly within my flash site? Thanks!
-Matt
FLVplayback Component Playhead
Is there a funtion for a flvPlayback playhead that will listen to the time and trigger an event based on plus or minus time even if the viewer scrubs the playhead.
FLVPlayback Component Problem
Hi,
I have problem with FLVPlayback component.
In List component I have list of videos which are played in FLVPlayback. It works fine.
But if I accidentally put invalid FLV file in my XML, error connection occurs.
After that I can’t open any other valid video paths, and FLVPlayback.state property is always connection error!
I have to reload the page to get it work.
Anyone know how to avoid that problem.
Thanks,
FLVPlayback Component In Standalone EXE
I am exporting an FLVPlayback component into a standalone exe file and it seems the buttons for playback (play, stop, etc) have disappeared. Is this a known issue? Is there a way around this, or do I have to create my own buttons?
FLVplayback Component Problem
my flash movie contains FLVPlayback component to play videos. In the begining of the movie( frame 1) I have a simple pre-loader. When I test my swf on a browser the pre-loader appear only after few second, not immediately. (my pre-loader start from 40%). I think the reason is that flash load the FLVPlayback component on the first frame although my component appears only on the second frame . Is there any work around this issue?
Thanks
NetStream And FLVPlayback Component
Hello everyone,
I am creating an application that uses the FLVPlayback component to stream NetStream videos. All of the FLVPlayback events get called properly but I need to find out some statistics for bandwidth profiling.
Idealy I'd like to find out the buffer length. When I use the FLVPlayback or NetStream bufferlength properties though it always returns 0 or -1. I was hoping someone could give me some practical advice on how to obtain this information.
Thanks a lot.
FLVPlayback Component Issue...
I've been working on a simple site to play flash videos, user clicks on a button and the corresponding video plays in the FLVPlayback Component. This works fine, the issue is when they click on another button, the second video loads, but stops on the first frame and the component becomes unresponsive (all linked buttons are grayed out). The component completely ignores any commands from this point, it won't pause, play, or accept another flv to load. I've tried creating a very simplified version and still the problem persists, perhaps I'm missing something easy that someone can point out for me, so here is the simplified code:
First click of 'nxtBtn' plays video properly, second click loads the second video of the array, but stops it at first frame & FLVPlayback component stops responding.
Attach Code
var vidArray:Array = new Array();
var i=0;
vidArray = ["video/pacLG.flv","video/hdbLG.flv","video/stormLG.flv"];
function flvpReady()
{
flvp.play();
}
flvp.addEventListener("ready",flvpReady);
flvp.playButton = pbtn;
nxtBtn.onRelease = function()
{
flvp.contentPath = vidArray[i];
i++;
}
Can I Empty A FLVPlayback Component?
Hi all!
I've but a FLVPlayback component on stage and a few buttons to load different videocontent, but can I empty the component back to the initial state with the push of a button so that the background shows. I can use frames to move the playhead back and forth to accomplish this but I prefer using AS code to do this.
Tried the "unload" movie without any luck.
Can anyone help?
FLVPlayback Component And Rtmp
I have the flash media streaming server 3 installed on a server in our office. It is set up with a few sample flv/mp4 files and is working great with the vodtest html page that comes with it.
I've now come to making my own flash file using the FLVPlayback component (at the moment i've just got a black document with a flvplayback instance in the middle, which i've given the correct rtmp path in the component inspector). It works fine in flash when using Test Movie, it buffers up the file and start playing almost immediately.
Unfortunately, if I publish the flash file and open it in a web browser, all I get is an endless buffering bar. I'm hoping theres something simple I've missed out somewhere.
FLVPlayback Component -- NetStatusEvent
I'm trying to get the status of a RTMP stream that is being played in an FLVPlayback component, and it's not working to well. Using the ncMgr, you can't really get any pertinent information... I'm looking to catch all the events, such as, connecting, connected, playing.. etc... Would it be possible to extend the FLVPlayback class to accept these events? Is there something I'm missing?
FLVPlayback Component Problem
Hi,
I have problem with FLVPlayback component.
In List component I have list of videos which are played in FLVPlayback. It works fine.
But if I accidentally put invalid FLV file in my XML, error connection occurs.
After that I can’t open any other valid video paths, and FLVPlayback.state property is always connection error!
I have to reload the page to get it work.
Anyone know how to avoid that problem.
Thanks,
Using The FLVPlayback Component With Tree
I try to set content path for FLVPlayback component over the Tree component.
Is possible to use XML file to call and play the FLV file?
I have this XML for Tree component:
Code:
<tree>
<folder label= "Flash">
<folder label= "ActioScript">
<link label="Start" url="flv/start.flv">
</link>
</folder>
<folder label= "Design">
<link label="Start" url="flv/design.flv">
</link>
</folder>
</folder>
<folder label= "Flex">
<link label="Instalace" url="flv/flex.flv">
</link>
</folder>
</tree>
FLVplayback Component Not Loading FLV
Hi,
I am trying to set the contentPath for my FLVplayback component at runtime, based upon data in an XML file. The component plays when I set the contentPath in the component inspector, but when I leave it blank and try to set the path using AS, then it doesn't load. I am using a relative path for the FLV, as it won't be web based - it will be bundled on a CD.
Any suggestions? Is this a known issue?
thanks
Marcus.
FLVPlayback Component And AS Scripting
Hi,
I'm having troubles trying to make an instance of the FLVPlayback component plays dynamically some flvs referenced in a xml file.
so i have my xml file called "flvNamesX.xml" in which all the flvs on my server are referenced.
Code:
<?xml version="1.0"?>
<flvFiles>
<flv name="s01e01_clip320x240.flv" />
<flv name="s01e02_clip320x240.flv" />
<flv name="s01e03_clip320x240.flv" />
<flv name="s01e04_clip320x240.flv" />
<flv name="s01e05_clip320x240.flv" />
<flv name="s01e06_clip320x240.flv" />
<flv name="s01e07_clip320x240.flv" />
<flv name="s01e08_clip320x240.flv" />
<flv name="s01e09_clip320x240.flv" />
</flvFiles>
With AS, i load the xml file.
When the xml file is loaded i create an instance of the FLVPlayback component on stage and want it to play the desired flv on the spot.
Code:
function loadXML(loaded) {
if (loaded) {
_global.nameArray = new Array();
trace("this.firstChild.childNodes = " + this.firstChild.childNodes);
var a = this.firstChild.childNodes;
for (var c = 0; c < a.length; c++){
trace("a[" + c + "].attributes.name = " + a[c].attributes.name);
_global.nameArray.push(a[c].attributes.name);
}
trace(_global.nameArray[5]);
var flvId:Number = 3;
var theFlv=_global.nameArray[flvId];
createFLVcomp(theFlv);
} else {
trace("file not loaded!");
}
}
flvNames = new XML();
flvNames.ignoreWhite = true;
flvNames.onLoad = loadXML;
flvNames.load("flvNamesX.xml");
//Creates an FLVPlayback instance onstage
function createFLVcomp(flvToBePlayed){
var basePath:String = "path/to/my/flvs/";
import mx.video.*;
this.attachMovie("FLVPlayback", "my_FLVPlybk", 10, {width:320, height:240, x:100, y:100});
my_FLVPlybk.skin = "MojaveExternalAll.swf";
my_FLVPlybk.contentPath = basePath + flvToBePlayed;
trace(basePath + flvToBePlayed);
}
stop();
The problem is here, in the last of those 3 lines:
Code:
var flvId:Number = 3;
var theFlv=_global.nameArray[flvId];
createFLVcomp(theFlv);
Instead of this line,
Code:
createFLVcomp(theFlv);
if i pass the argument directly as a string like this one:
Code:
createFLVcomp("s01e01_clip320x240.flv");
everything works fine.
Here's the output window text when i run the code;
Code:
this.firstChild.childNodes = <flv path="s01e01_clip320x240.flv" />,<flv path="s01e02_clip320x240.flv" />,<flv path="s01e03_clip320x240.flv" />,<flv path="s01e04_clip320x240.flv" />,<flv path="s01e05_clip320x240.flv" />,<flv path="s01e06_clip320x240.flv" />,<flv path="s01e07_clip320x240.flv" />,<flv path="s01e08_clip320x240.flv" />,<flv path="s01e09_clip320x240.flv" />
a[0].attributes.path = s01e01_clip320x240.flv
a[1].attributes.path = s01e02_clip320x240.flv
a[2].attributes.path = s01e03_clip320x240.flv
a[3].attributes.path = s01e04_clip320x240.flv
a[4].attributes.path = s01e05_clip320x240.flv
a[5].attributes.path = s01e06_clip320x240.flv
a[6].attributes.path = s01e07_clip320x240.flv
a[7].attributes.path = s01e08_clip320x240.flv
a[8].attributes.path = s01e09_clip320x240.flv
s01e06_clip320x240.flv
path/to/my/flvs/s01e06_clip320x240.flv
I want to know why isnt it working when i use a variable instead.
Or is there a better, more efficient way to do want i'm looking for?
I need assistance on this one.
thanks to all.
FLVPlayback Component In Flex?
Hello there,
I've been working in Flex with the VideoDisplay component and connecting individual controls for playback, but it just doesn't cut it. The main thing that the VideoDisplay component in Flex lacks is the ability to seek the video without having to create one from scratch. So, without having to import the swf into my Flex application (unless that is the proper way of doing it) I'm looking for some help with using the FLVPlayback component in Flash CS3 within Flex 2.
I've seen some ways of doing this from searching on Google, but they seems very "hack-ish", and I'd like to accomplish this as professional as possible.
AS3 FLVPlayback Component With XML Troubles
Okay, I have 4 different instances of the FLVPlayback component on the stage. Each will have a different flv playing within them. I need to have the all flv's parsed from one xml file. First off is this possible, without creating several xml files? If so, how do I relate the flv with the corresponding instance name, and what is the correct syntax for the xml? Any help would be greatly appreciated, and I have no problem figuring it out, yet some help or tutorial direction would help tremendously... Below is the xml skeleton I have, which loads the first flv, but not sure how to add more flv's... Thanks in advance:
<?xml version="1.0" encoding="utf-8"?>
<smil>
<head>
<layout>
<root-layout width="140" height="158" />
</layout>
</head>
<body>
<ref src= "CEOLoop.flv" />
</body>
<head>
</smil>
FLVPlayback Component Can't Load More Than Once
I built this app to play videos using the FLVPlayback component. Built it just to use Http. Then they switched to rmtp. What happens is that the first video plays fine. When I load another it loads and the audio plays, but no video. It's craziness.
Anyone have any ideas?
Thanks
Preloading The FlvPlayback Component
We have a client that has complained a few times of not being able to see the video right away. So I decided build a preloader, right? So I took the FLVPlayback and set the linkage ID to not load on the first frame. I set the global setting "Export frame for classes" to frame 2. I also put the following frame on frame 1:
Code:
// stop action
stop();
// initialize preloader function
this.onEnterFrame = function() {
tot = this.getBytesTotal();
cur = this.getBytesLoaded();
if(cur >= tot && cur > 20) {
delete this.onEnterFrame;
play();
} else {
percentNum = Math.round((cur/tot)*100);
progress_mc._xscale = percentNum;
percent_txt.text = percentNum + "%";
};
};
But the client is still complaining that they see the preloader at 97%, then they wait for 10 seconds and then see the video. Any thoughts for me to look at?
FLVPlayback Component Problems
Alrighty, so I created a custom flv player using the mediaDisplay a couple years ago, just using its API and creating a custom set of controls & buttons, as well as a volume & trackbar, rather than using the skins or editing the skins. Yesterday, I wanted to update my player to use the FLVPlayback component, and its API, which I was glad to see was more robust. The only problem was that it seems to seek only by keyframes, so you can't just scrub it using the 'seekPercentage' method.
I finally gave up, but was wondering if someone out there has found a workaround?
Here's my example: www.studiosns.com/public/flvPlayback/
Try dragging the scrubber, it causes everything to break.
[James]
|