Flasher Archive

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


Subject: Re: FLASH: Have a heart guys. Some help please.
From: Nathan Dicken
Date: Fri, 5 May 2000 13:50:03 +0100

Hi Antony,

Just so you know, sometimes it may take quite a while to get responses on
this list - some messages more so than others... To best help you out
with your question here's some sample code that hopefully can give you a
start...

The code is split up into sections to choose your mc and reposition it,
then to rescale it, and then a method that you could use to start your
sound. What you will need to do also is to "disable" a mc that has been
repositioned and rescaled after so that your code doesn't try to run on
that specific mc again. This takes into assumption that a random mc and a
target range area are both square - if you have various sized mc's and a
non-square range area (which is probably the case) then you'll need to
rework the code a little to determine the maxscale/scale for various
scenerios. This is also assuming that you will allow your scale to go
from 1 all the way to the maximum scale allowed...

On (Release)
Comment: code to make the mc appear at the mouse position...
Comment: -------------------------------------------------------
Set Variable: "rNum" = random(6) + 1
Begin Tell Target ("/mcName"&rNum)
Go to and Play ("your label")
End Tell Target
Set Property ("/mcName"&rNum, X Position) = rangeMc:_x
Set Property ("/mcName"&rNum, Y Position) = rangeMc:_y
Comment: -------------------------------------------------------
Set Variable: "mcWidth" = getProperty("/mcName"&rNum,_width)
Set Variable: "mcHeight" = getProperty("/mcName"&rNum,_height)
Set Variable: "rangeWidth" = rangeMc:_width
Set Variable: "rangeHeight" = rangeMc:_height
Comment: code here to determine specific scale for shapes that are
not square...
Comment: or the following two lines if they are both square...
Set Variable: "mcScaleXMax" = (rangeWidth / mcWidth) * 100
Set Variable: "mcScaleYMax" = (rangeHeight / mcHeight) * 100
Set Variable: "rScale" = random(mcScaleXMax) + 1
Set Property ("/mcName"&rNum, X Scale) = rScale
Set Property ("/mcName"&rNum, Y Scale) = rScale
Comment: -------------------------------------------------------
Begin Tell Target ("/your sound mc")
Go to and Play ("frame that plays sound")
End Tell Target
End On

Hope that helps...

Nathan Dicken
Fusionary Media




>As I was saying:
>
>What I have:
>* A MC appears at the mouse position when the mouse is clicked.
>
>What I want:
>* 1 of 6 (randomly chosen) MCs to play every time the mouse is clicked
>* These to be randomly scaled within a small range
>* A short sound to play on that same mouse-click
>
>I imagine it's something like; one variable to generate a random number
>which then... er. Yeah.
>
>Antony
>
>
>--
>Vertigo Productions Ltd - "Don't Look Down"
>Really Very Fine Web Design
>http://www.vertigo.co.uk
>infoatvertigo [dot] co [dot] uk
>
>flasher is generously supported by...
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Get the last 100 messages from the flasher list NOW
> http://www.chinwag.com/flasher/last100.shtml
>
> Flash books http://www.chinwag.com/flasher/books.shtml
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>To unsubscribe or change your list settings go to
>http://www.chinwag.com/flasher or email helpatchinwag [dot] com



flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the last 100 messages from the flasher list NOW
http://www.chinwag.com/flasher/last100.shtml

Flash books http://www.chinwag.com/flasher/books.shtml
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  FLASH: Have a heart guys. Some help ple, Antony Buonomo

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