2 Replies Latest reply on Dec 29, 2011 12:07 AM by stuartdawson

    Error - Could not resolve <s:Script> to a component implementation?

    stuartdawson

      Flex Builder 4.6, 60-day trial version. New  to MXML / AS, but familiar with Java, Javascript, XML, OpenLaszlo. Ooooold, sloooow Vista box.

       

      I want a bare-bones proof-of-concept class extending <s:Label> with a script responding to a click. Here's what I have:

       

      Ptile.mxml (in package com.blackbird):

      <?xml version="1.0" encoding="utf-8"?>

      <s:Label xmlns:fx="http://ns.adobe.com/mxml/2009"

          xmlns:s="library://ns.adobe.com/flex/spark"

          xmlns:mx="library://ns.adobe.com/flex/mx"

          xmlns:comp="com.blackbird.*"

          click="talkToMe()">   

         

          <s:Script>

              <![CDATA[

              private function talkToMe() : void {

                  trace("I'm alive, sarge");

              }

              ]]>   

          </s:Script>

      </s:Label>

       

      Calling application is :

      TileTest.mxml (also package com.blackbird):

      <?xml version="1.0" encoding="utf-8"?>

      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"

          xmlns:s="library://ns.adobe.com/flex/spark"

          xmlns:mx="library://ns.adobe.com/flex/mx"

          minWidth="955"     minHeight="600"

          xmlns:comp="com.blackbird.*">

       

          <s:BorderContainer  width="100%" height="100%">

              <comp:Ptile x="40" y="200" />

          <s:BorderContainer/>

      <s:Application>

       

      Ptile.mxml won't compile - Error message in the editor is "Could not resolve <s:Script> to a component implementation". I've banged and hammered this around - namespaces, typos and syntax all checked, documentation, Google. No luck. For a bet, I'd guess it's a namespace problem - I'm a little shaky on that - but I'm sugared if I can find it.

       

      Using the <mx:Script> or <fx:Script> tags also fails.

       

      I've edited the Eclipse.ini file, as detailed here : http://forums.adobe.com/thread/449232. Nothing.

       

      Anybody? Thanks.