Reputation: 607
i need to import my own class to the mxml file, but allways comes an error that classes cant be nested. I dont know how to use my classes (example: NetConn.as). Can you help me?
<!--language:actionscript3>
<?xml version="1.0" encoding="utf-8"?>
<s:ViewNavigatorApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" firstView="views.eazyRadioHomeView">
<fx:Style source="eazyRadio.css"/>
<fx:Script>
<![CDATA[
include "NetConn.as";
import myNetConn;
var easy=new NetConnectionEx();
]]>
</fx:Script>
<fx:Declarations>
<!-- Platzieren Sie nichtvisuelle Elemente (z. B. Dienste, Wertobjekte) hier -->
</fx:Declarations>
</s:ViewNavigatorApplication>
-->
Upvotes: 3
Views: 1680
Reputation: 1671
You need
import com.yournamespace.NetConn;
instead of
include "NetConn.as"
Upvotes: 1