As3 Error 5001
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow error 5001 actionscript 3 the company Business Learn more about hiring developers or posting ads with us Stack as3 error 1120 Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up AS3 Getting error 5001 when trying to import another .as file up vote 0 down vote favorite I;m new to AS3 and still trying wrap my head around it. I'm trying to program a very simple platformer. At present, I'm trying to make the player appear to be moving by means of moving the background behind him. So, I've made a separate .as file to contain the simple logic for making the background move. It's title is BG.as and I've been able to import a file with that exact name before without any issue on that front, but now it is being temperamental with me. I've gone into my AS3 Pref's in flash and set the file paths for the root folder, the folder containing the root folder, and even the folder holding the documents themselves. Both the .as file and the .fla file are in the same folder, but still I get an Error 5001 declaring that the name of BG does not reflect the file of the location. I've already tried writing out the file path as the name of the package and so on and so forth. If anyone has any idea of what the issue may be, I would appreciate it. Here is my code. import movingBackground.BG.*; This is just the import statement in my .fla file. movingBackground is the name of the folder it is in. package BG { import flash.events.EventDispatcher; import flash.events.Event; public class BG { public function loop(event:Event):void { if(leftPressed) { BG.x += xScrollSpeed; } else if(rightPressed) { BG.x -= xScrollSpeed; } else if(upPressed) { BG.y += yScrollSpeed; } else if(downPressed) { BG.y -= yScrollSpeed; } } stage.addEventListener(Event.ENTER_FRAME, loop); } } This is my BG.as file. ~~~~~EDIT::~~~~~~~ Okay, so I've renamed things and the renaming seems to have sorted out the Error 5001, but th
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up http://stackoverflow.com/questions/20079418/as3-getting-error-5001-when-trying-to-import-another-as-file AS3 Error 5001: Does not relfect the locaiton of this file up vote 0 down vote favorite After exhausting all options found here in the message boards, I'm reaching out to see if anyone can help me understand why I keep getting a 5001 error. On my Main.as Header I have: package com.dustin.core Which flash can find but when I publish and test http://stackoverflow.com/questions/29134332/as3-error-5001-does-not-relfect-the-locaiton-of-this-file this, the compiler is unable to locate Main.as for some reason. My Flash settings and folder structure can be seen here: Click to View Flash Settings I have tried various combinations in an attempt to get this working correctly, even removing the package linkage entirely to no avail. Any help or advice would be greatly appreciated. Thanks! actionscript-3 flash share|improve this question asked Mar 18 '15 at 23:05 hexobolic 11310 1 You document class says core.Main (image 2). Should be com.dustin.core.Main - that's the package of your Main. It does not matter that you specify ...com/dustin in your sourcepath, it doesn't magically change the package, it just means it will include the source files from that path. –Fygo Mar 18 '15 at 23:37 Thank you Fygo, this worked! I appreciate your help! –hexobolic Mar 19 '15 at 16:07 add a comment| 1 Answer 1 active oldest votes up vote 0 down vote accepted Fygo Answered this question: You document class says core.Main (image 2). Should be com.dustin.core.Main - that's the package of your Main. It does not matter that you specify ...com/dustin in your sourcep
ElementsAdobe Dreamweaver Adobe MuseAdobe Animate CCAdobe Premiere ProAdobe After EffectsAdobe IllustratorAdobe InDesignView all communitiesExplore Menu beginsMeet the expertsLearn our productsConnect with your peersError: You don't have JavaScript enabled. This tool uses https://forums.adobe.com/thread/29174 JavaScript and much of it will not work correctly without it enabled. Please turn JavaScript back on and reload this page. Please enter a title. You can not post a blank message. Please type your message and try again. More discussions in ActionScript 3 All CommunitiesAdobe Animate CC - HomeActionScript 3 5 as3 error Replies Latest reply on Jan 28, 2009 8:02 AM by kglad Error #5001: The name of package 'mapTools' does not reflect the location of this file. Please change the pa lougv22 Jan 27, 2009 8:31 AM Ok, this is a simple question. I have a package mapTools defined in ActionScript file MapManager.as, as as3 error 5001 shown in the attached code. The directory structure looks lke this: C:\ ----- \engine ----------\ media -------------- \Flash ------------------- \mapTools --------------------------- MapManager.as --------------------------- MAP.fla So files MapManager.as and MAP.fla are in the same directory. So I open MAP.fla and when I do TestMovie I get this error: "5001: The name of package 'mapTools' does not reflect the location of this file. Please change the package definition's name inside this file, or move the file. C:\engine\media\Flash\mapTools\MapManager.as" What is the cause of this error? 1249Views Tags: none (add) This content has been marked as final. Show 5 replies 1. Re: Error #5001: The name of package 'mapTools' does not reflect the location of this file. Please change the pa kglad Jan 27, 2009 9:25 AM (in response to lougv22) move MAP.fla up one directory to flash and retest. Like Show 0 Likes(0) Actions 2. Error #5001: The name of package 'mapTools' does not reflect the location of