A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Help me!How 2 use Knob in KM ,thanks

  1. #1
    Junior Member
    Join Date
    Mar 2009
    Posts
    6

    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();

    }

  2. #2
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    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 Attached Files

  3. #3
    Junior Member
    Join Date
    Mar 2009
    Posts
    6
    Thanks you very much.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center