2014-11-07 8 views
0

슬라이드 쇼용으로 2 개의 이미지를 만들었지 만 문제가 있습니다. 제 문제는 첫 번째 이미지가 두 번째 이미지로 사라질 때입니다. 스택이 멈 춥니 다. 이미지 페이드가 끝나면 스택이 다시 정상으로 돌아갑니다.Livecode의 이미지 슬라이드 쇼

코드.

command aniFadehide curF 
    Switch noFa 
     case 1 
     lock screen for visual effect in rect (the rect of img 1 of grp curF) 
     show img 2 of grp curF 
     hide img 1 of grp curF 
     unlock screen with visual effect dissolve very fast 
     add 1 to noFa 
     break 
     case 2 
     lock screen for visual effect in rect (the rect of img 1 of grp curF) 
     show img 1 of grp curF 
     hide img 2 of grp curF 
     unlock screen with visual effect dissolve very fast 
     put 1 to noFa 
     break 
    end Switch 
    send "aniFadehide curF" to me in 3 secs 
end aniFadehide 
+0

noFa는 전역 변수입니까? – Mark

+0

예, noFa를 전역 변수로 설정했습니다. – KemChat

답변

0

시각 효과를 사용하기 전에 몇 가지 작업을 수행합니다. 우선 QTVersion을 얻음으로써 항상 QT를로드합니다. dontUseQT를 false로 설정하지 않는 이상 LiveCode 7에 더 이상 적용되지 않을 수 있습니다.

둘째, 실제로 시각적 효과가 필요하기 전에 시각적 효과를 보이지 않게 실행하고 나 뒤에 "동결"이 있는지 확인합니다. 예 :

on openStack 
    lock screen for visual effect 
    // nothing here, but you can but something if you want 
    unlock screen with visual effect dissolve very fast 
    pass openStack 
end openStack 

이 핸들러는 시각적 효과를 실행,하지만 당신은 다른 카드로 이동하지 않고 컨트롤을 표시하거나 숨기하지 않기 때문에, 사용은 소프트웨어가 시작하는 그/그녀가 기다리고 s의 생각 .

put 1 to noFaput 1 into noFa이어야하므로 다음은 스크립트에 약간의 오류가있는 것 같습니다.

글로벌 변수 또는 로컬 변수에도 문제가있을 수 있습니다. 그래서, 나는 작업 스크립트를 만들고 여기에 올릴 것입니다. 이 스크립트는 버튼 하나로 실행됩니다.

global noFa 

local lCounter 


on mouseUp 
    put the pendingMessages into myMsgs 
    filter myMsgs with "*aniFadehide*" 
    repeat for each line myLine in myMsgs 
      cancel item 1 of myLine 
    end repeat 
    put 1 into noFa 
    put 0 into Counter 
    aniFadehide 1 
end mouseUp 

command aniFadehide curF 
    add 1 to lCounter 
    Switch noFa 
      case 1 
       lock screen for visual effect in rect (the rect of img 1 of grp curF) 
       show img 2 of grp curF 
       hide img 1 of grp curF 
       unlock screen with visual effect dissolve very fast 
       add 1 to noFa 
       break 
      case 2 
       lock screen for visual effect in rect (the rect of img 1 of grp curF) 
       show img 1 of grp curF 
       hide img 2 of grp curF 
       unlock screen with visual effect dissolve very fast 
       put 1 into noFa 
       break 
    end Switch 
    if lCounter < 10 then 
      send "aniFadehide curF" to me in 3 secs 
    end if 
end aniFadehide