Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Flashlight

Explorer ,
Dec 17, 2015 Dec 17, 2015

How can I be assigning an effect, say, "flashlight" in a scenario? Illuminate the site according to mouse route on the scene, in this case, touch screen ...

Could anyone help me?


Below I leave an example:

tub.jpg

TOPICS
ActionScript
743
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Enthusiast , Dec 19, 2015 Dec 19, 2015

You need to fill that shape, not just use an outline.

Translate
Enthusiast ,
Dec 17, 2015 Dec 17, 2015

A mask is the answer. Super easy... just make an oval shape over your image layer - assign as mask and then move that via mouse.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 17, 2015 Dec 17, 2015

Please, if possible, and if not too much disturbance, could explain a 'detailed' way?

Grateful.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Dec 18, 2015 Dec 18, 2015

Google will help lots.. but here's a simple example.

Make a new project.

Add your shark image.

Make a new layer and then draw an oval shape in it. Select the oval and turn it into a movie clip - centered reg point.

Give it an instance name of 'light'

Right click it's layer name (Layer 2) in the timeline and select Mask

Now you should see only that part of the image under the mask

Make a new layer (Layer 3) and then click the Actions tab - enter this code, and then run the movie:

addEventListener(Event.ENTER_FRAME, update);

function update(e:Event):void

{

  light.x = mouseX;

  light.y = mouseY;

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 18, 2015 Dec 18, 2015

Follows exactly the steps you showed me up, but when I got to the part to add to the mask layer 2, the field objects all gone, like the image below.

Would you help me?


1.

antes.png

2.

depois.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Dec 19, 2015 Dec 19, 2015

You need to fill that shape, not just use an outline.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 19, 2015 Dec 19, 2015
LATEST

Thank You!!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines