Actionscript 3.0 :: Video Class Passing Url Of Flv?
Feb 21, 2009
I have been trying to put the As3 video tutorial into a class which works fine if I keep the url of the file to play within the class. But I want to be able pass the url from the actual swf file... I have had limited success.
I've got a document class (EgoGame.as) and another class (Ball.as) which has been duplicated to deal with several different video pieces. Inside the document class is a list of 'if' statements which decide which video should be played. At the moment I'm doing it the old fashioned way whereby if the condition is true....it tells the relevant Ball class to gotoAndPlay a certain frame within the linked movieclip...
i have a movie clip which is exported for ActionScript , i want to get a variable from the document class into the movie clip class i tried this but there was an error !!
ActionScript Code: var main:Main=new Main(); main.txtScore.text="hello";
I created a movieclip with a star. Then, I creates a document class and I named it as Main.as.
In that document class I wrote: package { import flash.display.*; public class Main extends MovieClip
[Code]....
I´m not posting here all the code, but you can easily see that I´m using x_origin and y_origin variables to keep the original position of the movie clip. I will use them to move the star back to the original position.
The problem is that instead of being 20 and 30 respectively, tracing them I see that they are both ZERO. So when I drop the star, instead of going to x=20,y=30 it moves back to x=0 and y=0. I´ve to get the star position relative to stage, but I can´t find anyway!
I'm trying to create a class which will create a tween for several different instances of an object. I am creating the instances in the Document Class. The trick is, I would like to specify how long each tween will take.
As you can see, I have a variable "myTime" which syncs the timer and the tween. This causes to tween to repeat and the clouds to continually scroll across the stage. How can I determine the var myTime at the time I create each instance of the Movie Clip mcCloud?
We are using a flash video player. In that we are passing an xml URL as Flashvars which contains the path of the flv video to be played in that player. This works fine when we are uploading to the test server. But we have a development sever which is accessed by an ip address. Whenever any ip address xml URL is sent to the flash, it is not playing the video.When we use domain_name/video_player it is working fine and xml file is loadingBut when we use ip_address_of_domain/video_player, XML is not loading Seems to be really strange
I am building a page, like a table of contents (TOC) showing a list of videos the user can select from. It's written in PHP and populated by a MySQL database. There's a thumbnail and descriptive text which are linked to a new page with Strobe Media Playback. Videos will be delivered via RTMP stream from Flash Media Interactive Server 3.5.
What I want to do: Pass the filename of the video that was selected on the TOC page into the actionscript for the Strobe player on the player page. I have found a couple of posts here that related to similar issues, but I'm new to AS3 and was not certain if the other folks wanted to accomplish the same thing I do.
I have a class that works with an external swf with play, pause and slider. Now that I have all that working, I'd like to be able to pass the URL of the external SWF to the class from the main fla AS. I managed to use a 'set' inside the class to retrieve the name, but it apparently doesn't trigger until after the external SWF gets loaded.
Code snippets follow: CntlClass: public var loader:Loader; private var _urlName:String; public function CntlClass() { loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, movieLoaded); loader.load(new URLRequest(_urlName)); public function set urlName(value:String):void { _urlName = value; }
Main FLA file - other than a controller (cntl_mc) containing a play button, a pause button, and a slider, the only thing in the FLA file is this code in the first frame: cntl_mc.urlName = "extswf.swf";
I am making a game project using tiles. I want to ask bout the xml.
I know how to load an xml data into the stage by using one class from library
However, rite now, I have 3 customer_mc with class for each: char1,char2,char3
And i have this xml data called customer_xml that contents the customer name,order and payment. So far i know how to call one class and do a for loop but i cant find a way to call three classes and put it into the for loop.
function init(xmlString:String):void { customer_xml = new XML(xmlString); for (var i:uint = 0; i<customer_xml.customer.length(); i++) { var customer_mc:char1= new char1();
[Code].....
how can i put three customer mc into the for loop? Do I put it in an array?
Second, I don't want it to be put randomly on the stage but only on the right corner of the stage. Is that mean, I put a precise coordinate for the customers mc?
I have those 2 function inside a class named MenuScreen.as, What I want to do is send a value true or false to another class named Game.as.If the user clicked mouse icon the value must be true and if user clicked keyboard icon it must be false.[code]
I have a custom class being constructed from my main class. In the custom class it has another custom class that is passed in as a parameter. I would like to strictly type the parameter variable but when I do, 'the type is not a compile type constant etc'.This, I understand, is because the custom class used as a parameter has not yet been constructed.It all works when I use the variable type ( * ) to type the parameter.I suspect this is a design flaw, in that I am using an incorrect design pattern.It is actually hand-me-down code, having received a large project from someone else who is not entirely familiar with oop concepts and design patterns.
I have considered using a dummy constructor for the parametered class in my main class but the passed in class also takes a custom class (itself with a parametered constructor). I am considering using ... (rest) so that the custom classes' parameters are optional.Is there any other way to control the order of construction of classes? Would the rest variables work?edit)in main.as within the constructor or another function
var parameter1:customclass2; customclass1(parameter1); in customclass1 constructor:
I pose this question to you. I have created a video player that functions off of the Video Class, netConnection and NetStream and up until this very moment works 100% as it should.The hang up I'm getting is that I have a onMetaData function that checks ALL of the flv's or f4v's metadata as it is loaded into the player, so i can use it to control some other elements of the player. Here is the code I am using:
Code: my_ns.onMetaData = function (md:Object) { for (propName:String in md){;
I am trying to put together a class for playing video using the Video object. So far, I have only been successful in getting the Video object to fully work when not using a class setup. In the documentation, I have read that to use the Video object you have to actually drag/create the video object onto the stage. So, in my next attempt, I created the video object onto the stage within a MovieClip but still trying to use a class/linkage setup with the Video inside inside of a MovieClip container. No luck there either. Here is the basic AS2 script that is linked to a MovieClip that contains the Video object ("video" instance) within it.
Code: class VideoTest { private var nc:NetConnection; private var ns:NetStream;
[code].....
I am getting the following error with this script.
Code: Line 14: There is no property with the name 'video'. Line 15: There is no method with the name 'video'.
So I've created a custom class which makes use of a Sound object. The Sound object loads a sound from a URL, and I attach and event listener to it to see it when it finishes loading i.e. Event.Complete
MY question is this: how do I receive this event outside of the class? For instance, I want to be able to create an instance of my class somewhere else, load a sound and attach an event listener to my custom class that listens for the event thrown by the sound. Understandably, I don't want to make the sound object a public variable.
I loaded a font.swf (in Flash CS5) and it works in the class I loaded the font into, but if I want to pass it to another class, how do I do that? I tried passing it as a TextFormat instance (with the format.font = my_loaded_font) but that doesn't appear to work...
if i have multiple movieclips on the stage and i am writing a document class and in document class i import another class and i need to pass these movieclips to that class.
This this not seems a difficult tusk to understand.
I can able to connect classes to each other. But the thing is that, when I am going to construct some logic to load and hold xml data and only fetch the correct child object from it, I stumped.
Here is the starter:
I connect loadXML.as to Main.fla from Properties Panel.
well, i'm getting into flash classes, and i'm working on my first project using self written classes. but i got a question about variables.i've got a MC rad_container with the class Rad linked to it. By using class instances i can now send the variable from the MC to the class, and get it returned.but i want to use the same varhere's my class Rad
Code: class Rad extends MovieClip { public var ballKleur:String;
I'm trying to pass a string from the main timeline into a variable within a class (public _myVar:String how i can acces the public variable within my class and populate it?
I have my FLA with a Document Class. I also have one other class, that doesn't extend anything. am trying to pass the stage from the FLA on to my non-Document class. Obviously, the Document Class can see the main stage no problem, but having trouble passing that stage to an external class.I tried to pass it from Frame 1 in my FLA. I also tried to pass it from my Document Class to my external class, but not working like it should.Code:var passStage:TitleClass = new TitleClass(stage)Now, on to my TitleClass (non-Document class / external class)
I have created a custom class. It seems to work (at least no errors), but when I create a button in the actual FLA that calls on the class, it doesn't change what I want it to change. Here is the class:
[Code]...
When I call for the class to make the button, it works. It also successfull calls the default.png from the class, but in the FLA the icon_retrofit.myIcon doesn't change the image to 'images/b.png'.
I've been given a video url that I want to pull into an the flvplayback component. The url for the video I've been given is:The problem is when I set the contentPath with the above url the component won't load the video with the extra parameters ?var_log=102|441100001-1|- added as it says the path must end with .flvI am asumming that the video provider needs this extra var/parameter to be called in order to track the number of video requests, in which case I will need to keep this in.
know my question isn't linked directly to AS3, but still.
<meta name="title" content="Stranger: V.V. Brown, Singer-Songwriter" /> <meta name="description" content="We caught up with singer-songwriter V.V. Brown just before she released her new album, Travelling Like the Light. The uber-stylish singer with
I am trying to pass an xmlList from this class, and am having some issues. The thing is, how can I call a method that listens for a result, then calls another method..