
Flade skinning?
Does anyone know how to skin objects?

You cant ...you will have to figure out a way to do it
I added a command to attach a image in the library to each objects DMC clip....then in the graphics file i added code to place the image im using at the right place(graphics is where flade draws stuff) Id give you mine but it looks like crap and isnt really human readable and still has lots of bugs.

actually if you could give the code I bet i could figure it out, I figured out flade for the most part but i still cant get an image.

in org.cove.flade.primatives particle.as (and in surfaces abstract surface)
Code:
public function set graphic(s:String){
var depth:Number = dmc.getNextHighestDepth();
dmc.image = dmc.attachMovie(s,s,depth)
//trace(dmc.image)
}
and then in org.cove.flade.graphics Graphics.as
Code:
class org.cove.flade.graphics.Graphics {
public static function paintLine (
dmc:MovieClip,
x0:Number,
y0:Number,
x1:Number,
y1:Number) {
dmc.moveTo(x0, y0);
dmc.lineTo(x1, y1);
//trace(x0+","+y0+" to> "+x1+","+y1)
var dx = x1x0
var dy = y1y0
dmc.image._x = x0
dmc.image._y = y0
//dmc.image._width =Math.sqrt(dx*dx+dy*dy)
dmc.image._rotation = Math.atan2(dy,dx)*180/Math.PI
//if(dmc.image.flipped){dmc.image._rotation+=180;trace("FLIPOUT")}
//trace(Math.atan2(dy,dx)*180/Math.PI)
var Line = new Object()
//Line.p1=
}
public static function paintCircle (dmc:MovieClip, x:Number, y:Number, r:Number):Void {
var mtp8r:Number = Math.tan(Math.PI/8) * r;
var msp4r:Number = Math.sin(Math.PI/4) * r;
dmc.image._x = x
dmc.image._y = y
dmc.image._width = r*2
dmc.image._height = r*2
with (dmc) {
moveTo(x + r, y);
curveTo(r + x, mtp8r + y, msp4r + x, msp4r + y);
curveTo(mtp8r + x, r + y, x, r + y);
curveTo(mtp8r + x, r + y, msp4r + x, msp4r + y);
curveTo(r + x, mtp8r + y, r + x, y);
curveTo(r + x, mtp8r + y, msp4r + x, msp4r + y);
curveTo(mtp8r + x, r + y, x, r + y);
curveTo(mtp8r + x, r + y, msp4r + x, msp4r + y);
curveTo(r + x, mtp8r + y, r + x, y);
}
}
public static function paintRectangle(
dmc:MovieClip,
x:Number,
y:Number,
w:Number,
h:Number):Void {
var w2:Number = w/2;
var h2:Number = h/2;
dmc.image._x = xw2
dmc.image._y = y
//dmc.image._width = w
// dmc.image._height = h
with (dmc) {
moveTo(x  w2, y  h2);
lineTo(x + w2, y  h2);
lineTo(x + w2, y + h2);
lineTo(x  w2, y + h2);
lineTo(x  w2, y  h2);
}
}
}
then in my project file
var circle = new CircleParticle(x,y,r)
circle.graphic = "myCircle" //this is the linkage id for the image i want to attach
theres probably better ways to do it but its not that hard to figure out some way to attach an image thats why i recommended you figure it out on your own....

i found a way of getting images/videos onto a Flade Mesh...
http://myweb.tiscali.co.uk/richstuff/meshflagnew.html
It uses Flade and Sandy's Distort Image Class.
A bit cpu hungry though
RichL
Posting Permissions
 You may not post new threads
 You may not post replies
 You may not post attachments
 You may not edit your posts

Forum Rules

Click Here to Expand Forum to Full Width
