Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: FLASH: action script/tell target query
From: SUGAR in their vitamins?
Date: Tue, 23 May 2000 01:37:44 +0100

hello,

this is going to be a bit long (sorry), but i have
many questions cos i'm stumped.

i am implementing a flash navbar for a website.
the content itself will be static html, leaving the
flash to control the pages, so to speak.

the navbar has a "parent" set of buttons that in turn
activate a "child" set of buttons:

---------------------------------------------------------
|
| PARENT BUTTON 1 PARENT 2 PARENT 4 ETC
--------------------------------------------------------
| child button 1 child 2 child 3
-------------------------------------------------------

my client has requested that the following behavior occur:


_ on roll-over, the child menu rolls down and these two
(the parent and child) corresponding areas "stick" allowing
someone to use the child navigation directly.

_ the parent buttons will not call a Get URL to any html
pages. they will only need to control the child navigation.
however, upon clicking on a child link, this should
take the user to the corresponding html page.

_ unless the user rolls over any other of the parent
button, the current "selected" parent/child option should
remain active, even on roll out.


i have 5 parent buttons in this navbar. i am using six scenes
in the fla (including the base scene). each scene is for
the corresponding child area. i have six frames in each scene.

on the base scene, i am using a single layer for
all actions. the first frame i am using an
action script as:

If (location eq "about")
Begin Tell Target ("/aboutUs")
Go to and Stop (about, "About us")
End Tell Target
Else If (...

Else
Stop
End If

each of the other frames (in the actions layer) in this fla
has only a Stop action.

i have separate layers for the parent and each child
button areas in each scene of the fla.

on the home scene, i am only labelling the frames for
the different child areas.


each of the corresponding scenes uses a similar framework.
in the first frame of the actions layers for a given child
scene (man, i hope this is making sense!) i have the following
actionscript:

If (location eq "services")
Begin Tell Target ("/ourServices")
Go to and Stop (services, "Our services")
End Tell Target
Else If (location eq "...

Else If (location eq "about")
Get URL ("about.us.html")
Stop
End If

in other words, if "about" is the scene you're at,
then call the correct URL and so on. (this might be
wonky, and might be smarter to put into the child
buttons themselves?)

each of the other frames uses a Stop action, just as in home.

ok, in this example child scene ("about"), the parent
button is now replaced with a movie clip which i have given
the Instance label "aboutUs" that i was calling with the
tell target in the home scene.
the movie clip doesn't have any other behavior. it
is meant to indicate that you here (here, being the
"about us" child area). this movie clip shows the
highlighted state of the parent link on rollover to
help indicate this.


going back to the parent links, each button has
actions (inside the fla itself) like this:

On (Roll Over)
Go to and Stop ("frame label x")
End On
On (Release)
Go to and Stop (scene, "frame label x")
End On
On (Roll Out)
Go to and Stop ("home base")
End On

i chose to use <current scene> for these
because each of the child scenes mirrors the
home scene with the exception of the
specific parts that refer to the scene one is at.
i think this might also be a bit clunky, but
when i tried to condense it all into one
scene, i wasn't able to get the behavior i wanted
at all.

i'm wondering if there is a smarter way to implement
this part of the structure as it seems like i'm
just duplicating the home scene and only changing
one or two things.ie to reference the
bits in the home scene which will always be constant,
and only have the appropriate corresponding changes for any given
child scene? i sort of tried this, but the behavior
was not as i expected.

the corresponding child buttons in these areas use
action scripts like this:

On (Release)
Go to and Stop ("scene x")
Get URL ("y.html")
End On


in the html, i've done the following to assist in
changing urls:

<PARAM NAME=movie VALUE="testing.swf?location=X">

where X is whatever scene should be at.

i think this should cover everything i've done with
this flash movie.

the problems i'm running into are:

_ when i roll-over the parent buttons, i can't get them
to "stick" on roll-out without a mouse click
and even then, if the user rolls out anywhere,
the parent button highlighting remains, but the
child navigation cannot be retained, which the
client claims is counter-intuitive.
and i don't blame her because it actually makes
understanding what is going on very confusing.
somehow, there needs to be a dynamic relationship
between where you are and what you're rolling-over.
the click is acceptable for the client, but it
should also behave the same on a roll-over. in other words:

1. default state

2. roll over parent button a

3. parent button is highlighted and corresponding child
navigation rolls out and stay there.

4. if a user rolls over one of the other parent
buttons, then undo 3, and highlight this new
parent, roll out its child links and stay.

if a user rolls out anywhere that is not another
parent button, do not do any roll out behavior
unless another parent button is then rolled over
and/or clicked on.

does this make any sense?

i'm thinking, a possible compromise might be a
an on/off type of clicking function on the button?


_ when i click on a child button and get moved over
to x url, i can't seem to figure out how to
show in the navbar on this different page,
where you are in the scene. it always comes up
the default condition (ie, nothing "selected").

_ the client does not want to use frames to implement this.


i'm not really a programmer. after a lot of trial
and error, i thinnk i'm a little better than fumbling
with the action scripts :), but clearly, i've reached
the limit of my expertise.

what am i doing wrong? how can i make this work?

if you want to look at an example, you can go to

http://www.webworksconstruction.com/idem/index_05.10.html

if you have any questions, cos it is a bit confusing
to me at times as well, please ask.

many thanks in advance.

hasta. --dk



Yes. Beautiful, wonderful nature. Hear it sing to us: *snap* Yes. natURE.



flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
World Animation Celebration - Big Internet Animation Pow Wow Discount Offer

Register before May 25 mention flasher and save 25%!! www.wacfest.com

Be discovered, get a job or have your web series picked up. A big talent search for Shockwave
and Flash animators is happening May 30-June 4 in Hollywood. Featuring Rob Burgess, Matt
Groening, Brad Bird and more. www.wacfest.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  Re: FLASH: action script/tell target que, Marc Hoffman, Poison Dart

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]