FORUMS: list search recent posts

Radio button with image

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Dany Sterkhov
Radio button with image
on May 31, 2016 at 1:57:19 pm

Good evening!

I'm trying to create button which stores some info (comp size) and changes it after clicking on final button.
As I know, "iconbutton" doesn't work that way and I want to use radio button, but I need to link image to it and can't find anything. I'm using Rift's script ui as reference, especially "Keys" section.

My code so far and image below:





UI(this)
function UI(object){
var win = (object instanceof Panel) ? object : new Window("window","wol_DataGen",[0,0,500,500],{
resizeable:true,independent:false,minimizeButton:false,maximizeButton:false,closeButton:false,
});
var dir = "(DataGenerator_Resources)/";
iconsRes1k= {
a: File(dir+"ButtonOneInactive.png"), c: File(dir+"ButtonOneActive.png")
}

iconsRes2k= {
a: File(dir+"ButtonTwoInactive.png"), c: File(dir+"ButtonTwoActive.png")
}

iconsRes4k= {
a: File(dir+"ButtonFourInactive.png"), c: File(dir+"ButtonFourActive.png")
}

iconsRes8k= {
a: File(dir+"ButtonEightInactive.png"), c: File(dir+"ButtonEightActive.png")
}

iconsRes8k= {
a: File(dir+"ButtonEightInactive.png"), c: File(dir+"ButtonEightActive.png")
}

iconsCircle = {
a: File(dir+"CircleInactive.png"), c: File(dir+"CircleActive.png")
}
iconsSquare = {
a: File(dir+"SquareInactive.png"), c: File(dir+"SquareActive.png")
}
iconsGenerate = {
a: File(dir+"GenerateInactive.png"), c: File(dir+"GenerateActive.png")
}
Res1k = win.add("iconbutton",[20,110,50,140] ,ScriptUI.newImage (iconsRes1k.a, undefined, iconsRes1k.c, undefined),{style: "toolbutton", toggle:0} );
Res2k = win.add("iconbutton",[60,110,90,140] ,ScriptUI.newImage (iconsRes2k.a, undefined, iconsRes2k.c, undefined),{style: "toolbutton", toggle:0} );
Res4k = win.add("iconbutton",[100,110,130,140] ,ScriptUI.newImage (iconsRes4k.a, undefined, iconsRes4k.c, undefined),{style: "toolbutton", toggle:0} );
Res8k = win.add("iconbutton",[140,110,170,140] ,ScriptUI.newImage (iconsRes8k.a, undefined, iconsRes8k.c, undefined),{style: "toolbutton", toggle:0} );
CompSize = win.add("statictext",[20,90,120,91] ,"Composition Size",{multiline:true});
Rule2 = win.add("panel",[20,150,170,151]);
Rule1 = win.add("panel",[20,80,170,81]);
Forms = win.add("statictext",[20,160,120,161] ,"Forms",{multiline:true});
Circle = win.add("iconbutton",[20,180,90,250] ,ScriptUI.newImage (iconsCircle.a, undefined, iconsCircle.c, undefined),{style: "toolbutton", toggle:0} );
Square = win.add("iconbutton",[100,180,170,250] ,ScriptUI.newImage (iconsSquare.a, undefined, iconsSquare.c, undefined),{style: "toolbutton", toggle:0} );
Generate = win.add("iconbutton",[20,260,170,290] ,ScriptUI.newImage (iconsGenerate.a, undefined, iconsGenerate.c, undefined),{style: "toolbutton", toggle:true} );
Logo = win.add("image",[20,20,170,60] ,ScriptUI.newImage ( "(DataGenerator_Resources)/Logo.png", undefined, undefined, undefined),{style: "toolbutton", toggle:0} );
}


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]