Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Thanks kglad - that fixed it up
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
you're welcome.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now