Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

1093 Syntax error in Adobe devnet code?

Contributor ,
Jan 08, 2014 Jan 08, 2014

Hi All,

I'm new to AC3 so maybe I'm mistaken... but I've tried to follow the steps in this Adobe AC3 tutorial: http://www.adobe.com/devnet/flash/articles/creating_animation_as3.html

..very closely and I'm getting a 1093 syntax error for the code below. Does anyone have an idea what the problem is..and what the fix would be?

The line in red is the one that is indicated in the error message. (It's a tutorial about making a code snippet for tweening.)

Thanks much!

import fl.transitions.*;
import fl.transitions.easing.*;

/**
* This Tween sample shows a fade-in effect
* by default. Change the prop, to, from, and duration
* values to change the animation. You can add code
* in the event handler functions to respond to animation
* event timing.
*/

function onTweenProgress(event:TweenEvent):void
{
    // do something as the tween progresses...
}
function onTweenEnd(event:TweenEvent):void
{
   // do something when the tween ends...
}
var prop:String = “alpha”;
var from:Number = 0;
var to:Number = 1;
var duration:Number = 1;
var tween:Tween = new Tween(rect_mc, alpha, Strong.easeOut, from, to, duration, true);
tween.addEventListener(TweenEvent.MOTION_CHANGE, onTweenProgress);
tween.addEventListener(TweenEvent.MOTION_FINISH, onTweenEnd);

TOPICS
ActionScript
1.7K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Jan 08, 2014 Jan 08, 2014

It's the double quotes that your code is using on that line.  I am guessing you copied and pasted from somewhere.  Try retyping the double quotes using your keyboard

Translate
LEGEND ,
Jan 08, 2014 Jan 08, 2014

It's the double quotes that your code is using on that line.  I am guessing you copied and pasted from somewhere.  Try retyping the double quotes using your keyboard

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jan 08, 2014 Jan 08, 2014

Bingo.

Yes I did copy and paste. I'll remember that.

Thanks Ned.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 08, 2014 Jan 08, 2014
LATEST

You're welcome Paul

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines