The strange thing is that if I do an import of mx.effects.* first and extend TweenEffect it doesn't give that base class error but "conflict with inherited definition target in namespace public" for the target property and "incompatible override" and "overriding function that is not marked for override" for the playEffect method.
testEffect.mxml
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2005/mxml" xmlns="com.peterelst.*">
<mx:Effect>
<Rotate name="myRotateEffect" rotateBy="1000" duration="1000" />
</mx:Effect>
<mx:Image id="myAnimation" source="@Embed('flash_platform.jpg')" mouseDownEffect="myRotateEffect" />
</mx:Application>
Rotate.as
package com.peterelst {
public class Rotate extends mx.effects.TweenEffect {
var target:Object;
var rotateBy:Number;
var rotateTween:mx.effects.Tween;
function Rotate(targetObj:Object) {
target = targetObj;
}
function playEffect():Void {
rotateTween = new mx.effects.Tween(this, target._rotation,
target._rotation+rotateBy, duration);
}
function onTweenUpdate(tweenValue):Void {
target._rotation = tweenValue;
}
}
}
On 10/19/05, Philip Costa <[EMAIL PROTECTED]> wrote:
You have to mark your class public.The default in AS3 is private, so that's why your MXML page can't see it.Phil CostaSr. Product ManagerMacromedia
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
Web site design development | Computer software development | Software design and development |
Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.