-
not working in embeded movie
this works fine when playing in a standalone swf, but when loaded as a module into another movie, it does not work at all. Any ideas?
this.nc = new NetConnection();
this.nc.connect("rtmp:/cinema/video");
this.NewStream = new NetStream(this.nc);
MyVideo.attachVideo(this.NewStream);
this.NewStream.play("movieToPlay");
this.NewStream.onStatus = function(returnObj) {
this.coolMovie.gotoAndStop(2);
}
Please help, my boss is freaking out because the company movie is stuck saying "buffering" while it should say "playing"...
thanks for any help.
-
Did you try it like so:
this.nc = new NetConnection();
this.nc.connect("rtmp:/cinema/video");
this.NewStream = new NetStream(this.nc);
MyVideo.attachVideo(this.NewStream);
this.NewStream.play("movieToPlay");
this.NewStream.onStatus = function(returnObj) {
// removed "this"
coolMovie.gotoAndStop(2);
}
What's happening is that inside the onStatus, "this" refers to the netStream, and not the movie clip where the code is. Taking out "this" makes it jump outside the netStream scope to look for the coolMovie.
psx
-
thanks psychlonex.
Actually I already figured it out, and you are correct. Actually, I think what you mentioned will work just fine, but I found that it also works without using "this" anywhere.
but yes, that was exactly the problem. I removed "this" from "this.coolMovie.gotoAndStop(2);", and it worked fine. It used to be "_root" as a standalone, and when I added it as a module, I thought the logical thing to do is add a path that fits. BAH! Flash makes me lose so much sleep sometimes...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|