Start a new topic

Not able access my WEBAPP

 

def uiButtonClickEventListener1():
    global lives, score, timer, Game_pro
    Canvas.goToCanvas("appScreen_1")
    score = 0
    timer = 10
    lives = 3
    Game_pro = 1
    Label.setText('Label7', score)
    Label.setText('LIVES SHOW', lives)
    Label.setText('show timer label', timer)
    while not Game_pro == 1:
        AppElement.setProperty('STRAWBERRY', AppElementProperty.LEFT, (random.randint(50, 600)))
        AppElement.setProperty('STRAWBERRY', AppElementProperty.TOP, (random.randint(10, 600)))
        Time.sleep(0)


Button.onClickEvent('Button', uiButtonClickEventListener1)


def uiButtonClickEventListener2():
    global lives, score, timer, Game_pro
    AppElement.setProperty('STRAWBERRY', AppElementProperty.LEFT, (random.randint(50, 600)))
    AppElement.setProperty('STRAWBERRY', AppElementProperty.TOP, (random.randint(10, 600)))
    Time.sleep(1)
    score += 1
    Label.setText('Label7', score)


Button.onClickEvent('STRAWBERRY', uiButtonClickEventListener2)


def uiButtonClickEventListener3():
    global lives, score, timer, Game_pro
    quit()


Button.onClickEvent('left', uiButtonClickEventListener3)


def uiButtonClickEventListener4():
    global lives, score, timer, Game_pro
    Canvas.goToCanvas("appScreen_2")
    while not lives == 0:
        timer -= 1
        Label.setText('show timer label', timer)
        Time.sleep(1)
        if timer == 0:
            Game_pro = 0
            break
    if lives == 0 or Game_pro == 0:
        Canvas.goToCanvas("appScreen_3")
        Textbox.setText('Textbox_1', score)
        if score > (int((CloudData.getKeyValue('HIGH_ScORE')))):
            CloudData.setKeyValue('HIGH_ScORE', score)
            Textbox.setText('Textbox', (int((CloudData.getKeyValue('HIGH_ScORE')))))
        else:
            Textbox.setText('Textbox', (int((CloudData.getKeyValue('HIGH_ScORE')))))


Button.onClickEvent('PLAY', uiButtonClickEventListener4)


def uiElementsCommonEventListener1():
    global lives, score, timer, Game_pro
    lives -= 1
    Label.setText('LIVES SHOW', lives)


AppElement.onEvent('Image', uiElementsCommonEventListener1, AppEvent.CLICK)


def programStartListener1():
    global lives, score, timer, Game_pro
    score = 0
    timer = 10
    lives = 3
    Game_pro = 1
    Label.setText('Label7', score)
    Label.setText('LIVES SHOW', lives)
    Label.setText('show timer label', timer)
    while not Game_pro == 0:
        AppElement.setProperty('STRAWBERRY', AppElementProperty.LEFT, (random.randint(50, 600)))
        AppElement.setProperty('STRAWBERRY', AppElementProperty.TOP, (random.randint(50, 600)))
        Time.sleep(1)


onProgramStart(programStartListener1)

 I've build up my web app and got the link for it too but prob is that there is a technical glitch in it. The design and style is totally different from the original one on your app(that I've created).

Like- * Timer starts from -1 (in browser) but in app it starts from 1.

* Some letters are in small case but some are in upper case (in browser) but in plezmo app it is all fine

* And lives too goes in negative (in bowser ) but in plezo app it's in positive only

fhv.PNG
(202 KB)
tgh.PNG
(1.92 MB)
thg.PNG
(1.3 MB)
1 Comment

Hi, can you share the zip file

Login to post a comment