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
Similar Posts:
Oct 22, 2009
how bad is this practice? I am having trouble getting to some stuff so i am taking the easy way out
Code:
private static var _interrupted:Boolean;
public static function setInterrupted(value:Boolean):void{
_interrupted = value;
}
View 1 Replies
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
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
Aug 25, 2009
Let's say you have the following situation:
1. Static var(an Array) stored in a class.
2. You create a variable reference to the static class in a separate class.
3. Splice some items from the reference variable in the separate class.
4. Trace the static class and the items have been removed from that too.
5. Verify several times.
6. Get confused.
7. Post on Kirupa.
View 3 Replies
Jan 6, 2010
Ok, so I have a bit of a mess here (Which I'm probably not doing right anyway, which could be my problem...). I have a document class, I'll call it as Body.as, that creates an object from another class known as Headgear.as. There are also other objects created from other classes, or will be in the future. Now, amoung all this, Headgear.as and all of the other classes Body.as will use to make objects require the use of dragging functions (starting and stopping dragging). On stopping drags, position checks are then made to compare a particular hidden movieclip with the dragged MC.
To try and save myself some hassle (from making the same functions over and over to ensuring that when the objects are created I don't need to send a complete crapload of variables just to ensure the position checking function would work), I had the functions for the event listeners (Which are set-up on the draggable MCs in Headgear.as) just direct to functions in Body.as
[Code]...
View 6 Replies
Feb 23, 2004
I've been using flash for a whopping 3 days now, and I've stumbled onto a problem that I can't seem to find a way around. I'm using flash 4, due to the fact that #1 it's all I've got, and #2 the new flash mx 6 won't run on the old ass computer I'm using. This is my problem: I import a .bmp image and edit it in flash to make portions of it animated. The image is a symbol (I think it has to be anyway to animate it...) Everything runs fine when I use the basic play/rewind buttons to test the animiation, but when I make it into an executable, or when I go to the menu and hit "Test Movie", the image shows up as a red square. The animation I added still runs, but the actual image I imported is a red square.
View 5 Replies
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
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
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
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
Dec 28, 2009
If I created a static method. say I decide to call on other methods within that static method. Do those methods I call on need to be static as well? what If I used some of the properties. Not to store data permanently, but just within that process. Do those properties need to be static ??
View 3 Replies
Feb 21, 2007
Yesterday I found myself wondering, what is the difference between either having a class with methods that are all static, or simply giving your class the static attribute?
View 9 Replies
Nov 22, 2009
Alright, so I have a class that is linked (via the linkage panel) to a scrollbox class. I'll paste the class here:[code]Ignoring the formatting, the commented out functions are the ones causing the issue. Adobe says that it's a static class and I can't use non-static functions. The way I wanted to use it was:
1. Call the page button generating function above.
2. In the main code in my program is this line:scrollbox.setClickFunction(historyContent.generate Page);So when the buttons that are supposed to be generated are clicked, the scrollbox class can call the History pages generatePage function and pass it which page to show. (I did this because there was a lot of text and a limit on how much would display, so small chunks sounded logical).
3. In the onClick function (which I haven't finished yet because the rest wont work), when you click one of the buttons it calls the set function. Its that simple.
View 4 Replies
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
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
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
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
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
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
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
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
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
May 17, 2011
I would like a function to run when a user clicks anywhere on stage. But this function should not run when the click is on buttons & on url:s inside a dynamic html-formated textfield. How can I detect this? I do realise that the cursor turns to a hand when you hoover over a url inside a textfield & you can set the hand to appear on buttons as well (which i always set it to do). So is there a way in realtime to detect when the cursor is & is not a hand? I've tried the following:
Code:
btn_mc.buttonMode = true;
stage.addEventListener(MouseEvent.MOUSE_DOWN,down)
function down(E:MouseEvent)
[Code]....
View 2 Replies
May 28, 2009
I am trying to load html into a text box from a website. when i load to the text box, everything goes fine except that it is loaded as something that looks like this:
"%20Cheese%20Croissant= %3B%3Cimg%20src=%22http%3A%2F%2Fwww%2Ehousi ng%2Eumich%2Eedu%2Fdining%2Fmenus%2Fm%2Dfit%2Egif%22%20alt%3D%22%2A%22 %3E%3C%2Fdiv%3E%3Cdiv%20class%3D%22Desserts%22%3EOat%20Bran..."
I wouldnt mind if the html tags were there, because I can deal with those, but I don't know what to do with this. Here is my loader:
[Code]...
View 8 Replies
Jul 14, 2009
Flash CS4. When I enter a movie clip to edit the timeline the pasteboard turns to the color of the stage. The result: I can't see the edges of my stage. This is only within the MC. And only within one particular MC (I created another one and the pasteboard stayed 4% gray). When I take the content in the bad MC (via copy frames) and move it to the good one, the same thing happens: Pasteboard turns to the color of the stage. I've tried SFT-CTL-ALT double click. No luck. Strangely, this isn't happening in every FLA. I know it must have something to do with the content on that timeline, but what that is I have no idea.
View 3 Replies
Feb 20, 2011
I'm trying to make an array with different color values. My problem is that when I do...
teamColor[i] = currentColor...
All color values in my array turn into the currentColor. (I would upload more code, but that would be a massive mess, considering that I have code everywhere with references from movie clips that are as far as 3 layers deep. However, this would be irrelevant anyways (probably), because I tested this with color values on my main timeline, without any references to or from anything deeply nested). I would like to add that I tried adding strings in there and that the strings remained their original, intended, value, while the color exhibited the same phenomenon.
I changed my code by creating separate variables for each color instead of putting the variables into an array (not what I really wanted to do, but it works). My code looks like this:
if (teamColor != 0) {
this["team"+teamColor+"Color"] = new ColorTransform(0,0,0,1,currentColor.redOffset,currentColor.greenOffset,currentColor.blueOffset,)
teamColor = 0
namebox.addboxes()//function in a movieclip
}
TeamColor is now an int that is changed based on which box a user clicks from a movie clip that has a dynamically generated name, based off of what the variable value in a loop was when it was created.
(E.G: 'tempboxname[ttns].name = i;')
teamColor is then equal to that name when the user clicks it. I have another movieclip with colors in it and the above function is called to check if any teamColor change has occurred, and if it has, act accordingly. (The idea of having teamColor equal to 0 is so that if the user clicks twice, nothing changes. I other conditionals for other colors, all within the same function). That is how I fixed me code. It's not what I wanted, because it's not an array (meaning a seemingly infinite number of teamColors, and thus, teams) but it'll do for me.
View 2 Replies
Jan 11, 2009
i want to create an mp3 player with volume ,frequency, bass, treble and speed knobs any pointers to any scripts that might help me would be great, but at the moment i am just trying to work out how to make a knob that turns.I assume i would use drag over and some kind of rotation function.
View 0 Replies
Sep 1, 2009
Basically, I have a button that when moused over it makes rivers go to 50% opacity (they start at 10%), then when clicked they go to 100%.
What I want: Then the rivers stay at 100% until the user clicks the button again.
What is happening: Currently though the mouseout is fading the rivers back to 10%. I know that my code is telling it to do that and want to know how to make it stop.
Here is my code for this:
function shipMouseOver(event:MouseEvent):void {
Tweener.addTween(rivers_mc, {alpha: 1, time:2});
Tweener.addTween(this.dashboard_mc.ship_btn, {alpha: 1, time:2});
} function shipMouseOut(event:MouseEvent):void {
[Code] .....
View 1 Replies
Nov 14, 2009
I have a whole heap of circles which are user created and they all bounce off one another. Generally it works fine but occasionally two balls join together and sort of .. orbit each other.
my collision code is this: (it's within two loops going through an array of movie clips, where mc1 is the current movie clip in the first loop and mc2 is the current movie clip within the second loop)
ActionScript Code:
dx = mc1._x-mc2._x
dy = mc1._y-mc2._y
[Code].....
View 1 Replies