View Full Version : syntax error in actionscript

07-11-2009, 12:14 AM
I am trying to create 3D rotation gallery, but I am getting an error stating I am missing a brace in my code. Although I cant imagine how a brace is missing. I went through a video tutorial and my code is exactly as his.

I have linked up the external a.s. file through the class but still the problem persists.

package {

import gs.*;
import gs.easing.*;
import flash.display.*;
import flash.events.*;

public class photopanels extends MovieClip {

public function photopanels(): void {

addEventListener(Event.ENTER_FRAME, loop);

private function loop(e:Event):void {

var distx:Number = mouseX /600;
var disty:Number = mouseY /500;
Tweenlite.to(con, 2, {
rotationY:(-70 + (140*distx))
rotationX:(70 - (140*disty))


1084: Syntax error: expecting rightbrace before rotationX.
rotationX:(70 - (140*disty))

not sure what I could be doing wrong.

Thanks a lot in advance for your help