Antwort auf: 2 Scripts gleichzeitig starten

Startseite Foren Deutsches LiveCode-Forum 2 Scripts gleichzeitig starten Antwort auf: 2 Scripts gleichzeitig starten

#8281
HeiMa66
Teilnehmer

    global tZaehler,tZaehler2,tZaehler3,tTS,tTS2/*TopSpinne*/,tHG,tHG2/*heightLinie*/, tHBL,tHBL2/*BottonLinie*/, tLS,tLS2/*LeftSpinne*/,tWechselRichtung,tWechselRichtung2,tSpinne1,tSpinne2
    on spinne1Bewegen
    if the top of img“spinne1″ < 110 then
    spinneWaagerechtSpinne1
    else
    spinneSenkrechtSpinne1
    end if
    end spinne1Bewegen

    on spinneWaagerechtSpinne1
    set the angle of img“spinne1″ to 90
    if tZaehler2 is not empty then
    repeat with x = 1 to tZaehler2
    set the left of img“spinne1″ to tLS – x
    wait 30 milliseconds
    end repeat
    subtract tSpinne1 from tLS
    put tLS into tLS
    put empty into tZaehler2
    else
    repeat with x = 1 to tSpinne1
    set the left of img“spinne1″ to tLS – x
    wait 30 milliseconds
    end repeat
    subtract tSpinne1 from tLS
    put tLS into tLS
    end if
    end spinneWaagerechtSpinne1

    on spinneSenkrechtSpinne1
    repeat with x=1 to tSpinne1
    set the top of img“spinne1″ to tTS – x
    put tTS-x into tWechselRichtung
    if tWechselRichtung = 109 then
    put the left of img“spinne1″ into tLS
    subtract x from tSpinne1
    put tSpinne1 into tZaehler2
    spinneWaagerechtSpinne1
    exit spinneSenkrechtSpinne1
    end if
    set the bottom of graphic“line1″ to tHBL – x
    set the height of graphic“line1″ to tHG – x
    wait 30 milliseconds
    end repeat
    put tTS – tSpinne1 into tNew
    put tNew into tTS
    put tHG – tSpinne1 into tNew2
    put tNew2 into tHG
    put tHBL – tSpinne1 into tNew3
    put tNew3 into tHBL

    /*repeat with x = 1 to 15
    set angle of img“fliege“ to 300
    wait 15 milliseconds
    set angle of img“fliege“ to 240
    wait 15 milliseconds
    end repeat*/
    end spinneSenkrechtSpinne1`