Contents
Articles
Behaviors
Books
Director News
Director Web Sites
FAQ
Games
Mailing Lists
News Groups
Project Examples
Reviews
Software
Tools
Useful Web Sites
Utilities
Xtras

Don't miss these
rescale
simPPTViewer1.0 Xtra
Simple projectile with gravity
Set Cast member Properties of a QuickTime
Drag Sprite with Hotspot
CSS Class
convert to upper or to lowercase
Build to order Project
Moka Xtra
Multiple languages in the same movie.
 

 

 

Behavior Back Button

Added on 7/19/1999

 

Compatibilities:
behavior D7 D8 Mac PC Shockwave

This item has not yet been rated

Author: MediaMacros (website)

Use these as the frame script for markers that should be added to the back list and on the back button. You may also want a startMovie handler that sets the 2 variables... gBack = false gBackList = []

--Copyright 1999 Chuck Neal
--chuck@mediamacros.com
--If you find this code helpful, send me an e-mail and let me know.  :-)
--Note that this is 2 behaviors to be used together.  DO not put them in the same behavior or it will not work.

--The Frame Script
global gBack, gBackList
on enterFrame me
  if gBack = void then gBack = false
  if gBackList = void then gBackList = []
  howMany = gBackList.count
  if gBack = true then --came from back button
    gBack = false
    deleteAt gBackList, howMany
  else
    if howMany > 0 then
      if gBackList[howMany] <> the frame then
        --prevents the same frame from being added twice in a row
        add gBackList, the frame
      end if
    else
      add gBackList, the frame
    end if
  end if
end

--The button script
global gBack, gBackList
on mouseUp me
  howMany = gBackList.count
  if howMany > 1 then --There is a back state
    gBack = true
    go gBackList[howMany - 1]
  end if
end

 


Contact

MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA

Send e-mail