Understanding Packages

  • vivaretro
  • Born
  • Born
  • vivaretro
  • Posts: 1

Post 3+ Months Ago

I'm having trouble understanding packages. I have folder named electionMap
with 2 files in it, Morrow.as and Map.fla. The latter has a Movieclip called morrow and the
former has the code below. I keep getting the following error message:

"5001: The name of package 'electionMap' does not reflect the location of this file. Please change the packagedefinition's name inside this file, or move the file. /Volumes/Kenny/Workspaces/Jim/Decision2008FlashMap/Project/src/
electionMap/Morrow.as�" error.

If I take out the electionMap out and just have package
it works fine. Any ideas what I'm doing wrong?

Here's the code:

package electionMap

{
import fl.transitions.Tween;
import fl.transitions.TweenEvent;
import fl.transitions.easing.*;
import flash.text.TextField;
import flash.text.TextFormat;
import flash.text.Font;
import flash.display.Sprite;

import flash.display.MovieClip;
import flash.events.MouseEvent;
import flash.events.Event;

public class Morrow extends MovieClip
{

// this event listener had to be within its own function to work
// this is a constructor
public function Morrow()
{
addEventListener(MouseEvent.CLICK , myFunction); // calls the next function if morrow is clicked
}

private function myFunction(event:MouseEvent):void
{
trace("Morrow is clicked");
}
}
}

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 9 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.