Here's what I'm doing.
BASEVIEW:
---------------------
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
import com.mccann.cpc.model.CPCModel;
private var _xmlid:String;
protected var viewXML:XML;
protected function init():void
{
viewXML = CPCModel.getInstance().xmls[_xmlid];
}
public function set xmlid(id:String):void
{
_xmlid = id;
}
public function get xmlid():String
{
return _xmlid;
}
private function initView():void
{
throw new Error("You must extend initView()");
}
]]>
</mx:Script>
</mx:Canvas>
----------------------------
Now I create a "BaseView like so:"
----------------------------
<?xml version="1.0" encoding="utf-8"?>
<view:BaseView
xmlns:view="*"
xmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="300">
<mx:transitions>
<mx:Transition>
</mx:Transition>
</mx:transitions>
<mx:states>
<mx:State>
</mx:State>
</mx:states>
</view:BaseView>
------------------------
FlexBuilder gives me errors saying that transitions / states don't belong to
this class or something,. Sorry i'm not at the dev machine I was on.. does
that make sense?
-Thanks
Aaron
On 9/28/07, Alex Harui <[EMAIL PROTECTED]> wrote:
>
> can you post your example?
>
> ------------------------------
> *From:* [email protected] [mailto:[EMAIL PROTECTED] *On
> Behalf Of *aaron smith
> *Sent:* Thursday, September 27, 2007 5:57 PM
> *To:* [email protected]
> *Subject:* [flexcoders] Extending Canvas, inheriting transitions / states
> in MXML?
>
> I'm extending Canvas MXML (Creating a BaseView), and in the BaseView when
> I try to do transitions or states, they aren't available. Is there a correct
> way to extend containers and inherit these?
> Thanks
>
>
>