PDA

View Full Version : [AS3] Where an error???


xchild
03-10-2009, 05:19 AM
I can not understand, anybody can will prompt me. How to make, what after a player stop would be loaded next flv file??? I tried to use here this script... :confused:

listenerObject.stateChange = function(eventObject:Object):Void {
if(player.state == "stopped")
player.contentPath = "paul.flv";
};

zealouse
03-10-2009, 11:11 AM
your syntax is not right you need to close your statements with "}"

listenerObject.stateChange = function(eventObject:Object):Void {

if (player.state == "stopped") {
player.contentPath = "paul.flv";
}

};

xchild
03-10-2009, 04:02 PM
your syntax is not right you need to close your statements with "}"

listenerObject.stateChange = function(eventObject:Object):Void {

if (player.state == "stopped") {
player.contentPath = "paul.flv";
}

};

A-a-a? not work!!!!!!!!!! Player stoped, but not load paul.flv.......

CyanBlue
03-10-2009, 04:42 PM
Howdy and Welcome... :)

Trace the value of player.state and see if the if condition is really met and go from there...

xchild
03-11-2009, 12:19 AM
Pleace HELP ME!!!!!!!!!!!

Rossman
03-11-2009, 12:48 AM
Relax, you haven't even given us enough information to help you. First off, that code looks like it could be old AS2 code. So, are you using AS2 or AS3? Also, are you using the FLVPlayback component, or creating the video manually with NetConnection/NetStream?

xchild
03-11-2009, 01:11 AM
Relax, you haven't even given us enough information to help you. First off, that code looks like it could be old AS2 code. So, are you using AS2 or AS3? Also, are you using the FLVPlayback component, or creating the video manually with NetConnection/NetStream?

I'm Using AS2, and FLVPlayback component. And, i don't know there is i must to write this code: on blank frame, on FLVPlayback component frame or on action of FLVPlayback component???

I am sorry for errors - my English is bad, I'm badly went to school...