Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
| Subject: | Re: FLASH: Variables, navigation & LoadMovie |
| From: | Randy Kato |
| Date: | Thu, 19 Oct 2000 15:58:51 +0100 |
Richard,
In your If statements you're using an assignment operator "=" rather than an
equality testing operator "==". It's a common mistake, I try to remember it in
terms of double-checking. So when I want to check if the value of myVar is x
then I think in terms of "double-checking" to make absolutely sure, thus two
equals signs, If (myVar == x).
HTH,
Randy
Oh, and regarding the "Num" appendage, here's the skinny straight from the Flash
team...
"...when using an
expression path such as myMC.target the compiler has no way of
identifying if that is an actual target movie clip or if that is a
variable containing a number. The new actions have Num at the end specifying
Level, and the original acction
names will be used when specifying a Target.
So there will be the following:
loadMovie (target) and loadMovieNum (level)
loadVariables and loadVariablesNum
unloadMovie and unloadMovieNum
print and printNum
printAsBitmap and printAsBitmapNum"
Richard wrote:
> Hi there
>
> A simple question:
>
> I'm using variables to establish a navigation system for a Flash based site.
>
> There are four "galleries" each of which are seperate swfs and are loaded
> into level 2.
>
> >From the main navigation frame, a user clicks, say the Gallery 1 button
> which does the following:
>
> on (release) {
> gotoAndPlay ("gallery trans", "transition");
> gallery = "1";
> }
>
> A transition scene is thus played and the variable gallery is set to "1". I
> need the variable so that I can load the correct movie after the tranistion
> scene depending on the button clicked.
>
> Then on the last frame of the transition scene, the following action plays:
>
> if (gallery="1") {
> loadMovieNum ("G1A.swf", 2);
> } else if (gallery="2") {
> loadMovieNum ("G2A.swf", 2);
> } else if (gallery="3") {
> loadMovieNum ("G3A.swf", 2);
> } else if (gallery="4") {
> loadMovieNum ("G4A.swf", 2);
> }
>
> Trouble is, I can't get the other movies to load - only G1A.swf loads and it
> does so regardless of the button pressed. I infer from this that there is a
> problem either with the setting and reading of the variables OR with the
> if...else if statements in the above frame action.
>
> I've run out of debugging ideas. This is my first attempt at ActionScript
> and I'm certain I'm doing something pretty obviously wrong.
>
> I hope someone can help me!!
>
> Cheers
>
> Richard
>
> PS what is the difference between loadMovieNum and loadMovie? In the
> ActionScript reference manual, I can find no mention of the former yet that
> is what is used when I click loadMovie in the scrtipting dialog box.
--
'''''' ' ' ' ' ' ' ' ' '
Randy Kato
Director of New Technology Development
Braincraft
627 Broadway, Suite 504, NYC 10012
T 212.539.1680 F 212.539.1741
http://www.braincraft.com
...... . . . . . . . . .
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NudeGuru.com is proud to sponsor the Flasher list
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IT'S THE ART OF MONEY, HONEY!
Tips and Advice from some of the most popular Flash
artists + industry power-brokers on how to hold onto
your rights, negotiate contracts and get full value
for your work.http://www.nudeguru.com from Franke James
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email help
Replies
FLASH: Variables, navigation & LoadMovie, Richard
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]

