Web Hosting Forum | Lunarpages
News: Server Migrations to San Diego: Deneb, Felix and Tsohea are moving to San Diego starting Tuesday, December 30, 2008 at 10pm Pacific. They will complete their moves Friday night, January 2, 2009

Isis, Seth and Ez-web-n-mail will move physically on Friday, January 2, 2009

Please see the forum posts at http://www.lunarforums.com/lunarpages_web_hosting_server_information-b54.0/

+ Submit Your Own Web Site for the January 2009 Site of the Month Contest!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
January 09, 2009, 04:56:52 PM


Login with username, password and session length


Pages: [1]   Go Down
  Print  
Author Topic: problem of action script 3 within Flash CS3 professional  (Read 183 times)
begeiste
Galactic Royalty
*****
Offline Offline

Posts: 365


WWW
« on: August 21, 2008, 05:49:30 PM »

Hi,

I am a new player of ActionScript 3 in Flash CS3 professional version. I don't know why the ActionScript I wrote, it didn't work while I published it. Would you please tell me what was it wrong? Basically I just made a mcRectangle as a movie clip in the library and drop three rectangles with different sizes and named them:rectangle1_mc.rectangle2_mc,rectangle3_mc for their instance names.

Here is the ActionScript3 code:
Code:
function moveRectangle(rectangle:MovieClip, movement:Number, rotationAmt:Number):void
{
rectangle._y -= movement;
rectangle._rotation += rotationAmt;
}

moveRectangle(rectangle1_mc, 150, 45);
moveRectangle(rectangle2_mc, 250, 90);
moveRectangle(rectangle3_mc. 50, 180);

Any helps would be much appreciate it!
Logged
spiralee
Newbie
*
Offline Offline

Posts: 1


« Reply #1 on: August 22, 2008, 06:27:42 PM »

I'm just learning Actionscript 3 also so I happen to have a textbook right here next my computer.   It could be that there should be no underscore before rotation in the "rectangle._rotation += rotationAmt;" line.  So it should read "rectangle.rotation += rotationAmt;"  (pg 54 Actionscript 3.0 by Todd Perkins)

Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.6 | SMF © 2006-2008, Simple Machines LLC

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM