Copy link to clipboard
Copied
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);
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
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
Bingo.
Yes I did copy and paste. I'll remember that.
Thanks Ned.
Copy link to clipboard
Copied
You're welcome Paul
Find more inspiration, events, and resources on the new Adobe Community
Explore Now