ActionScript 3.0 :: How To Reset Source On VideoPlayer

Feb 25, 2009

Imagine for a minute that you live in an imperfect world and you're having to work with people who think that a url to a youtube page (.html) is the same thing as a url to a flv (.flv). Long story shorter, your VideoPlayer.load() keeps getting html files passed in instead of flv files. I'm running a try/catch, but I'm not sure how to reset the source on the VideoPlayer.

VideoPlayer.source is read-only and
VideoPlayer.load(null)
Gives the same error as
VideoPlayer.load([*.html])
If not, I'm just going to do an extension check before I do VideoPlayer.load().

View 3 Replies


Similar Posts:


ActionScript 3.0 :: VideoPlayer.Source From URLRequest?

Jul 31, 2011

Just a quick question, I am trying 3 things at the moment:

I know its htp:// but it wouldnt let me use the right one due to post count.

Code:
ui_vpMain.source = "htp://192.168.0.102:4040/video.flv&u=test&p=test&maxBitRate=1000"
vs
Code:
var plainRequest:URLRequest;

[Code]...

View 0 Replies

Flex :: Detect Source Video Size VideoPlayer?

Apr 30, 2010

Is it possible in Flex 4's VideoPlayer control (spark.components.VideoPlayer) to detect some attributes of the source video?

In my case, it's a local file. I would need to detect the original width and height of the input source video (an h264 f4v).

View 2 Replies

Flash - Reset FLVPlayback Component For Playback With Same Source?

Dec 31, 2009

I'm using the same FLVPlayback component to play many page transition videos throughout a large flash site I'm building. On each transition, I'm setting the component's source using myFLVPlayback.source and listening for the fl.video.VideoEvent.READY event before proceeding with each page transition. This works fine as long as the transition between every pair of pages uses a different video.

Unfortunately, I'm running into a problem when the same page-to-page transition video needs to get invoked for two consecutive transitions. When playing the same video twice in a row, setting the source property of the component to the value it already has doesn't seem to do anything, meaning that my listeners for fl.video.VideoEvent.READY never fire. I could do something hackish like setting the source to a tiny, never-used-elsewhere FLV before setting it to the FLV that I'm actually using for the transition as a means of "resetting" the component, but I'd like to know what best practices are in a situation like this (insofar as best practices with something like the FLVPlaybackComponent can be discussed with a straight face).

I've perused the livedocs for the component but came up empty-handed, and manually using NetStream, NetConnection, and Video objects at this late stage isn't really an option.

View 2 Replies

ActionScript 3.0 :: Reset The Display By The Means To Start The Motion All Over Again (reset Button)

Jul 13, 2010

