Help me!How 2 use Knob in KM ,thanks
Open KM and paste code as below,Iwant to use Knob,but seeing nothing ,why?
import km.components.knob;
import flash.display.Sprite
import km.skins.*;
var b:Knob = new Knob();
ScriptedSkin.applyTo(b);
b.move(50,50);
b.onChange = updateShape;
b.SetRotationRange(300);
b.Setscale(0.5);
b.setstopColor(200);
b.setstops(4);
b.setvalue(1);
addChild(b);
var s:Shape = new Shape();
s.x = 80;
s.y = 80;
addChild(s);
function updateShape():void {
s.graphics.clear();
s.graphics.beginFill(ns.value << 16);
s.graphics.drawRect(80, 80, 90, 90);
s.graphics.endFill();
}
Currently the ScriptedSkin class doesn't support the Knob component. You have to assign an image manually. Also a lot of your code consists of non existing commands. I suggest you study the KM 7.0.4 .fun file I attached to this reply.
Attached Files
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