ActionScript :: Access NetStream Or MovieClip From Loop

Jan 26, 2010

I've got a load of videos
var ns1:NetStream = new NetStream(nc);
container1.compMa.theVideo.attachVideo(ns1);
ns1.play("sukh_diesel.flv", 1);
var ns2:NetStream = new NetStream(nc);
container2.compMa.theVideo.attachVideo(ns2);
ns2.play("sukh_beneath.flv", 1);

And 4 more, which I've left out to be concise. I want to pause them with
function pauseVid(){
this.ns1.pause();
for(i=1;i<7;i++){
this["ns"+i]pause();
}}

The commented out line:
this.ns1.pause()
works, but when I try it in a loop it can't access it?

View 1 Replies


Similar Posts:


ActionScript 2.0 :: Access NetStream Or MovieClip From Loop

Jan 26, 2010

I've got a load of videos
ActionScript Code:
var ns1:NetStream = new NetStream(nc);
container1.compMa.theVideo.attachVideo(ns1);
ns1.play("sukh_diesel.flv", 1);
[Code] .....
Works, but when I try it in a loop it can't access it?

View 3 Replies

ActionScript 3.0 :: Access MovieClip Properties In For Loop?

Aug 28, 2009

i have 10 movieclips mc1_mc-mc5_mc and coin1_mc-coin5_mc on stage i aded listeners in for lop tat is working.when i click mc1_mc i want to make coin2_mc-coin5_mc invisible and coin1_mc and if i press mc2_mc then coin2_mc should wil b visible others invisible.i used folowing code but when i click any movieclip every objects in stage is becoming invisible.

Code:
for (var i=1; i<6; i++)
{
["mc"+i+"_mc"]addEventListener(MouseEvent.CLICK,clicked);
}

[Code]....

View 5 Replies

ActionScript 3.0 :: How To Access Netstream Object Of Video

Jun 18, 2009

I am doing video.attachNetstream(ns) in the videoContainer's parent movieclip. How do I access the netstream object of the video inside the container. Basically, I want something like this : video.getNetstream(). Does any equivalent exist?

View 0 Replies

Flex :: Streaming - Access Raw Outgoing NetStream Data In AIR?

Jun 29, 2011

I have a Flex/AIR desktop application that connects a local camera and microphone to a NetStream for delivery to a Flash media server.However, I would also like to archive a copy of the outgoing stream locally on the filesystem. Is there any access to the actual bytestream of a NetStream object (even in the dreaded mx.internal namespace) that I could turn around and feed to a FileStream for the local archive?

View 1 Replies

ActionScript 2.0 :: XML Nested Loop - Access The Loop Later?

Feb 19, 2007

Basically, I have data organized by date in an XML file. I'm trying to make a website application that will allow the user to click on a date (in a text field) to see another textfield populate with all the data under that particular date. So far, all the information loads into the textboxes at the same time. How can I get it to only load information under a particular date when somebody clicks on that date?

Before I started this project, I was convinced I could do this by manipulating the [j] (see code below) in the myFunc2 function. Currently, it's set up to increment blank_mc._y by whatever value is returned by [j]. But for some reason this doesn't work. I feel that if I could atleas get this part to work - I could probably do the rest.

AS code:

