1 Reply Latest reply on Sep 3, 2008 7:21 PM by jag57

    Cannot re-construct a sample file

    SiHoop Level 1
      I'm working with the Google maps api and Flex and am having trouble re-constructing a sample file I found on the web.It lists a function and then includes the code for a .as file: package com.google.maps.examples {...

      My problem is that I do not know how to create the class path to com.google.maps.examples. Here's what I think I should do:
      1. In the src folder, create a sequence of folders: com/google/maps/examples
      2. In the last folder, place my .as file.
      3. In my mxml file I need to create a link to class path, but I don't know how to do this: Is it the following? xmlns:"com.google.maps.examples"

      The original url that I'm attempting to follow is at: Link in the section titled Markers.

      Thanks for your time!
        • 1. Re: Cannot re-construct a sample file
          Yes, the directory structure should reflect the path the class as specified in your .as file. So: com/google/maps/examples/File.as

          If you are using the class as a component, then you can declare the namespace as xmlns:googlecomponent="com.google.maps.examples.*". If you are simply using the class in the actionscript portion of your mxml file (inside the Script tags) then you should import the class using the import statement: import com.google.maps.examples.*; or import com.google.maps.examples.className;

          Hope this helps.