Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | FLASH: Custom Function within an instance |
From: | Paul Steven |
Date: | Fri, 22 Sep 2000 16:53:27 +0100 |
Hi all
I am dabbling with creating custom functions in a Pacman style game I am
making.
Now I have successfully created a function which is located in frame 1 of a
layer called "Actions".
I have a movie clip on the stage that I control using the arrow keys on the
keyboard. This movie clip calls the function to check if it can move in a
certain direction. This works fine.
On my Character movie clip, I have a keyDown ClipEvent script that takes
care of the keyboard controls. I also have an enterFrame ClipEvent that
takes care of animating the character. Now there is alot of duplicate code
in my enterFrame ClipEvent code so I want to create a custom function to
reduce this code.
I have tried to place this custom function after the enterFrame ClipEvent
but I am getting the following error message:
Scene=Scene 1, Layer=Character, Frame=1: Line 13: Statement must appear
within onClipEvent handler
function Move_Me (passed_Direction) {
Anyone know why - are you allowed to place custom functions in such a place?
Any help on this matter would be much appreciated
Paul
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NudeGuru.com is proud to sponsor the Flasher list
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IT'S THE ART OF MONEY, HONEY!
Tips and Advice from some of the most popular Flash
artists + industry power-brokers on how to hold onto
your rights, negotiate contracts and get full value
for your work.http://www.nudeguru.com from Franke James
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpchinwag [dot] com
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]