Home / Topic / USE BUTTON JUST ONE

USE BUTTON JUST ONE

Home Kwiksher Forums Help me! USE BUTTON JUST ONE

Viewing 8 posts - 1 through 8 (of 8 total)
  • drhernand
    Participant
    #84179

    Hi, i have the following things into a button:

    – edit variable = count + 1
    – play sound
    – play animation
    – condition “If count = 5 then
    play animation
    end if”

    it works, but i need to know how i can made that the button can be press it just 1 time.

    Example: the kids touch the button, then run all that i mention but if the kids touch againg de same button i won’t do it nothing.

    Thanks

    Jorge
    Participant
    #84182

    It took me a while to figure out.
    Try to add the following code to you button through Add External Code. You can do it just after your END if.

    self:removeEventListener(“tap”, onnameofyourbuttonimageEvent )

    You have to replace
    nameofyourbuttonimage
    by the name of the image layer of your button. Not the name of the button.

    Publish and see the result.
    Hope it helps.

    drhernand
    Participant
    #84183

    Hi Jorge,

    Thanks for the answer i try it but didn’t work, this is what corona say:

    drhernand
    Participant
    #84184

    drhernand
    Participant
    #84185

    Ok this is the link of the picture… http://2.1m.yt/pbvFqfw1P.png

    Jorge
    Participant
    #84187

    Can you post a copy/paste of what Corona says on line 765 of your Corona project? If you do not know how to do it, just get Notepad++ (free) and open page 6. Do this message appear as a result of the line of code I have provided?

    There is also something going on on your page 3, line 711, I guess!

    drhernand
    Participant
    #84191

    Thaks Jorge, here is the two screem capture from page 14 where i put the external code and the page 3

    http://2.1m.yt/586kFmvtf.png

    http://2.1m.yt/8fW_nuS1a.png

    Thanks

    Jorge
    Participant
    #84199

    It seems that you have missed part of the code.

    Where you have earsdad (I think this is what you have written-I can not see very well) on line 765 replace by

    onearsdadEvent

    Please not that this works as follows:

    on
    your layer name (earsdad?)
    Event

    all together

    Use Notepad++ again to edit the code.

    As far as page 13 is concerned I do not know. Try to solve the button issue and see what happens.

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.

Privacy Preference Center

Strictly Necessary

these coolies are for WP-SpamShield, gdpr-wp, woocommerce, paypal

PHPSESSID, SJECT16, JCS_INENREF, JCS_INENTIM, gdpr, woocommerce_cart_hash, woocommerce_items_in_cart, woocommerce_recently_viewed, wordpress_, wordpress_logged_in_, wordpress_sec_, wordpress_test_cookie, wp_woocommerce_session_, AKDC, akavpau_ppsd

Functionality

WordPress cookie created when auto-saving a post in the editor.

wp-saving-post, wp-settings-, wp-settings-time-

Performance

google analytic

__utma,__utmb,__utmc,__utmz,_ga,_gid,_gat

Advertising