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

Adding classes to Flash CS3 project

New Here ,
Mar 27, 2009 Mar 27, 2009
Forgive me I'm a newbie when it comes to Flash projects. I have the source code for a Flash based media player written in Action Script 3 that I need to modify. I’m trying to add classes to this project in Flash CS3 however after I import them and try to reference the classes in an existing class within the original source I get the following error when I try to build:

1172: Definition ‘classname’ could not be found.

However the project builds fine if I don’t reference any of the newly imported classes. What am I missing here?

Scott
TOPICS
ActionScript
769
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 , Mar 28, 2009 Mar 28, 2009
From a brief look you need to import your new package into existing class:

import alducente.services.*;

Also make sure that you provide a path to this package in Flash publishing preferences - you need to start with a directory that one level up. For instance, if your new classes reside in a path: c:/documents/classes/alducente/services, you need to tell Flash that you classes are in c:/documents/classes - not in c:/documents/classes/alducente

Translate
LEGEND ,
Mar 28, 2009 Mar 28, 2009
How do you reference them? Can you post code?

Also, how do you import the classes?
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
New Here ,
Mar 28, 2009 Mar 28, 2009
Okay, here's the code. The first class is the one I imported into my existing project. The second class is the existing class from the projects original source code where I'm trying to reference my new class.



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 ,
Mar 28, 2009 Mar 28, 2009
From a brief look you need to import your new package into existing class:

import alducente.services.*;

Also make sure that you provide a path to this package in Flash publishing preferences - you need to start with a directory that one level up. For instance, if your new classes reside in a path: c:/documents/classes/alducente/services, you need to tell Flash that you classes are in c:/documents/classes - not in c:/documents/classes/alducente

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
New Here ,
Mar 28, 2009 Mar 28, 2009
LATEST
I think I have it now. I went into the Preferences, selected the ActionScript category and went to the ActionScript 3.0 Settings dialog and added a class path that pointed to the root of my project classes and now it compiles fine. Thanks,

Scott
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