Hello there
I am stuck with a really silly example. I did this:
1. I put a Button on the stage.
2. I convert this Button into a Movie Clip.
3. I link this MovieClip to a Class like this:
import mx.controls.Button;
import mx.utils.Delegate;
class Caca{
var b1:Button;
function onLoad(){
b1.addEventListener("click", Delegate.create(this,b1_onClick));
}
public function b1_onClick()
{
b1._parent.gotoAndStop("open");
trace("HELLO");
}
}
4. I click twice inside the Movie Clip which I just created to go inside of this movie clip for the next steps.
5. I add a keyframe in the frame number 10.
6. I draw a circle on the stage inside of frame number 10 right besides the button.
7. I put "open" as the frame label for frame number 10.
8. I put stop() in the actions corresponding to frame number 1 and 10.
When I test the application, I can see the Message "HELLO", but I cannot see the circle I drew. That is to say, the gotoAndStop is not working to modify the current frame in the timeline of the movieclip as I expected. Does anyone know how to solve this?
What I do know is that if I replace b1._parent.gotoAndStop("open") with
gotoAndStop("open"), the effect is that the frame of the main timeline gets modified. Nonetheless, that is not the effect I am looking for. What I want, is changing the frame in the timeline associated with the movieclip.
Thanks in advance
Movie clip object + gotoAndStop
Moderator: General Moderators
-
thosecars82
- Forum Commoner
- Posts: 94
- Joined: Thu Apr 03, 2008 6:31 am
- Location: Arganda, Madrid
- Contact:
-
angelinjones
- Forum Newbie
- Posts: 1
- Joined: Mon Aug 11, 2008 4:43 am
Re: Movie clip object + gotoAndStop
I not a software professional to clear your doubts. I'll discuss with my friend, who is a software engineer and let her clear your doubts. Hope you'll get a remedy from other friends also.
-----------------------
Angelinjones
WideCircles
-----------------------
Angelinjones
WideCircles