DBY
Who's Online
0 registered (), 7 Guests and 6 Spiders online.
Key: Admin, Global Mod, Mod
Latest Photo Gallery
light pole in the water
Eastern State Penitentiary - Philadelphia
Top Posters (30 Days)
Anartist 14
HarryB 12
Goofy 10
FinalDJ 10
m2h 8
Fitzy 5
Meph 2
Doorslammer 1
Nightowl 1
Dough 1
Topic Options
#10502 - 12/19/01 12:31 AM experimenting with flash...
Anonymous
Unregistered


hiya! fox's friend returning from the great beyond.

anyway, i've been experimenting with flash for my website and for the company i work for. animation and drawing stuff is easy enough, but i'm having trouble w/ user interaction.

we have a scene with the side view of a house and you can see each room, which each have individual animations going on. my boss wants me to make it so that when a user runs the mouse over a room, all animations in the other rooms stop and dim while the room's animations continue looping and a text box pops out. i don't know if it'll be easy to explain, but can anyone try? i'd really super duper appreciate it. :)


Top
#10503 - 12/19/01 05:01 AM Re: experimenting with flash...
Mr_Blog Offline
human

Registered: 06/06/01
Posts: 13762
Loc: ${PWD}
Easiest way i can think of right now is to have each room be a single movie clip, named "clip1", "clip2", etc. Each of these movie clips has a frame (not in the normal loop...probably placed in a frame following a "gotoandplay 1" action) containing a semi-transparent shape on the top layer.
they each have an invisible button in them as well.

OnMouseover
Set Property ("",name) = "this"
loop while n <= 4 (where 4 is the number of rooms)
n = n+1
tell target "/clip"&n
gotoandstop "10" (where 10 is the frame number of the semi-transparent shape)
Tell target ("")
gotoand stop 15 (where 15 contains the text box)

OnMouseout
Set Property ("",name) ="clip1" (assuming the current clip IS clip1)
loop while n <= 4
n = n+1
tell target "/clip"&n
gotoandplay "1"


I haven't done any actionscript in several months, and this is kinda jumbly mumbly cross between 4 and 5...but this is basically it. If i ever get my brain started, i'll see about making it easier to understand.




Hey kid, can you help me find my blog?
_________________________
( o_
/ >) My 84-year-old non-techy mom uses Debian Linux. It ain't that hard.

Top
#10504 - 12/19/01 05:36 PM Re: experimenting with flash... [Re: Mr_Blog]
Anonymous
Unregistered


thanks for your help! i'm a beginner at this though, so i have a few questions...

- what do ' Tell target ("") ' and ' tell target "/clip"&n ' do?

- where do each of the loops end?

- do all these actions apply to the invisible button in the movie clip?

thanks soooo much again for the trouble mr. blog!


Top
#10505 - 12/19/01 05:48 PM Re: experimenting with flash...
Mr_Blog Offline
human

Registered: 06/06/01
Posts: 13762
Loc: ${PWD}
Tell Target is actually v4 specific...i think in Flash 5 it's "with".
What it does is pass commands to a movie clip...you can tell a specified movieclip (or the main timeline) to go to specified frames with this action.

The "cilp"&n is an expression...rather than using a particular movie clip's instace name (clip1 for example) this first determines what the value of n is, and hooks it onto the end of the string "clip". So if it is determined that the value of n is 2, "clip"&n will be read as clip2, and so the tell target will apply to clip2. This is very helpful when you want to tell several movie clips to do the same thing, which is where the loop comes in.
the loop basically just specifies the value of n as "1" to begin with, tells "clip"&n (clip1) to go to a frame, adds 1 to n, and then repeats the process. when n reaches the value of the total number of movie clips, the loop ends, and the script can then continue.


- Mr. Blog
#blogXtacy on BlogNet
_________________________
( o_
/ >) My 84-year-old non-techy mom uses Debian Linux. It ain't that hard.

Top
#10506 - 12/20/01 11:40 AM Re: experimenting with flash... [Re: Mr_Blog]
Anonymous
Unregistered


ohhh ok that makes much more sense. i'm using flash 5, so i used the with statement. i have just onnnne more question... :)

why do you need to set the name property to "this" and "clip#" at the beginning of each on statement?

thanks for your explanations. you've been very very helpful. :D


Top
#10507 - 12/20/01 04:04 PM Re: experimenting with flash...
Mr_Blog Offline
human

Registered: 06/06/01
Posts: 13762
Loc: ${PWD}
Changing the name of the current movie clip prevents it from being targeted during the loop.
Naming it back to it's original name when you mouse out allows it to be targeted when you mouseover a different clip.

- Mr. Blog [image]http://www.digital-boneyard.com/wwwthreads/files/20281-team.gif[/image]
#blogXtacy on BlogNet
_________________________
( o_
/ >) My 84-year-old non-techy mom uses Debian Linux. It ain't that hard.

Top



Moderator:  Doorslammer, Nightowl, NightShade, Rez 
Shout Box

Today's Birthdays
No Birthdays
May
Su M Tu W Th F Sa
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31