Thanks, that was the problem. I'm still wondering why, if the error 
machine knew that the target was the wrong type, it couldn't tell me 
that. The error messages are almost completely worthless as far as I can 
see.

Rick Winscot wrote:
>
> So…. It looks like you have some issues with the line 
> moveSketch.target=”sketchBox”; ---- since the target is an Object and 
> you are setting it to a String… which is an Object but not the right 
> _/type/_ of Object. The compiler isn’t going to have a spaz but it 
> will surely cause a runtime error. Use moveSketch.target=sketchBox; 
> instead.
>
> Rick Winscot
>
> *From:* [email protected] [mailto:[EMAIL PROTECTED] 
> *On Behalf Of [EMAIL PROTECTED]
> *Sent:* Saturday, July 12, 2008 8:38 PM
> *To:* [email protected]
> *Subject:* [flexcoders] dynamic move
>
> In this code I'm dynamically creating an HBox, adding an image to it,
> adding the box to a Panel, and then creating a Move() to move the Hbox.
> It produces the error below, which says "value" is not a function. WHAT
> VALUE? Why doesn't it name the value ? What did I do wrong ?
> The error comes when I add the final line, moveSketch.play();
>
> var sketchBox:HBox = new HBox();
> var sketchImg:Image=new Image;
> sketchImg.source="Journeysketchsm.gif";
> sketchBox.addChild(sketchImg);
> thePanel.addChildAt(sketchBox,0);
>
> var moveSketch:Move = new Move();
> moveSketch.target="sketchBox";
> moveSketch.xTo=150;
> moveSketch.duration=3000;
> moveSketch.play();
>
>
> TypeError: Error #1006: value is not a function.
> at
> mx.effects::EffectInstance/play()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\effects\EffectInstance.as:584]
> at
> mx.effects.effectClasses::MoveInstance/play()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\effects\effectClasses\MoveInstance.as:230]
> at
> mx.effects::EffectInstance/startEffect()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\effects\EffectInstance.as:569]
> at
> mx.effects::Effect/play()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\effects\Effect.as:930]
> at jbh/endEffectHandler()[K:\flex3\src\jbh.mxml:60]
> at jbh/___jbh_AnimateProperty1_effectEnd()[K:\flex3\src\jbh.mxml:9]
> at flash.events::EventDispatcher/dispatchEventFunction()
> at flash.events::EventDispatcher/dispatchEvent()
> at
> mx.effects::Effect/effectEndHandler()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\effects\Effect.as:1329]
> at flash.events::EventDispatcher/dispatchEventFunction()
> at flash.events::EventDispatcher/dispatchEvent()
> at
> mx.effects::EffectInstance/finishEffect()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\effects\EffectInstance.as:651]
> at
> mx.effects::EffectInstance/finishRepeat()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\effects\EffectInstance.as:690]
> at
> mx.effects.effectClasses::TweenEffectInstance/onTweenEnd()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\effects\effectClasses\TweenEffectInstance.as:395]
> at
> mx.effects::Tween/endTween()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\effects\Tween.as:524]
> at
> mx.effects::Tween/http://www.adobe.com/2006/flex/mx/internal::doInterval 
> <http://www.adobe.com/2006/flex/mx/internal::doInterval>()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\effects\Tween.as:565]
> at
> mx.effects::Tween$/timerHandler()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\effects\Tween.as:179]
> at flash.utils::Timer/_timerDispatch()
> at flash.utils::Timer/tick()
>
> 
> No virus found in this incoming message.
> Checked by AVG - http://www.avg.com 
> Version: 8.0.138 / Virus Database: 270.4.10/1549 - Release Date: 7/12/2008 
> 4:31 PM
>   


------------------------------------

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Reply via email to