I was wondering if someone ca开发者_运维知识库n look at the ActionScript (2.0) i have from a flash menu that I bought. I know some flash but can't seem to find a way to make the images cycle through all the photos in the folder instead of loading just one random static .jpg. Also, I would like the images to load with a fade effect.
Thanks for any help!!!
The main AS
//PHOTO photo = random(5)+1; loadMovie("flash-header-images/"+photo+".jpg", pic.loadhere); onEnterFrame = function () { lefta = gotoa-_alpha; _alpha += lefta/8; if (loadhere._alpha>100 && _alpha>100) { delete onEnterFrame; } };
The frame that the pics load
onEnterFrame = function () { if (loadhere._height>30) { masker.nextFrame(); } else { masker.prevFrame(); } };
Its not possible to browse a folder in pure as2. Your XML contains path and images names, the only way to do it is to use a php (or any server side script) to browse the folder and output the results in XML.
精彩评论