newbie Q: Button with custom graphic?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 83
- Joined: Mon Oct 31, 2011 5:28 am
newbie Q: Button with custom graphic?
Hi All,
I thought this would be a simple task, but I'm failing at having a simple pushbutton with a custom graphic (for it's up and click state). I have mobGUI but the buttons in that that I seem to be able to customise with a graphic are radio buttons and only one of them can be active. The "push button" is only able to take colours (happy to be wrong on that of course)
So how can I make a simple pushbutton with a custom icon to respond to touch events?
Many thanks
Dale
I thought this would be a simple task, but I'm failing at having a simple pushbutton with a custom graphic (for it's up and click state). I have mobGUI but the buttons in that that I seem to be able to customise with a graphic are radio buttons and only one of them can be active. The "push button" is only able to take colours (happy to be wrong on that of course)
So how can I make a simple pushbutton with a custom icon to respond to touch events?
Many thanks
Dale
Re: newbie Q: Button with custom graphic?
Get Your custom graphic prepared close to the size you want it and save it as a .png file. Then under the file menu select "import as control" Image file. The image will appear in your stack. double click on it to view its properties and note the image id number. It will be a 4 digit number. say 1021. Then chose the button that you want to alter and double click on it in edit mode to bring up the properties of the button. Choose "Icon & Border" then type in 1021 under the icon. Walla.. your button is now your image. Change the color of the graphic and make it a little bigger and import it as well. note it's number and type it into the "highlight" or "hoover" selection under "icon and border" and the button will animate based on your creativeness.
hope this helps.
dave
hope this helps.
dave
-
- Posts: 83
- Joined: Mon Oct 31, 2011 5:28 am
Re: newbie Q: Button with custom graphic?
awesome, thanks for the reply, much appreciated. 

Re: newbie Q: Button with custom graphic?
PS The above lesson is for live code irrespective of mobGui. Mob guy saves buttons as groups i think and although its supposed to make life easier I didn't find that to be true. I always end up doing my own thing in live code because mobgui creates erratic behavior in my stake.
Dave
Dave
-
- Posts: 83
- Joined: Mon Oct 31, 2011 5:28 am
Re: newbie Q: Button with custom graphic?
So you have to keep the graphic imported as a control somewhere on page hidden? I just deleted it, then the icon on my button deleted as well. Also where exactly is the hilite fill colour hidden, I can't see it on the colours and patters menu for the button (currently it's set to a rather awful blue.
thanks!
thanks!
Re: newbie Q: Button with custom graphic?
Yes you have to hide your images that you are using as button icons. If you delete them they will disappear from your button. If you resize your image from the original size make sure you check the "lock size and position check box as well. Otherwise they tend to revert to their original size when you reopen your stack etc. Once you have your button size and location set its a good practice to lock the size and position. I usually try and keep all the hidden images in one group and stack them on top of one another so as not to take up a lot of space.
One question I have is do I need to copy the folder of .png graphics into my IOS bundle when I create my IOS standalone? Does apple want to see all the components of my app before I submit for approval? Not sure about that.
Dave
One question I have is do I need to copy the folder of .png graphics into my IOS bundle when I create my IOS standalone? Does apple want to see all the components of my app before I submit for approval? Not sure about that.
Dave