homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
Forum Library, Charter, Moderator: open

Flash and Shockwave Forum

Frustrating error message when importing classes

5+ Year Member

Msg#: 3700110 posted 6:56 pm on Jul 16, 2008 (gmt 0)

Sorry to be back in here asking questions again so soon, but I can't for the life of me figure out why I can't get this code to work (I'm using Flash CS3):

import mx.transitions.Tween;
import mx.transitions.easing.*;
new Tween(hntitle_mc,"_y",Elastic.easeOut,hntitle_mc._y,181,15,false);

I keep getting syntax errors for the lines of code importing my classes but don't know how to change it to reference these classes correctly.

Apologies if this is a stupid question, I have tried looking at the directory struct. in the Adobe app folder and using that as my directory path...



WebmasterWorld Senior Member rocknbil us a WebmasterWorld Top Contributor of All Time 10+ Year Member

Msg#: 3700110 posted 8:55 pm on Jul 16, 2008 (gmt 0)

Couple things to check, whether or not they will help, don't know. :-)

Make sure your publication settings are set for AS3, not AS2. It's possible (probably?) the class you're using is AS3. If it's set for AS2, it wil do nothing or error.

Second, the class files need to be either in the same directory or in the directory path you specify. When uploading, make sure this structure remains consistent. So I **THINK** this

import mx.transitions.Tween;

Means you have a directory in the same directory as your fla/swf named mx, which contains a directory transitions, which contains the class Tween.as.



5+ Year Member

Msg#: 3700110 posted 9:51 pm on Jul 16, 2008 (gmt 0)

rocknbil, you're a ninja.

It was the publication settings that were on AS1 not AS2.

Muchos thankos

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved