ActionScript 3.0 :: NetStreamInfo Class's Parameters Be Read?
Jul 1, 2009
How can NetStreamInfo class's parameters be read. I mean, I have an application to perform live streaming. I have used 'nc' as my Netconnection object & 'ns' as NetStream object and nsi as NetStreamInfo object. When I Type 'nsi.' I see lot of attributes but when I try to print it using
How can I read a parameter of the XML and display in the trace? I cant do. Parameter: lojaID = [xmlNode1.firstChild.childNodes[0]]; I try to read but appears undefined.
I am reading a xml, and it is working perfect.But entered 4 new parameters in the XML,<subtotal>,<currency>,<TotalWeight> and <WeightUnit>, and I can not read them.
I just wondered if there was a way for flash to read details/parameters stored in a jpeg? (author, date... etc)... without having to manually enter these things into an external file for referencing. It's probably not doable, but I thought I'd ask anyway.
I'm creating a slideshow where each slide can have:- a video or a still- 1 audio track or many (up to 3)- 1 button or many (up to 3)I was thinking that each slide can be it's own object, and then I would pass the video, audio, buttons, etc., into it as parameters:
public class ribbon extends Sprite { private var fallAmount,taper; public function ribbon(FallAmount=50,Taper=0.2){ fallAmount=FallAmount; taper=Taper; }
how i can pass parameters to an instance of a class using the Object.registerClass method. It seems i can only put the name of the class but no extra parameters.
In Flash CSn/AS3 you associate a Main class with a flash file which when loaded in the flash player "automatically creates an instance of the program's main class."I'd like to know how to pass arguments to the main class, since you don't write it yourself (you put its name in the Document textfield in the IDE).
I was wondering about which is the best method to use when passing variables to a class. So if I were making a complex class which required many variables to be passed/set to function [code]...
To date have used method #1, but I guess I lean toward method #2 although my inexpierience has me majorly doubting that and was wondering if anyone else had any views on this?
So I have a movieclip that I want to play nice with my class file. So I set the linkage and all that and it works. But, my initialization function gets called with no parameters, because I have not set any. How do I do that with this method?
I am wanted to know how can i pass a parameter to the function which I'm calling using Delegate class. I know to pass params having static values such as true / false or a static string "hello".
Code: var myFunc:Function = btn.onRelease = Delegate.create(tihs, releaseHandler); myFunc.str = "hello"; function releaseHandler()
[code]....
Here str can be retrieved as 'arguments.caller.str' inside the function.But in case i want to pass the reference of the 'btn' button. Then how can i do this ?
I've got a main.as that loads SWF to the stage. the loaded SWF seppoused to pass a link to the main.as and trigger a javascript function to popUp that photo from that link.
I know there are two ways:
((root as MovieClip).parent.parent as Object).somefunction(parameters);
and to dispatch an event. inorder to pass parameters throug the event i need to extend it with another class.
isnt the (root as... ) more efficient if all i need is to pass a link?
I'm unsuccessfully attempting to instantiate a reference of a class that is passed as a parameter to another class. In this example there are 3 classes: MainClass, Canvas, MyCircle From the MainClass I am creating an instance of Canvas, which is passed a class reference of MyCircle as I want to create instances of MyCircle from within Canvas. However, the MyCircle constructor contains required parameters that are created from within Canvas. How can I pass and instantiate a class reference with required parameters?
MyCircle: package { //Imports import flash.display.Shape; //Class public class MyCircle extends Shape { [Code] .....
Basically, imagine two classes, for simplicities sake I'll call them classA and classB they are in the same folder, same project, and all variables have been called as public.
In classA there's a variable, for this example I'll call it speed (its called something else obviously as speed alone turns blue so its a reserved word). It is made and updated in classA for it's current value
classB handles the array to move things, and needs to reference what speed is so it knows how much to move each object each tick.
How do I allow classB to look in classA and see what the current value of speed is?
In my emptyMC, i'm calling a newsticker, that needs an external .as class to works propertly. But when it opens, it doesn't read my _x and _y coordinates and neither the .as.
There is a library component represented by Class A. But constructor of this class requires some parameters. When the component needs to be added dynamically, it's fine because of code :
var abc:A = new A(param1,param2)
But what if my movieclip is already present on the stage. I notice it gives out error, that the parameters are null.
Is their any way to insert constructor parameters for movieclips already on stage.
I would like to read the source of the flash.net.FileReference class. Is this possible?Where can I find the source files, do the come with the Adobe Flash or Flash Builder?
My friend recently said, that you should find some way without "CustomEvent" if you wanna follow OOPs strictly. Is this true ? Is this the reason, that such class is not provided by Adobe natively ? In many of my projects, i find it impossible to communicate without being able to send information via parameters. Is using "CustomEvent" like thing, a breach into OOP rules.
I want to create a simple component in as3, cs4. There are 2 problems I cant solve:
1.)I can't get the default parameters "loaded" in the class for the component so lets say if I have w = 10 in the parameters how can I refer to it in the code?
2.) How can I get the tool with which I can set which corner of the component should stay the same : it looks like this in the default
flash button component theLinesTool.png (11.82 KiB) Viewed 290 times
A friend of mine has a Flash Action script running on a LAMP server that currently reads an xml config file. He's asked me if it's possible to remove the xml file, and replace it somehow with a system (lets call it an 'auto xml generator') that intercepts the request to read that file and generates an output, so it appears to all intents and purposes as if the file still exists and contains the contents that has actually been returned from our auto xml generator'
So I want to read http streams using flash tcp sockets. I do not really need the http header at all - all I need is body which contains flv. so how to read http response body into byte array using flash sockets?
I'm having some problems importing a class, the message that Flash gives me is this; The class being compiled, 'ImageLoader', does not match the class that was imported, '[URL]'. The only line of code in my flash movie is this: import com.martijndevisser.*; And yes, the class is in that folder The class is from here: [URL] I've used the class before and it works fine, I just dont know what to do?