1 Reply Latest reply on Feb 7, 2007 3:17 PM by michael_ramirez44

    Problems Importing actionscript

      I am trying to just do a basic include of the following action script file. When I try to complie it gives me and error saying: 1172L Definition test:Greeter could not be found.

      Ideas, Suggestions?


      // ActionScript file
      package test
      public class Greeter
      public function sayHello():String
      var greeting:String;
      greeting = "Hello World!";
      return greeting;

      mxml file:

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" xmlns="*" layout="absolute" >

      // Declare bindable properties in Application scope.
      public var selected_cid:String;

      import mx.controls.*;
      import test.*;

      //temp testing
      private var g:Greeter = new Greeter();

      public function handleFault():void{
      Alert.show("error loading data from server");

      public function init_vars():void
      selected_cid = mx.core.Application.application.parameters.cid;

      //temp testing
      Alert.show( g.sayHello() );