Created
June 21, 2011 09:21
-
-
Save moluapple/1037513 to your computer and use it in GitHub Desktop.
Funny Time!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/********************************** | |
* 提示、警告框,模拟切入淡出效果 | |
* for Adobe Illustrator, Indesign | |
**********************************/ | |
#targetengine 'session'; | |
var | |
i = 0, | |
s = $.screens[0].toString().split ('-')[1].split(':'), | |
len = s[0]/10, | |
y = s[1]/2 - 158, | |
w, img; | |
w = new Window ('palette', undefined, undefined, {borderless: true}); | |
img = w.add ('image', undefined, File(app.filePath + '/(InDesign Resources)/idrc_PNGA/294.idrc')); | |
w.margins = [0,0,0,0]; | |
img.addEventListener('click', function (){w.close(0); w = null}); | |
w.location = [0 , s[1]/2 - 158]; | |
w.show(); | |
while (i < len && w != null){ | |
$.sleep (20); | |
w.location = [i * 10, y]; | |
w.opacity -= 0.002; | |
++i; | |
} | |
w.close(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Test with Indesign CS5, Win7