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

package connection problem

Guest
Mar 10, 2013 Mar 10, 2013

Hi

I'm getting the ole 5001 error on Flash Pro - a package connection error - can someone please tell me where this is incorrect?

My source path settings in Pro are:


.

../libs

../libs/myProject

My fla is in...

D:\FLASH\src

I created a class file to make as a moveiclip's class file here...

D:\FLASH\libs\myProject\mvc\adsManager.as

'Export for Actionscript' is set for the movieclip in the library like so...


mvc.adsManager.AdsManagerView

What I can't figure out is what to have in the class file after 'Package' - none of the paths I enter are correct...

package {

package mvc {

package mvc.adsManager {

package myProject.mvc.adsManager {

package libs.myProject.mvc.adsManager {

All my other class files import fine. However, this is the first time I have tried connecting an external class I have made to a moveiclip in the library (so that the class becomes the moveiclip's class).

The problem goes away if I reference the moveiclip as public var adsManager as opposed to public var adsManager:AdsManagerView; (with the package set as package mvc.adsManager {... )

Cheers guys

TOPICS
ActionScript
581
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
Community Expert ,
Mar 11, 2013 Mar 11, 2013

these are correct:

package mvc {

or

package myProject.mvc {

but, if you have an adsManager.as file in src or libs or myProject, that class file will be used and NOT the one in mvc.

so, make sure you're testing the class file in mvc.

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
Guest
Mar 27, 2013 Mar 27, 2013

Thanks kglad - that fixed it up

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
Guide ,
Mar 27, 2013 Mar 27, 2013

You may want to consider using Flash Builder to write your code. When you create a new Class in Builder, it automatically creates the package declarations for you based on where you put it.

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
Community Expert ,
Mar 27, 2013 Mar 27, 2013
LATEST

you're welcome.

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