Just new in forum and just new in as3 programming. All i want to do is to make some physics simulations (i'm physics teacher...). So i made my first sim with the following code, just to simulate a simple motion with constant velocity. It works ok, except the part i need to reset the display by the means to start the motion all over again (reset button). Then the motion starts but the traces of the previous motion remains on stage. I tried the null command (sp=null) but the sim could not start again because the sp nedded to be non-null...

[CODE]...

View 2 Replies

ActionScript 1/2 :: Make A Reset Button And Add Script To It To Reset All Of The Drag And Drop Movie Clips?

Apr 13, 2011

I have an issue with adding a reset button to my drag and drop movie clips.The problem is, if a student drags a movie clip to a wrong location on the SWF file I want them to be able to hit a reset button that would take them the same SWF that they opened and what would showup would a clear page for them to restart their drag and drop exercise.I know how to make the button for this just want the proper action script to be able for user to start over with no movie clip symbols on the page.

View 3 Replies

ActionScript 3.0 :: Bg.reset() Can Only Find Reset Used For Timers?

Dec 28, 2010

reset in google yields only its use for timers.However I have code bg.reset() which I suppose puts the background back to the beginning of its timeline.

View 3 Replies

Actionscript 3 :: Source From External Folder (linked Source) Not Appearing In Flex?

Aug 26, 2010

i have a Air Project in which i have added three extenal source folders. but when i reopen project or strat flash builder again i get icon on those folder like this but when i open the configuration for that project and try to validate the path and adding it again i get message like this but the path is valid. proof is this pic what could be possible error,,, is there any way that i when ever re-open project i get no warning and able to navigate through the linked source code. now i am doing it

1- deleting on of the linked folder

2- again adding that folder.

View 2 Replies

ActionScript 3.0 :: Flex Script Source In Source Path Cannot Be Found

Jan 11, 2010

So inside my src folder I have my app.mxml file. I have a source directory pointed to my actionscript library.It appears that Flex does not look inside that source directory including an .as file within the master mxml file.

Code:
<mx:Script source="com/domain/something/somethingelse/app.as"/>

I could just have the main app.as file inside the src folder along with my app.mxml file but it would be nice if it could live in the actionscript library.

View 1 Replies

Media Server :: Use Http Source Instead Of Rtmp Source?

Aug 31, 2011

I have this standard embed code to play my video:
 
<object height="409" width="600"><param name="movie" value="http://fpdownload.adobe.com/strobe/FlashMediaPlayback.swf" /><param name="flashvars" value="src=rtmp://my-server/vod/flv:my-video" /><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><embed allowfullscreen="true" allowscriptaccess="always" flashvars="src=rtmp://my-server/vod/flv:my-video"

[Code]...

View 4 Replies

ActionScript 3.0 :: Flex Source In Source Path Cannot Be Found

Aug 21, 2009

So inside my src folder I have my app.mxml file. I have a source directory pointed to my actionscript library.It appears that Flex does not look inside that source directory including an .as file within the master mxml file.[code]I could just have the main app.as file inside the src folder along with my app.mxml file but it would be nice if it could live in the actionscript library.

View 2 Replies

Actionscript :: AS3 - How To Set VideoPlayer's Metadata

Mar 6, 2011

I've set a custom client for a FLVPlayback's netStream, to attach my own functions (onXMPData, onMetaData) to parse the various info myself. However, i'd still like to pass the meta data back to the VideoPlayer. How do I do this? I tried dispatching a METADATA_RECEIVED event with the metadata object (tried dispatching from the client, the netstream, the video player, the flvplayback..), but it does not work.

View 1 Replies

ActionScript 3.0 :: Using VideoPlayer Instead Of FLVPlayback?

Feb 16, 2011

I'd like to use the VideoPlayer class instead of FLVPlayback because in theory it uses up less space as it does not have all the skins etc.However I've found that if I want to throw a VideoEvent to check when the video has finished playing, if I do not have a component of FLVPlayback in my fla. file library I get a compilation error saying it can not find the "VideoEvent" class even t hough I have the correct import lines at the top.So what's the point? That would mean that by using VideoPlayer I cant make my swf smaller and I lose functionality.

View 0 Replies

ActionScript 3.0 :: Load New Video Into VideoPlayer?

Jul 15, 2011

I've made a very simple video player from bits I've found on the internet and it's working great provided I want to only use 1 video...

I have added two buttons on the stage and the idea is, if you click "videoBtn1_mc" it plays video1 and if you click "videoBtn2_mc" it plays video2.

I can't seem to eject/unload the first video that is loaded in. Once it loaded in it will just play that one no matter which btn I click...

Here is my code. The buttons I'm referring to are right at the bottom...

ActionScript Code:
import flash.events.MouseEvent;
//------------------------------------------------------------------------------------------
////CONSTANTS////

[Code].....

What must I add to eject/unload the current video so the new one can load in?

View 4 Replies

Create A Playlist For A Videoplayer That Is Already Created Using XML?

Aug 7, 2009

I'm trying to create a playlist for a videoplayer that is already created, using XML.

Here is the code:

Code: Select allarquivo_xml = new XML();
arquivo_xml.ignoreWhite = true;
arquivo_xml.onLoad = function(success){

[Code].....

I want that the button created, when pressed, go to a specific URL. So in this exemple above, I created a text field (instance name ->"teste1") to display the URL . But the only XML node that appears is the last one. I'm starting to use XML, so I can't understand what is going wrong, because so far, I could do the name("File1,File2,File3") of the file appear OK in the button the I created with the "attach" function.

View 1 Replies

ActionScript 3.0 :: Seek To A Not-yet-loaded Second In Fl.video.VideoPlayer?

May 11, 2009

I'm using fl.video.VideoPlayer and I'd like to be able to seek arbitrarily within the video. seek() works unless the given time isn't yet loaded, in which case the video hiccups and continues playing normally. I'd like it to seek to the specified second even if it's not yet loaded, loading/buffering as necessary. I've tried seek() and play() and haven't been able to make this work.

View 1 Replies

Media Server :: Custom Videoplayer Like The One On Facebook?

Mar 26, 2010

Is there a tutorial for developing a Flash Video Player which expands on clicking? You can refer the videos embedded on facebook. They appear in smaller player but when clicked expand to fit the content.

View 1 Replies

Media Server :: VideoPlayer And Application Instances

Jun 27, 2010

I am trying to playback recorded streams from a Flash Media Interactive Server using the VideoPlayer component in Flex 4/Flash Builder 4.If the stream is located in the serverpath>/ streams/vod/_definst_ directory then I can get to it by setting the 'source' parameter of the VideoPlayer to [code]What I can't get to work is when I have a stream recorded to an instance within an application directory.So if the application is "app1' and the instance name is "inst1" it would be literally located in <serverpath>/ app1/ streams/ inst1 directory. Setting the source parameter to this "<server>/ app1/ inst1/ streamname" does not work.It seams to be ignoring the 'inst1' part of the path because the server side log shows '_definst_' as the instance name being run.I know this is in part a Flex 4 question, but manually writing a video player works. I would just like to get the Flex 4 VideoPlayer component to play the video.

View 2 Replies

Professional :: Videoplayer That's Beeing Controlled From Keyboard

Jan 5, 2011

1) I wan't to do a fullscreen videoplayer that listens to the keyboard and that plays a videoclip on demand. I will not use menues or onscreen buttons.
 
It should work almost like a Video DJ application or a audio sampleplayer but for video. So; when I press any one of maybe ten keys the corresponding videoclip should be played.
 
I intend to run this locally using Flash player hence not on a browser or on internet so I'm not really limited by bandwidth. I'm on CS4 Flash Professional.
 
2) Is there a IDE, a runtime development enviroment, for Flash aimed for AS? Despite working on a daily basis with digital media  for many years incl. coding in php, javascipt, asp.net, etc I still have a tough  time understanding Flash and AS3.