Code:
function loadXML(loaded) {
if (loaded) {
var nodes = this.firstChild;

[code]....

View 1 Replies

ActionScript 3.0 :: Attaching Netstream To Movieclip?

Jun 8, 2011

I'm trying to simply attach a Netstream to a movieclip so I can overlay things over the video when i need to.

I have the usual Netstream code:

var myVideo:Video = new Video();
addChild(myVideo);
var nc:NetConnection = new NetConnection();

[Code].....

...and I have a movieclip that is on the stage with instance "mc_flv"

View 4 Replies

Flash :: NetStream.Buffer.Full Not Fired After Call To NetStream.pause?

Jul 6, 2011

I'm making a small video players in AS3, and I've found that after calling NetStream.pause() or NetStream.togglePause(), no status messages are being fired any more.If I click the "pause" button while the video is buffering, I never get the Buffer.Full message.Here is some code:

_connection = new NetConnection();
_connection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
_connection.connect(null);[code].....

View 1 Replies

ActionScript 3.0 :: Error On BitMapData.draw() After NetStream.pause() Then NetStream.seek()

Feb 25, 2010

I am working on an app that will take a snapshot of an rtmp stream of an archived video, save it to a file, and ExternalInterface the file name to the hosting page to javascript it up for display.

I actually have all pieces working great. The only time an error is thrown is when I pause the video, seek to somewhere, and then try to take a snapshot. Then there is a runtime error of:
SecurityError: Error #2123: Security sandbox violation: BitmapData.draw: mySwf.swf cannot access rtmp://myFlashServer/myApp. No policy files granted access.I've seen post after post of suggestions and have tried them, but without success.

I have the crossdomain.xml and my FlashMediaServer security setup fine (it is actually working, except for this one glitch). It just seems to be the pause-then-seek-then-BitMapData.draw() combination which is creating issues.

Another weird thing: after the error is thrown, if I resume the stream and take a snapshot, it works flawlessly again.

View 5 Replies

ActionScript 2.0 :: MovieClip Loader - AttachVideo NetStream Listener

Oct 28, 2009

I am attaching the video
Code:
this.my_video.attachVideo(stream_ns);
How can I add a listener like the MovieClipLoader property :
Code:
var oListener:Object = new Object();
this.createEmptyMovieClip("mClip",this.getNextHighestDepth());
var mcl:MovieClipLoader = new MovieClipLoader();
mcl.addListener(oListener);//important this is after the MovieClipLoader
oListener.onLoadInit = function(mClip:MovieClip):Void {
trace(mClip+" initialized");
};
mcl.loadClip("[URL]",mClip);

View 1 Replies

ActionScript 2.0 :: Control A MovieClip Animation Based On A NetStream Event?

Jul 29, 2006

[URL]

What I am trying to do is get the animation of the audio levels (red bars next to the power switch) to only happen while a video is actually playing (videos are in the video gallery section). I have the animation done and I can easily get it to start and stop based on pressing the play and stop buttons, but since they start and pause the video you would get instances where the video isn't playing but the audio levels would be animated, which I don't want.

Here is an example of the code in the play button (using NetConnection and NetStream to play the videos):

Code:
play_btn.onPress = function() {
playSound.start();
infoText_txt.text = "PLAY";
my_ns.pause(spotToPlay);
};

The only way I can think to make it work exactly as I want it is to have Flash look to see if the video is actually playing or not and I can't figure out how to do this or if its even possible using the NetStream command I am using to start and stop the videos.

View 5 Replies

ActionScript 3.0 :: Error: "NetStream.Play.StreamNotFound" While Playing Mp4 File Using NetStream Object?

Jan 7, 2010

I am using NetStream, NetConnection and Video object to play an mp4 file which is hosted over a web server using http.This is an AIR application and the relevant code is pasted below:

var url:String = <some http url>;
connect_nc = new NetConnection();
connect_nc.connect(null);

[code]........

View 0 Replies

Actionscript 3 :: NetStream.info, Getting Error #2154 "The NetStream Object Is Invalid"

Mar 20, 2012

In my application I have a video playing from a NetStream. Every second on timer I update a text label with statistics like stream.info.currentBytesPerSecond. The problem occurs when the NetConnection associated with this NetStream closes: the getter for stream.info throws

[Code]...

View 1 Replies

ActionScript 2.0 :: Access Textfields In A Loop?

Nov 26, 2008

I'm trying to access some textfields that I have loaded in a movieclip in another loop. The code below doesen't work but I'm using it to illustrate what I'm after.

for(i=0; i<5; i++){
myText.text+i.text_txt._x+=100
}

[code]......

View 2 Replies

ActionScript 3.0 :: Access To Childs Created Through For Loop?

Nov 15, 2009

Image's paths are in the xml file. I make a loop to load images to the Display List.
So if i have a loop:

ActionScript Code:
for(var i:int=0;i<xmlList.length();i++)[code]....

after it is done i would have access only to the last imageLoader instance. How to get access to the rest of images, which were added to the Display List with the same name "imageLoader".I tried to call it with the imageLoader.name property,but surely i do something wrong, as only errors appear in the output panel.

View 1 Replies

ActionScript 3.0 :: Access Objects Created In A For Loop?

Jan 21, 2011

I need to be able to make a large amount of concentric circles, using only the action script. I need to be able to alter each of these concentric circles independently from each other. Currently My code is as follows:

ActionScript Code:
var circ1:MovieClip = new MovieClip();
addChild(circ1);

[code].....

View 6 Replies

ActionScript 1/2 :: Access Multiple Buttons In A Loop?

Sep 20, 2010

I have 29 buttons, named img1, img2 ....till img29...I need to access them all in a loop. I had asked this question earlier, but at that time the buttons had to be accessed via their holding movieclip, but this time the code is within the clip, so I need to directly access the button.
 
So originally the code I was using to access them was
 
_root.folioholdermc["img"+i]._alpha   //thanks to Ned Murphy
 
now I need to access them as
 
this.img2._alpha                          //due to a path change
 
I tried using
 
this.img[i]._alpha           but this is not working.
 
I want to put this in a loop where I moves from 1 to 29.

View 3 Replies

Flash :: Access Dynamically Loaded Movieclip (stage > Scrollpane > Myloader > Movieclip)?

Oct 16, 2011

what I'm trying to do is accessingsnapText = scrollPane.source.textSnapshot;from an external swf. I've tried:

trace("-->: "+scrollPane.source.textSnapshot.getText(0, 1000));
trace("-->: "+myLoader.content.textSnapshot.getText(0, 1000));
trace("-->: "+mc.textSnapshot.getText(0, 1000));

[code].....

View 3 Replies

ActionScript 2.0 :: Access Symbols Using Loop Index In Instance Name?

Nov 30, 2010

Upon the stage of my flash movie, I have several symbols (movie clips) which I need to address dynamically using a loop. The symbols that I want to address all have instance names beginning with the string "lamp_", they then each have a different number concatenated on the end to distinguish between them (e.g. lamp_1, lamp_2, lamp_3.....).

The following noobish effort I have devised is totally useless, and I am hoping someone can show me how I might get this working[code]...

View 4 Replies

IDE :: Flash Movieclip Loop Inside Of Movieclip?

Apr 18, 2010

I'm trying to create a movieclip object that contains another movieclip that continuously loops. My current problem is, no matter what I try, the embedded movieclip will not play inside the one containing it. It would be significantly more work to design the looping animations in actionscript than through using the IDE, so I would prefer not to have to dynamically create these loops.

View 1 Replies

Actionscript 3.0 :: Access Multiple Movie Clips With Loop And GetChildByName?

Nov 3, 2010

All i really want to do is be able to affect multiple movieclips at once with event listeners and greensock tweens.

The first snag I hit was that I couldn't create references to movie clips using the old [] Associative array referencing method. Maybe I still can with AS3, but I couldn't get it to work...

So I found another technique using getChildByName that returns a reference to a movie clips and allows me to store that reference in a variable.

However, the movie clip I'm trying to affect with an event listener resides inside of another movie clips, so to build the address (aka, root.mc1.m2.mc3) to the mc I want to get to is proving to be difficult. (I'm very new to AS3...)

I thought the trace(target1_mc.target2_mc.name); at the bottom of the following code would output the name of target2_mc but it doesn't.[code]...

View 2 Replies

Actionscript 3 :: Access A Movieclip On The Main Timeline From Within A Movieclip?

Mar 6, 2012

Working on an RPG type flash, and I have to be able to control a text-box from quite a few locations. The one that is causing me trouble is the inventory. I need to be able to access the textbox with an instance of "statusWindow" from within the inventory clip (instance name "inventory"), so when I mouse over an item within the movieclip it will change the status window on the stage.In this instance I want to mouse over inventory.invHealth from the main timeline to get the display.itemName and itemProps are strings containing information about the item.I tried the following but it gave me a "possibly undefined" error.

invHealth.addEventListener(MouseEvent.MOUSE_OVER, itemStats);
function itemStats(e:Event):void
{
root.statusWindow.text = itemName+"
"+itemProps;
}

View 1 Replies

ActionScript 3.0 :: Access A Movieclip Via Its Instance Name In Another Movieclip Class?

May 28, 2011

how can i access a movieclip via its instance name in another Movieclip class?

and a nother question how can i access a movieclip via its class name in another movieclip class?

BTW i want to access the movieclip child

View 4 Replies

ActionScript 3.0 :: Access A Child Of A Movieclip Without Using The Movieclip Name?

Aug 13, 2009

I've got a dozen movie clips on stage, each with 3 children, and each of those have 8 children, as example named u01-u08.

Is it possible to access u01 directly without the parent names? like a wildcard? like the xml way of getting to nodes with a .. ?

sort of like: stage..u01.alpha = .5;

View 10 Replies

ActionScript 3.0 :: Access To Variables By A MovieClip In A MovieClip

Jul 15, 2010

I'm making a fighting game and so far all the controls are good, characters can walk, run attack etc. My problem: The character is a MovieClip, Guy, and is exported to a class Guy. In Guy.as I have a boolean "hitting" which is set to default "false". If the Guy object hitTests an enemy while "hitting" is true, the enemy will take tamage.

In the Guy MovieClip there are about 7 frames, each with its own animation. 3 of those frames are attacking animations in form of MovieClips, i.e, if we click them we get another set of frames. Say one of the attack MovieClips has 10 frames in it, frame 7 of 10 is where the punch actually lands, this is when I want the enemy to take damage, not before (while the character is still moving his hand forward). Seeing as this frame is inside a MovieClip which is inside another MovieClip(Guy), is there a way to access the property "hitting" with this inner frame?

View 4 Replies

ActionScript 3.0 :: NetStream.Connect.Closed - Know Which NetStream Has Been Closed

Aug 2, 2010

A NetStatusEvent with info.code of "NetStream.Connect.Closed" is dispatched by NetConnection when a NetStream is closed. This seems kind of weird, shouldn't the NetStream dispatch the event? how do I know which NetStream has been closed if I have more than one running (which I do)? I need to know so I can cleanup the now dead stream.

View 1 Replies

ActionScript 3.0 :: Can't Access Movieclip Within Movieclip

May 9, 2010

I want to access the properties of movieclips inside a movieclip.

Below is a code of how the Parent mc is created. It's looped because it's gets it data from XML. So there is not one parent movieclip but a number of parent movieclips depending on how many items the XML contains:

Code:

function doComplete(e:Event):void {
//create a new variable to store an instance of the XML class. We pass through the data from the XML file.
var xml:XML = new XML(e.target.data);

[Code]....

View 2 Replies

Flash :: TypeError: Error #1009: Cannot Access A Property Or Method Of A Null Object Reference. At Videogame_fla::MainTimeline/loop()?

Feb 2, 2012

I keep getting the #1009 error coming up, i checked that everything was on my stage and was named correctly.This is the error message that comes up:TypeError: Error #1009: Cannot access a property or method of a null object reference.at Videogame_fla::MainTimeline/loop()Here is my code:

var carrot:Number = Math.floor(Math.random() * 460) +0;
var carrot1:Number = Math.floor(Math.random() * 460) +0;
var carrot2:Number = Math.floor(Math.random() * 460)+0;

[code].....

View 2 Replies

ActionScript 3.0 :: How To Get MovieClip To Loop

Apr 21, 2011

I have created an bar of thumbnails and added as3 code so that the imagebar scrolls to the right or left depending where the mouse pointer is located. However once you reach the end or beginning of the clip it just stops. How can I make it loop to beginning or end (depending on which way you're scrolling?? I'm very new to Flash and as3 as a warning.

Here is my code so far.
MovieClip(root).addEventListener(Event.ENTER_FRAME, enterFrameHandler);
function enterFrameHandler(event:Event):void{if (MovieClip(root).mouseX > 600 && mouseX < 800 && mouseY > 450){imgBar.nextFrame();
}if (MovieClip(root).mouseX > 800 && mouseY > 450){imgBar.nextFrame();
imgBar.nextFrame();
}if (MovieClip(root).mouseX < 300 && mouseX >100 && mouseY > 450){imgBar.prevFrame();
}if (MovieClip(root).mouseX < 100 && mouseY > 450){imgBar.prevFrame();imgBar.prevFrame();}}

View 4 Replies

AS2 :: Loop Through Movieclip Elements

Apr 26, 2011

I got a Flash AS2 website and I need to get all the buttons inside an instancied movieclip (to define an specific property for each one). I've been searching for an hour or more, but I just got solutions for AS3

View 2 Replies







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