Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

a simple thing whit frames and buttons(I think!).

Status
Not open for further replies.

gigar

IS-IT--Management
Oct 19, 2006
2
0
0
MX
Hi everyone!! I’m a newbie with the entire macromedia SW, for now I’m just trying to make a presentation in Director.

Well.. my problem is:

How can I do to.. click on a button and go to a specific frame, then go back to the frame where the button was clicked and see this selected button marked in some way or changed for a new sprite???

I thing it can’t be very difficult but I have tried for hours and at this time feel stupid.

can any one help me?? Any help will be appreciated. thanks !!
 
Frame 1:
A button "goToFrame10Button"
A frame loop script in the script channel (so that the playhead stays in this frame)

Frame 10:
A button "goBackButton" (in the different sprite channel from the button in the frame 1)
A frame loop script in the script channel (so that the playhead stays in this frame)

The task:
If you click "goToFrame10Button" the movie goes to the frame 10. Then if you click "goBackButton" in the frame 10 the movie goes back to where it comes from (frame 1). When you are back to the frame 1, the "goToFrame10Button" is now changed to "goToFrame10ButtonVisited".

The frame loop script:
Code:
on exitFrame me 
  _movie.go(_movie.frame)
end exitFrame

The behaviour script attached to "goToFrame10Button":
Code:
on mouseUp me
  global gFrameToGoBack
  gFrameToGoBack = 1
  sp = sprite(me.spriteNum)
  sp.puppet = true
  sp.member = member("goToFrame10ButtonVisited")
  _movie.go(10)
end mouseUp

The behaviour script attached to "goBackButton":
Code:
on mouseUp me
  global gFrameToGoBack
  _movie.go(gFrameToGoBack)
end mouseUp

Kenneth Kawamoto
 
thank you very very much kennethkawamoto. your post is very well expleined and very usefull for me. thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top