Flasher Archive

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

Subject: RE: [flasher] Re: Telltarget and Load movie issue
From: AndyA
Date: Tue, 27 Feb 2001 19:50:57 -0000

Hey CPU,

I'm not sure I exactly understand what your issue is, but it seems in this
posting that you are saying that you would like to use a button to load
various different movies without the button knowing which movie would come
next (or something like that). Given that I haven't really grasped your
issue, I'm not sure that my suggestion will help, but you never know...

Instead of using a button, use a movieclp. In the movieclip you create a
timeline with three frames and the graphic content you need. Then you can
include a dynamic text field for the button text called buttontext. On a
separate layer, insert an invisible button (one with only hit area defined
and nothing in the other three frames) which covers the surface of your
button graphic in the movieclip. Click on the invisible button and program
on (rollOver) {gotoAndStop (2)}, on (rollOut){gotoAndStop (1)}, on (press)
{gotoAndStop (3)}, where 1 is the graphic of your button Up, 2 is the
graphic of your button Over etc etc

The new button movieclip (let's call it buttonMC) is now targettable. This
gives you lots of options in terms of control. For example, you could set
the buttontext = filename, where filename is the name of the swf you want to
load. You can then program the invisible button with:

on (release) {

filename = buttonMC.buttontext
loadMovie (filename}
buttontext = filename2

This would load the movie, change the button text to display the name of the
next movie, so that when the button was next released it would load the next
one etc... you can add variables to the movieclip buttonMC and control it as
you like. The possibilities are nearly endless.

Why Macromedia doesn't allow for dynamic buttons that are addressable I
don't know... they are after all little movie clips, one should be able to
give them an instance name.



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