我试着在搜索中寻找这个,但它是很多单独的东西打包在一起的。我希望为我的学生制作的是相机上曝光三角形的交互式显示。
它有三个滑块,显示不同设置会发生什么。一个是 ISO(控制黑暗和亮度),另一个是快门速度(控制背景模糊/景深)和光圈,控制运动模糊。我能够制作一个滑块,在黑暗中有效地改变测试图像。我目前正在研究快门速度的滑块。
我想知道滑块之间的交互是否可以通过替换在 PRE-PHOTOSHOPPED 图像之间切换或使用 AS3 即时完成更改来更好地完成。例如,如果他们同时移动快门速度和 ISO 的滑块,它会变暗并且背景模糊。我是否需要预先对所有可能的选项进行 photoshop,并切换符号,或者我可以使用 AS3 交互地进行操作吗?
这是我的代码:
import flash.utils.getDefinitionByName;
import fl.motion.Color;
import fl.events.SliderEvent;
var myImageName1 = "blurback.jpg";
var classRef:Class = getDefinitionByName(myImageName1) as Class;
var instance:MovieClip = new classRef();
var c:Color=new Color();
var color = "#000000";
ISO.addEventListener(SliderEvent.CHANGE, sliderChanged);
aperture.addEventListener(SliderEvent.CHANGE, apertureChanged);
function sliderChanged(evt:SliderEvent):void {
tintClip();
}
/*
The 'setTint' method of of the Color class takes two parameters: tint
multiplier,
(a number between 0 and 1), and a tint color.
The tint multiplier, is determined by the positon of the slider, 'val'
and equals val/100.
The tint color, 'color', is determined by the color selected
in the picker.
*/
function tintClip():void {
var val:Number=ISO.value;
c.setTint(color,val/10);
kitty.transform.colorTransform=c;
}
function apertureChanged(evt:SliderEvent):void {
gotoAndPlay(2);
/*kitty.addChild(instance);*/
}
我仍在尝试使用第二个滑块,因此 gotoand play 是一项正在进行的工作,即在滑块滑动时替换预背景模糊图像。
这是最终图像的图片,滑块命名得当。 链接:最终图像