3) A part from traditional keyboard input is there a way for Flash and/or Flashplayer to listen to an non-standard USB input, say a touchpad, joystick etc?

View 1 Replies

ActionScript 1/2 :: TypeError: Error #1085: Videoplayer?

Jun 15, 2011

I have a videoplayer that loads video from xml and players it. The code works well when loading the xml.But because I need it to run the video on the server I user php code that echos xml to access videos:
 
$selectvideos=mysql_query("SELECT * FROM Videos");
echo "<?xml version="1.0" encoding="UTF-8" ?>
";

[code].....

View 42 Replies

Html :: Fl.video.VideoPlayer Loads Flv Relative To Swf?

Nov 9, 2009

Update: Turns out this is undocumented behaviour of the NetStream class - NetStream loads relative to the swf, as opposed to URLRequest which loads relative to the HTML doc...annoying.I am having a strange issue where loading an FLV file using thefl.video.VideoPlayer class that comes with CS4: Adobe docs hereUsually when loading external content into flashplayer, the path is relative to the HTML page that the swf is embedded in - but when I try and load an FLV using the VideoPlayer class the player looks for a path relative to the swf, not to the HTML (as you would expect).

eg:
My file setup is:index.html (which contains the swf)swf/my-video-player.swfvideo/my-video.flv

[code].....

View 1 Replies

Flex :: Converting VideoPlayer CurrentTime To String

May 17, 2010

