Copy link to clipboard
Copied
Hi there is an problem I can't understand why this is happening
when user send one string to video class then this creates object for that request, if again user send same request then it can't create object.
1) Click on any product,
2) then guy stands and ask something
3) after that youtube video will appear <skip that>
4) you will see the form
5) fill that form or you can leave that as it is click on close button,
6) click on same product which you click last time <<< ERROR HERE
here is my video class
///////////////////////////////////
package code {
import flash.display.MovieClip;
import code.walktv;
import code.walkcamera;
import code.walklaptop;
import code.walkphone;
public class allvideos extends MovieClip{
private var video:MovieClip
public function allvideos() {
}
public function playvideo(str:String):void{ <<<this function plays videos
if(str=='tv'){
video=new walktv()
addChild(video)
video.x=502;
video.y=-51;
}else if(str=='phone'){
video=new walkphone()
addChild(video)
video.x=425
video.y=-67
}else if(str=='camera'){
video=new walkcamera()
addChild(video)
video.x=503
video.y=-48
}else if(str=='laptop'){
video=new walklaptop()
addChild(video)
video.x=500
video.y=-84
}
}
public function continuevideo(){
video.play()
}
public function stopvideo():void{
video.stop()
removeChild(video)
MovieClip(parent).gotoAndStop('reset')
}
}
}
Copy link to clipboard
Copied
rewind your video and then play it
Copy link to clipboard
Copied
It dosent work..
before remove child i stop Movieclip on frame1,
but it is not visible again.
Copy link to clipboard
Copied
show the code that does that.
Copy link to clipboard
Copied
see the code on above
I play video by playvideo function and i stop video by stop video function and i show waiting video of guy.
Copy link to clipboard
Copied
that's not rewinding the video. use:
public function stopvideo():void{
video.gotoAndStop(1);
removeChild(video)
MovieClip(parent).gotoAndStop('reset')
}
Copy link to clipboard
Copied
yes I already tried this, but this can't solve my problem. If video is stuck on last frame then it must show last frame of video but it shows nothing.
Copy link to clipboard
Copied
your last message doesn't make sense.
the code i suggested will work unless you have other code that changes video's frame and that executes after that gotoAndStop.