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

Flashlight

Explorer ,
Dec 17, 2015 Dec 17, 2015

Copy link to clipboard

Copied

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

Views

647

Translate

Translate

Report

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.

Votes

Translate

Translate
Enthusiast ,
Dec 17, 2015 Dec 17, 2015

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Grateful.

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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;

}

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

LATEST

Thank You!!

Votes

Translate

Translate

Report

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