I want to format the currentTime displayed by a videoPlayer component inside flex, something like : 8230.999 to something like 01:59:59:999 which is "hours:minutes:seconds:milliseconds". I tried different sets of codes but they can't get it to work because currentTime is nor a correct milliseconds time as it adds a floating 3 digit point to seconds;
So instead of : 2000ms it outputs 2.000

Here's the current MXML:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="[URL]"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
<fx:Script>
[Code] .....

View 5 Replies

Actionscript 3.0 :: Flv Preload - Add Function To Videoplayer Class

Jul 25, 2009

I want to add this function to my videoplayer class :

[Code].....

In order to have a preloader in case the video takes time to dl. How do I rely it to the the netsream, what do I have to add , and where exactly?

View 1 Replies

IDE :: VideoPlayer On Website - Doesn't Show The Movies

Nov 3, 2010

When editing the template i faced a problem with the video player. It simply doesn't show the movies i add, the errors are as follows:

[Code]...

View 1 Replies

ActionScript 3.0 :: Extending VideoPlayer Turns Sizes Static?

Feb 12, 2009

I'm extending VideoPlayer and it's been working fine for weeks - all of a sudden it's gone berserk on me. I create a few instances and I'm passing different dimensions to each but new instances are using the size of the largest instance so far...as though the height/width had somehow turned static...?Here's the pertinent code:

PHP Code:
import fl.video.VideoPlayer;
import fl.video.NCManager;

[code].....

View 2 Replies

ActionScript 3.0 :: Multiple Videoplayer Running In A Movieclip Which To Unload?

Aug 6, 2009

I have a multiple videoplayer running in a movieclip on the timeline of another movieclip.I need to unload or stop it from playing when the timeline moves on

View 3 Replies

Flex :: Change Background Color In Spark VideoPlayer?

Sep 9, 2010

is there any way to change the black in background in the VideoPlayer component that comes with Flex 4 ?

I can change every color but i can't change the black in background.

View 2 Replies

ActionScript 3.0 :: Toggling Video Fullscreen And Positioning Videoplayer UI?

Oct 12, 2011

I've landed a project which is centered around building a custom video player with some special functionality (so I can't just use the default Flash video player, unfortunately). I have two small 'problems' in the sense that I could probably solve them myself, but I'd like some input on best practice for solving them:(The project is for Flash Player 10 and the video is intended to run inside a browser.)

Toggling between normal / fullscreen playback Ok, so my custom video player needs to be able to toggle between fullscreen and normal embedded-in-webpage player size. How does fullscreen toggling currently work in AS3 -is there a specific AS3 method for fullscreening a specified video object in the swf (without stretching the video player UI in the swf itself), and if so, does it automatically black out the background if the screen format doesn't match the video format? - or do I need to download a class for this?

Positioning video player UI when going fullscreen As opposed to YouTube, I want the player UI to still show up when the video is toggled to fullscreen mode - but as mentioned above, I don't want to stretch its size along with the video. So is there a best practice for repositioning the video player UI to the vertical bottom and horizontal center of the screen when the user clicks full screen? I'm not entirely familiar with what happens to the Flash stage when it goes full screen,. How to deal with not knowing the coordinates of the vertical bottom/horizontal center when screens have different ratios and resolutions?

View 3 Replies

ActionScript 2.0 :: Reset All Variables - Command That Will Reset All The Variables In A Swf At Once?

Nov 25, 2009

With out getting into a ton of background I am wondering if there is a command that will reset all the variables in a swf at once with out having to do them individually?

I've googled and searched my books and can't find anything. Another option I could see is having the current flash reload, that would set everything back to the start but I couldn't find how to do that either.

Anyone know?

View 2 Replies

Flex :: Play Two Consecutive Videos Using VideoPlayer Without 'black Frame In Between'?

Feb 10, 2011

I am playing multiple short video clips behind each other and I want it to look like it is one continuous video. Is there a way to stich them together so that it's unnoticable when you set a new video source.

At the moment I am having a problem where a black frame is inserted when I set a new video source. The order of events seems to be something like this[code]...

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved