Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- enyo.kind({
- kind: "Group",
- name: "Group",
- components:
- [
- {
- kind:"Sound",
- name:"beep",
- src:enyo.fetchAppRootPath()+"beep.wav"
- },
- {
- kind:"Sound",
- name:"boop",
- src:enyo.fetchAppRootPath()+"boop.wav"
- },
- {
- kind:"Sound",
- name:"bop",
- src:enyo.fetchAppRootPath()+"bop.wav"
- },
- {
- layoutKind: "HFlexLayout",
- flex:1,
- kind: "Image",
- src: "buttonImg.png",
- style: "text-align: center",
- onclick: "onClick",
- onClick: "myClickFunction"
- },
- {
- kind: "RadioGroup",
- name: "radioGroup",
- components:
- [
- {
- kind: "RadioButton",
- caption: "1",
- value: "beep"
- },
- {
- kind: "RadioButton",
- caption: "2",
- value: "boop"
- },
- {
- kind: "RadioButton",
- caption: "3",
- value: "bop"
- }
- ]
- }
- ],
- myClickFunction: function(inSender, inEvent)
- {
- if (this.$.radioGroup.getValue()=="beep")
- {
- this.$.beep.play();
- }
- else if (this.$.radioGroup.getValue()=="boop")
- {
- this.$.boop.play();
- }
- else
- {
- this.$.bop.play();
- }
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement