Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How?Animated release that doesn't abort & boomerang 3

Status
Not open for further replies.

mjstone323

Technical User
Jan 11, 2002
57
US
Me again. (only so as to avoid serious brain cramp)

I looked for a tektip for this but there was only a complete one for Flash 4, using tellTarget.

On the release of my buttons, I would like to have a movie clip replace the button and play completely, once, not looping (because it will result in another window opening)on release. If I just drop it in the "down" state, upon release, the animation aborts and it reverts to the "up" state. (Of course, when the focus is back on the first window, I want the button back. I know - how demanding can you get?)

oldnewbie sez to use dot syntax - would he or someone else walk me through how that's done? The movie clip is labeled "fsl_down".
Thanks in advance!
Marianne
P.S. As usual, I'm gonna keep combing the net & my books for an answer! I'll post if I get it.
 
Would like to help you out... But don't understand what you're saying or wanting!
Maybe a link to what you've got... Better to a .fla.
And there's allways e-mail!

Regards,
new.gif
 
Hi Marianne,

The way to solve your problem is not to put the clip inside the down state of your button which I think is what you're doing at the moment.

What you need to do is have a completely separate clip for fsl_down and trigger its action from the button remotely.

Put this script on your button...

on(release){
fsl_down.gotoAndPlay(2);
}


If you add a blank keyframe containing a stop() action to the start of the fsl_down clip you'll be able to place it on the stage and have it be invisible - the button will then set it playing from frame 2 (i.e. it will suddenly appear). If you want your button to disappear while this is happening then place the clip in the layer above the button.

Dot syntax is just a shorthand way of addressing your movieclips and the methods and properties that apply to them(methods are the functions movieclips can perform such as gotoAndPlay(2) in the above example, and properties are the things you can set within a clip such as its position or size).

If, for instance, you had two clips (clipA and clipB) and they were both sitting on the main timeline you could set their x position on the stage like this...

clipA._x=100;
clipB._x=150;


(Alternatively you could write this...

_root.clipA._x=100;
_root.clipB._x=150;


which does exactly the same thing but is an absolute path to the clips - _root is the same as the main timeline)

Notice how the different sections of the statement are separated by dots? They're the key to talking to clips and variable in your movies.

What if clipB was actually inside ClipA - a nested clip? To set its x position you would do this...

_root.clipA.clipB._x=200;

This could go as far as you like with a clipC inside of clipB etc.

It's probably a bit much to take in all in one hit but for starters just think of it as a way of replacing tellTarget by naming the clip you want to call, adding a dot and then telling it what you want it to do (or where you want it to go).

It becomes really easy when you've done it a couple of times.
 
Thank you!!! That's a great explanation - I see the main thing I wasn't getting was the blank frame at the beginning of my release animation.
I haven't had a chance to do this yet - when I do I'll post again!
Mille grazie!
Marianne
 
I look at it like a mailing address only in reverse...

2525 Oak Street Columbus, Ohio USA

USA would be the _root
Ohio would be inside the USA
Columbus would be inside Ohio
Oak Street is in Columbus
2525 is on Oak Street

it would read:

USA.Ohio.Columbus.Oak Street.2525

This helped me to understand it when I first started with Flash and dot syntax...

Hope you are not totally confused now....X-)
Ya' Gotta Love It!
sleepyangelsBW.jpg
 
Thanks, TulsaJeff! Excellent example - I do well with stuff like that...

Okay - I tried to implement the trigger but I must have missed something because it's not working - here's what I did:

1)Created text button with up & over states & placed it on its own layer in first frame of stage.
2)Created mc of release state w/blank first frame (stop action inside) & placed it on its own layer on first frame of stage.
3)Selected button on main stage & added this ASP:

on(release){
fsl_down.gotoAndPlay(2);
}

I tested the movie - the button did its little mouseover jiggle thing but on release, nuthin'. Waaah. :-(

Did I leave something out?
Marianne
 
The most common problem is not giving the instance name of the clip: not only does your clip need a name in the library but when you drag it on to the stage you need to give it an instance name too.

This can be the same name as the library version or something completely different - there's an "instance" panel for this purpose.

If you've already done this why not post the fla and we can have a look at it?
 
WOO-HOO!
That was it!!! :)

I right-clicked the instance of fsl_down that was on the stage, selected "Instance" from the panel selections, & typed in "fsl_down" in the "Name" box. When I tested the movie, it worked - the only thing was, the first part of the button didn't disappear - but I can live with that. :) I'll save that for another day - gotta get a move on!

Valentine hugs to everyone who helped! (okay, and everyone else too!) :-X

Marianne
 
mmmmm nice hug! Hey francois, did you notice Marianne squeezed me tighter and I wasn't even involved in this thread?!!! ;-)

WOO-HOO (as Marianne would say)

dave
dave@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^​
 
What's that supposed to mean?

Must be Friday... and you must already be at the pub! LOL

Regards,
new.gif
 
Now, now... I'm an equal opportunity hugger. :) Besides, it's hard to gauge these electronic hugs - depends on your modem & all that.
MS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top