Hi,
package is a key word indicating an actionscript class.
>From what I see you have your actionscript block inserted into an mxml
file.

On Sun, Jun 20, 2010 at 8:27 PM, Toni <[email protected]> wrote:

> Hello Everyone,
>
> I am new to flex actionsript3.0 and need some help with setting up a
> dispatchEvent.  When I compiled I get the following error message:
>
>                1083: Syntax error: package is unexpected.
>
> The error message seems to suggest that the "package" is in the wrong
> place, but I am not sure where else it should go. Any help would
> greatly be appreciated. Thank you.
>
> The following code is the way I have implemented:
>
> <![CDATA[
>
>  package{
>        import flash.events.EventDispatcher;
>
>        public class loadEvent extends EventDispatcher {
>        public static const ADD:String = "add";
>
>
>        private function onSelect():void
>        {
>
>                        dispatchEvent(new Event(loadEvent.ADD));
>        }
> }
> }
>
>
>
>
>        private function onAdd(Event:loadEvent):void
>        {
>
>        }
>
>
> ]]>
>
> Thanks in advance for any help,
> Toni
>
> --
> You received this message because you are subscribed to the Google Groups
> "Flex India Community" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<flex_india%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/flex_india?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en.

Reply via email to