Advertisement

06.24.2008 at 02:35AM PDT, ID: 23510328 | Points: 500
[x]
Attachment Details

How do I get around the super-statement

Asked by SimonAdrian in ActionScript, Macromedia Flash

Tags:

Im trying to implement the content of a package with xml, which means that Im trying to use the package-code in the actual .fla-file.
But I have a problem with the super-statement, that creates this error:
1007: A super statement can be used only inside class instance constructors.

    import flash.events.Event;
    import com.google.maps.Map;
    import com.google.maps.MapEvent;
    import com.google.maps.MapType;
    import com.google.maps.LatLng;
      function initiateMap() {
      super();
      key = "Here there is a google maps key";
                addEventListener(MapEvent.MAP_READY, onMapReady);
              }
                  
              function onMapReady(event:MapEvent):void {
        setCenter(new LatLng(zlatitude,zlongitude), 7, MapType.HYBRID_MAP_TYPE);
}
}

In the code snippet you can see the package that Im trying to bring to use in the .fla-file.
Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
package
{
 
	import flash.events.Event;
    import com.google.maps.Map;
    import com.google.maps.MapEvent;
    import com.google.maps.MapType;
    import com.google.maps.LatLng;
      public class HelloWorld extends Map {
          public function HelloWorld() {
			  super();
			  key = "Here there is a google maps key";
              addEventListener(MapEvent.MAP_READY, onMapReady);
              }
			 
              private function onMapReady(event:MapEvent):void {
				  
                  setCenter(new LatLng(zlatitude,zlongitude), 7, MapType.HYBRID_MAP_TYPE);
 
}
}
}
 
Loading Advertisement...
 
[+][-]06.24.2008 at 04:13AM PDT, ID: 21854344

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.24.2008 at 06:34AM PDT, ID: 21855518

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.25.2008 at 03:47AM PDT, ID: 21864214

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.25.2008 at 05:45AM PDT, ID: 21864910

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.25.2008 at 05:50AM PDT, ID: 21864945

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.25.2008 at 06:25AM PDT, ID: 21865271

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.25.2008 at 06:33AM PDT, ID: 21865351

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.26.2008 at 01:22AM PDT, ID: 21872689

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.26.2008 at 04:01AM PDT, ID: 21873455

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.26.2008 at 05:04AM PDT, ID: 21873828

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.26.2008 at 05:40AM PDT, ID: 21874128

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.26.2008 at 05:42AM PDT, ID: 21874145

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628