[Yr7-10it] RE: Flash Action Scripting
Costello, Rob R
Costello.Rob.R at edumail.vic.gov.au
Thu Jan 18 00:41:31 EST 2007
Hi Sylvia
Re Button code to move your object left or right :
You could enter this in button actions
on (press){
myObject._x=3D myObject._x + Math.random()*100
}
Or, more concisely (but probably more confusing) :
on (press){
myObject._x +=3D Math.random()*100
}
This assumes the object you are moving on the screen is a symbol with an
instance name of myObject (in the properties panel). Its symbol name can
be different or the same.
Math.random() gives a number between 0 and 1, so *100 scales it up to
something you will notice. Change the + to - for the left button.
Change _x to _y to move the thing vertically
Re Flash Actionscripting in general ... where to stop is indeed the
issue ... or how far they can go ... I don't think its an easy way to
learn programming.
I used to stop with simple button code, with year 9 girls ... and focus
mostly on the GUI tools and tweening. I knew teachers who got them doing
quizzes and things ... I think they had to give them most of the code
though ...
Cheers
Rob
-----Original Message-----
From: yr7-10it-bounces at edulists.com.au
[mailto:yr7-10it-bounces at edulists.com.au] On Behalf Of
yr7-10it-request at edulists.com.au
Sent: Wednesday, 17 January 2007 12:00 PM
To: yr7-10it at edulists.com.au
Subject: Yr7-10it Digest, Vol 23, Issue 4
Send Yr7-10it mailing list submissions to
yr7-10it at edulists.com.au
To subscribe or unsubscribe via the World Wide Web, visit
http://www.edulists.com.au/mailman/listinfo/yr7-10it
or, via email, send a message with subject or body 'help' to
yr7-10it-request at edulists.com.au
You can reach the person managing the list at
yr7-10it-owner at edulists.com.au
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Yr7-10it digest..."
Today's Topics:
1. Flash Action Scripting (Sylvia Pastore)
----------------------------------------------------------------------
Message: 1
Date: Wed, 17 Jan 2007 10:17:21 +1100
From: Sylvia Pastore <pastosy at mowbray.vic.edu.au>
Subject: [Yr7-10it] Flash Action Scripting
To: List Yr7-10it <yr7-10it at edulists.com.au>
Message-ID:
<20070117101721.6ljvxdgndccgkwow at webmail.mowbray.vic.edu.au>
Content-Type: text/plain; charset=3DISO-8859-1; DelSp=3D"Yes";
format=3D"flowed"
Hi there
I am going to introduce flash action script to Year 9 students. I am
reteaching myself as my skills have been lost as I havent used it for
a while. Can anyone tell me what you are doing with your classes - i
have searched the internet and there is a mineful of stuff. I know
that there is a million stuff that can be done but where to stop. thanks
Also can anyone help me with this action scripting- I have a button
that when pressed moves an object a random number of steps left and
another button that moves it right -
--
Sylvia Pastore
Daily Organiser
Mowbray College
Town Centre
Caroline Springs
------------------------------------------------------------------------
-----
This email and any files transmitted with it are privileged and
confidential, and are intended only for the use of the intended
recipient. If you are not the intended recipient, or responsible for
delivering this email to the intended recipient, any use,
dissemination, forwarding, printing or copying of this email and any
attachments is strictly prohibited. If you have received this email
in error please delete it immediately from your computer.
------------------------------
_______________________________________________
Yr7-10it mailing list
Yr7-10it at edulists.com.au
http://www.edulists.com.au/mailman/listinfo/yr7-10it
End of Yr7-10it Digest, Vol 23, Issue 4
***************************************
Important - This email and any attachments may be confidential. If received=
in error, please contact us and delete all copies. Before opening or using=
attachments check them for viruses and defects. Regardless of any loss, dam=
age or consequence, whether caused by the negligence of the sender or not, r=
esulting directly or indirectly from the use of any attached files our liabi=
lity is limited to resupplying any affected attachments. Any representations=
or opinions expressed are those of the individual sender, and not necessari=
ly those of the Department of Education.
More information about the Yr7-10it
mailing list