Flasher Archive

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


Subject: FLASH: Re: Reuse Actions: Call statement
From: CARL
Date: Thu, 16 Sep 1999 10:42:11 +0100




Hi Waldo,

>I read in the Flash Book provided with flash 4 about reusing functions
>by using the call statement.
>But I don't really understand it. Is there someone who can explain it to
>
>me clearly?
>I prefer some clear code samples, or a link to a good tutorial.
>
>By the way.... is that Call statement only for better function
>management, or does it also cost less bites?
>
>Who can help me?
>
>Waldo Smeets


The call function allows you to reuse a script. By putting a script into
labeled frame you can call that script.

For example:
1. Make a movie with three key frames in the maintime.
2. In frame one put a stop action.
3. In frame 2 label the frame 'action1'
put an action in the frame 2 such as
trace("hello")
4. In frame 3 label the frame 'action2'
put an action in the frame 3 such as
trace("goodbye")
5. In frame 1 make 2 buttons.

6. Assign an action to the button one such as:

on press
call("action1")
end

7. Assign a different action to button two such as:
on press
call("action2")
end


On clicking each button a call is sent to your script in frames labeled
'action1' and 'action2' which are then executed. This is a very basic
example for a good working example check out the calculator that come with
Flash 4 samples under the help menu.


HTH

Carl



------------------------------------------------------------------------
To UNSUBSCRIBE send: unsubscribe flasher in the body of an
email to list-manageratchinwag [dot] com. Problems to: helpatchinwag [dot] com
N.B. Email address must be the same as the one you used to subscribe.
For info on digest mode send: info flasher to list-manageratchinwag [dot] com


Replies
  Re: FLASH: Re: Reuse Actions: Call state, 2Nerotik

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