0

我试着在搜索中寻找这个,但它是很多单独的东西打包在一起的。我希望为我的学生制作的是相机上曝光三角形的交互式显示。

它有三个滑块,显示不同设置会发生什么。一个是 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 是一项正在进行的工作,即在滑块滑动时替换预背景模糊图像。

这是最终图像的图片,滑块命名得当。 链接:最终图像

4

1 回答 1

0

One is ISO (controls dark and lightness), another is shutter speed (which controls background blur/depth of field), and aperture, which controls motion blur.

ahem

All of the three settings influence the exposure value, making the image lighter or darker. Additionally:

  • ISO has an effect on noise in the image, which can severely degrade image quality
  • shutter speed is actually the one influencing motion blur and visibility of camera shake
  • aperture (among other things) influences depth of field

I am wondering if the interaction between the sliders would be better accomplished through switching between PRE-PHOTOSHOPPED images by substitution, or using AS3 to accomplish changes on the fly.

Neither of them is a good option.

  • Recreating the effects of the different settings with As3 realistically will take a lot more time (if possible at all) than simply having several images.
  • Recreating the effects in photoshop is probably easier as it is equipped with dozens of photo editing tools, but you'd still have to create the effect realistically.

Instead of photoshopping things, show your students the real deal:

  1. Setup a subject in front of a background to show possible changes in depth of field
  2. Include a solid color area where noise will be easy to see. This could be the background.
  3. Add some motion, to show motion blur. A fan as a subject comes to mind.

Then take those images by varying the settings. Sure, with 5 different values each, you get 125 images. But you get real world example photos. Keep the resolution low, so that the image files aren't too big. Process them by reducing resolution further to a reasonable size, say 800 x 600.

With the images created load them into your swf with the Loader class. The easiest way to keep track of them is to have a three dimensional array of Loader objects. Each slider then manipulates one index to change the image.

于 2016-07-19T23:31:57.207 回答