Author Topic: starter help  (Read 2889 times)

Blean

  • Newbie
  • *
  • Posts: 1
starter help
« on: January 26, 2012, 04:40:03 AM »
i started making an app and found a few problems right now.

First of all i need ImageButtons with a white box around it. the imagebutton is no problem but i can't do anything else around this button.

Second Problem i got confronted was how to set a background image, because colors are boring. I tried it with canvas but anytime i wanted to click the button on the run nothing happened. it seems as if the button is covered by the canvas. is there any  way to get around this so i can set backround images ?

Third is a System Tool Permission that can act so that i can on long click get a sound as ringtone. i did not figure out how i can get this into it.

Last problem i got is the List thing, because of having only a very little knowing java i can not make a list of transparent buttons with text in it.

I want to make a Soundboard from which i can take sounds as rintgtones or notifications. Just that are some things i would get to know because i bought the HAC because of it should be so simple but now it seems that it is very complicated cause i have no idea where i have to put in scripts and how the script must be written.

Please help me


Malkom

  • Administrator
  • Sr. Member
  • *****
  • Posts: 287
Re: starter help
« Reply #1 on: January 26, 2012, 11:10:26 AM »
Hello Blean

i started making an app and found a few problems right now.

First of all i need ImageButtons with a white box around it. the imagebutton is no problem but i can't do anything else around this button.
All controls such as buttons, canvases etc must work within the area you gave them when created inside HAC although they can be programmatically resized and moved around a device's screen.

You could use a background image to place a white box around each button but it would take more work especially if lots of buttons are involved.

Another option is to use a canvas instead of a button because canvases can receive presses and also hold images.
This way you could make your custom "button" and draw the different surrounds at runtime.
There is a canvas project that might help you get started.




Second Problem i got confronted was how to set a background image, because colors are boring. I tried it with canvas but anytime i wanted to click the button on the run nothing happened. it seems as if the button is covered by the canvas. is there any  way to get around this so i can set background images ?
The Solar System project use a background image -- http://www.hypernextandroid.com/index.html

It also has has invisible canvases over each planet, sun for detecting presses.

Here is the code for loading a background image onto card 3. It assumes the image is stored in the Local folder and it scales the image to fir the card:-

Code: [Select]
Local fname

Put 'Local:chart.png' into fname

CardLoadImage(3,fname,1)




Third is a System Tool Permission that can act so that i can on long click get a sound as ringtone. i did not figure out how i can get this into it.
I'm sorry but the  Long Clicks aren’t working reliably yet but we’ll look at them for the next release.

As a temporary measure for testing perhaps you could use another button alongside that ringtone, or extra column if its inside a listbox.




Last problem i got is the List thing, because of having only a very little knowing java i can not make a list of transparent buttons with text in it.
List box cells do not have a transparent option but just have coloured backgrounds, coloured text and images,
We did have transparency working but it made Listbox scrolling quite slow so must be have been deactivated at some point.
We'll look at this again.



I want to make a Soundboard from which i can take sounds as rintgtones or notifications. Just that are some things i would get to know because i bought the HAC because of it should be so simple but now it seems that it is very complicated cause i have no idea where i have to put in scripts and how the script must be written.

Please help me
I'm sure HAC seems complicated when first learning it, no matter how much programming experience one has.
I still can't remember all the commands and have to look them up but once you have made a Hello World program, worked through a few projects then it will become much much easier as you will know where the scripts should go. By the way, scripts are either in Cards, Controls(buttons etc), Menus, the MainCode section or the Events - these can all be accessed using the Script Editor or Menu Designer.

This post has the 3 steps fr getting HAC installed and running. — http://www.hypernextandroid.com/forum/index.php?topic=90.0

For scripting - this should get you started - http://www.hypernextandroid.com/hnfiles/progfirst.html

A good introduction to HyperNext programming is the QuickStart PDF that came with HyperNext Studio:-

http://www.tigabyte.com/docs/QuickStart.pdf

 
I've added those features you asked about to our To-Do list.

Malkom
I am sorry but I do not have time to answer questions by PM or email.
If you post your questions in this forum then it might help others.