Flasher Archive

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


Subject: Re: FLASH: Rewind/forward/stop question(continuous feedback?)
From: Shaun Brazier
Date: Thu, 3 Feb 2000 23:15:03 GMT

Hi Yann,

I have included an excerpt from a tutorial by Bill Tagliaferro that taught
me about Continuous Feedback Buttons. This might be helpful to you.

Regards

Shaun

P.S I have lost the URL to the tutorial so this is why I have included the
text!
Step-by-step
Overview:
Continuous feedback buttons (CFB) have numerous applications, one of which
was mentioned above. Another application might be similar to the one used in
this tutorial where the CFB magnifies an image. The whole process can be
summarized as follows:

Definition of Variables or Actions.

Building a continuous feedback loops.

Assigning button actions for the loop.


----------------------------------------------------------------------------
----
Background

CFB's can be built in a number of ways. It's more important to understand
the theory behind a CFB than the mechanics of building one. Basically, a
continuous feedback loop in what programmers call an "infinite loop" in the
sense that nothing within the loop itself stop it once it has started. What
save this loop from being truly an infinite loop is a button. The button can
start the loop and then interrupt it to stop.




Definition of Variables or Actions.
As with any good Flash movie planning starts first. Think about your CFB
application. What is the CFB going to control, variables or actions?
Variables can be assigned to specific instances of movie clips or they can
be global. For example, in this tutorial the image that is magnified is
named "mouthman" and I have assigned a variable to it called "scaleval". The
CFB's (i.e. the "+" and "-" buttons) in this tutorial increase or decrease
"scaleval" which in turn becomes the Scale Property for "mouthman".

The point is this, pick variables names that relate to what the CFB will do.
Then decide whether the variable should be global or assigned to a specific
instance of a movie clip. In this tutorial we will assign the variables to
the "mouthman" movie clip.

One last point. There can be many application where variables are not needed
for a CFB. An example might be where your actions just move a movie clip to
the next or previous frame.

The first step is to define variables and assign them to your movie clip. In
this case I want to scale an instance of mouthman to simulate magnification.
The variable I will use to keep track of the current scale value is
"scaleval".
At this point I have an instance of mouthman on stage, that is named
"mouthman", and two buttons, one for "+" and the other for "-".
To define a variable all you have to do is set it. In this case we want to
define a variable of "mouthman" as "scaleval" and initially set it to 100
(for 100%).
Double click on the first keyframe and assign the following actions:

Set Variable: "scaleval" = 100
Stop



Building a Continuous Feedback Loop.
Now create another new movie clip (CTRL + F8). Name this clip "Button +
Trigger".
This movie clip will have three frames all of which are keyframes, so insert
two more keyframes (F6).
Double click on the first keyframe and give it an action of "Stop".
Double click on the third keyframe and give it an action of "Go to and Play
(2)"
Double click on the second keyframe to open its Frame Properties window and
click on the Action Tab.
Assign the following action to this frame:

Set Variable: "/mouthman:scaleval" = /mouthman:scaleval + 10
Set Property ("/mouthman", X Scale) = /mouthman:scaleval
Set Property ("/mouthman", Y Scale) = /mouthman:scaleval


Go back to your main movie and drop an instance of this clip on stage.
Give it the name "uptrigger".


Now create another new movie clip (CTRL + F8). Name this clip "Button -
Trigger".
This movie clip will have three frames all of which are keyframes, so insert
two more keyframes (F6).
Double click on the first keyframe and give it an action of "Stop".
Double click on the third keyframe and give it an action of "Go to and Play
(2)"
Double click on the second keyframe to open its Frame Properties window and
click on the Action Tab.
Assign the following action to this frame:

Set Variable: "/mouthman:scaleval" = /mouthman:scaleval - 10
Set Property ("/mouthman", X Scale) = /mouthman:scaleval
Set Property ("/mouthman", Y Scale) = /mouthman:scaleval


Go back to your main movie and drop an instance of this clip on stage.
Give it the name "downtrigger".



Assigning Button Actions.
Drop two instances of any button into your scene.
Add a "+" label one and a "-" label to the other.
Double click on the "+" button and add these actions:

On (Press)
Begin Tell Target ("/uptrigger")
Go to and Play (2)
End Tell Target
End On
On (Release)
Begin Tell Target ("/uptrigger")
Go to and Stop (1)
End Tell Target
End On


Double click on the "-" button and add these actions:

On (Press)
Begin Tell Target ("/downtrigger")
Go to and Play (2)
End Tell Target
End On
On (Release)
Begin Tell Target ("/downtrigger")
Go to and Stop (1)
End Tell Target
End On


flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and The Flash Film Festival
"The World’s Premier Flash Solutions Conference and Expo"
March 27-29, Nob Hill Masonic Center, San Francisco, California

-Register before Feb 25 and save $200!!-- www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  Re: FLASH: Rewind/forward/stop question(, William Skyvington

Replies
  FLASH: Rewind/forward/stop question, Yann Poirier

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