|
| damo |
Post
#1
|
|
Advanced Member Group: Members Posts: 43 Joined: 20-June 06 Member No.: 26 |
Hi all,
I have something strange. I'm creating a MovieSkin using an external swf like that CODE private var ms:MovieSkin; ... ms = new MovieSkin("toto.swf"); I'm waiting the end of loading : CODE ms.addEventListener(SkinEvent.onUpdateEVENT,drawSquare); Next i want to draw a square around my texture. CODE private function drawSquare():void{ var toto:MovieClip = ms.getMovie().createEmptyMovieClip("toto",2560); ... toto.lineTo ... ... } It's just for drawing a square. But it doesn't work. I have nothing other than my external swf in my sprite (IMG:style_emoticons/default/sad.gif) Any idea ? This post has been edited by damo: Feb 28 2007, 01:32 PM |
| damo |
Post
#2
|
|
Advanced Member Group: Members Posts: 43 Joined: 20-June 06 Member No.: 26 |
Petit, kiroukou the drawing method is ok.
toto isn't undefined. Try to do something like that, you'll see what i mean. |
| Petit |
Post
#3
|
|
Advanced Member Group: Moderator Posts: 568 Joined: 21-June 06 From: Borgholm, Sweden Member No.: 38 |
Try to do something like that, you'll see what i mean. When I try to do something like that ( I'm not writing a class though ), the onUpdateEVENT handler is called, but the skin is 'undefined' inside the event handler. When I declare the MovieSkin as global, in a class this would be an instance variable, the skin is known in the handler. I have other problems though ( in the latest 1.2 beta ). I cannot get externally loaded SWF's to show up, other than as a surface of dots. I think, though I don't know, that first you have to check that your event handler really can see the skin. Then I have a feeling, that you have to draw the square on the the MovieClip, before you send it to the MovieSkin constructor. |
| zeusprod |
Post
#4
|
|
Advanced Member Group: Members Posts: 220 Joined: 14-February 07 Member No.: 801 |
When I try to do something like that ( I'm not writing a class though ), the onUpdateEVENT handler is called, but the skin is 'undefined' inside the event handler. Inside the event handler, the first argument received is "target" and the skin can be retrieved from target._oT |
| Lo-Fi Version | Time is now: 27th July 2007 - 10:20 AM |