Hello Henry,

Thank you for your answer. I modified the code and I can compile now.

But I can't see the sprite, and I'm getting a runtime error:

ERROR @spectrum.lzx≈46: SecurityError: Error #2123

Any Ideas? Could you use this class?

Best!

L.


On Sun, Mar 21, 2010 at 1:47 AM, Henry Minsky <[email protected]> wrote:
> Also you will need an extra arg to your handler method
>
>     <method name="timerHandler" args="e:Event">
>
> Because the contract for a AS3 event listener is that it needs to accept one
> argument.
>
> "This function must accept an Event object as its only parameter and must
> return nothing"
>
>
>
>
> On Sat, Mar 20, 2010 at 11:39 PM, Henry Minsky <[email protected]>
> wrote:
>>
>> To get the sprite, just "canvas.sprite" ought to work, although the  cross
>> platform API to get the sprite is canvas.getDisplayObject()
>>
>>
>>
>> On Sat, Mar 20, 2010 at 5:21 PM, Lucas Lain <[email protected]> wrote:
>>>
>>> Hello everybody,
>>>
>>> does anyone know how to add a sprite to an openlaszlo canvas or view?
>>>
>>> I wrote/modified the attached class to visualize the sound spectrum.
>>>
>>> This line is the one supposed to do the trick:
>>>
>>>        canvas.content.sprite.addChild(this._gr);
>>>
>>>
>>> Best!
>>>
>>>
>>> --
>>> Lucas
>>
>>
>>
>> --
>> Henry Minsky
>> Software Architect
>> [email protected]
>>
>>
>
>
>
> --
> Henry Minsky
> Software Architect
> [email protected]
>
>
>



-- 
Lucas

Reply via email to