Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | FLASH: z sorting to make a GUI |
From: | John McKenzie |
Date: | Sat, 24 Jun 2000 15:52:57 +0100 |
o generous and wise ones
I'm fooling around with some z-sorting actionscript to create the effect of
multiple windows similar to a standard GUI. I am aware of Praystation's
z-sorting fla, and have looked it over. My code is pretty similar. The
problem I am having with mine is that I can only bring a window from behind
another window up to the front *once*, after which time it stops working.
I am accomplishing the z sorting in this uncontroversial fashion:
In base timeline, frame 1:
Set Variable: "tempWindow" ="no"
Attached to the grabby part of the "window" movie clip:
On (Press)
Set Variable: "/:focus" = /:focus+1
if(eval(/:tempWindow)="no")
duplicate movie clip ("/spawnedWindow", "spawnedWindowTemp", /:focus)
remove movie clip ("/spawnedWindow")
start Drag("/spawnedWindowTemp")
set variable: "/:tempWindow"="yes"
else
duplicate movie clip ("/spawnedWindowTemp", "spawnedWindow", /:focus)
remove movie clip ("/spawnedWindowTemp")
start Drag("/spawnedWindow")
set variable: "/:tempWindow"="no"
end if
I have streamlined this a bit in the interest of keeping your attention.
there are actually different windows, each with their own name, and they all
use the variable "/:focus" to keep track of depth.
So basically what that does is takes a window A, makes a copy B in front of
it and deletes window A, unless the extant window is window B, in which case
it makes a copy A in front of it and deletes window B. This should work over
and over again, but what is happening, it seems, is nothing after the "else"
ever gets evaluated.
Using the output feature, I can determine that the variable "tempWindow" is
indeed getting set to yes, which would seem to force the "else" condition to
take effect.
all insight appreciated,
your humble servant,
john mckenzie
flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and the Flash(tm) Film Festival
July 24-26, 2000, NEW YORK CITY, Hammerstein Ballroom
www.flashforward2000.com
Produced by United Digital Artists and lynda.com
Sponsored by Macromedia, Adobe Systems, Fusion, Inc, AtomFilms,
shockwave.com and Electric Rain.
1.877.4.FLASH.4 or (1.805.640.6679 outside the US and Canada)
Register before June 30 and save $200!!-- www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpchinwag [dot] com
Replies
FLASH: Mysql Question off the topic, Leo Dano
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]