Skip to main content
March 11, 2013
Question

package connection problem

  • March 11, 2013
  • 1 reply
  • 624 views

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

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
March 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.

March 28, 2013

Thanks kglad - that fixed it up

Amy Blankenship
Legend
March 28, 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.