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

converting bitmap back to vector and vise versa?

New Here ,
Oct 20, 2018 Oct 20, 2018

Copy link to clipboard

Copied

0 down vote  favorite

    

So I found a V-CAM source, I am now using it and quite happy however, is it possible to untoggled bitmap when the objects that are bitmapped are viewed by the cam? For instance, lets say I have a vector movieclip with a bunch of vector art, I toggle export as bitmap on the movieclip from my IDE, now would it be possible to add on to my VCAM, that everything in its view (it resizes stage) untoggles or redraws back to vector, while the rest of map/movieclip is still in bitmap? And as the VCAM moves away, what was shifted from bitmap to vector gets shifted back to bitmap?

var camColor: ColorTransform = new ColorTransform();

var parentColor: ColorTransform = new ColorTransform();

var cX: Number;

var cY: Number;

var sX: Number;

var sY: Number;

this.visible = false;

var oldMode: String = stage.scaleMode;

stage.scaleMode = StageScaleMode.EXACT_FIT;

cX = stage.stageWidth / 2;

cY = stage.stageHeight / 2;

sX = stage.stageWidth;

sY = stage.stageHeight;

stage.scaleMode = oldMode;

camColor = this.transform.colorTransform;

parentColor = this.parent.transform.colorTransform;

camControl(new Event(Event.ENTER_FRAME));

addEventListener(Event.ENTER_FRAME, camControl);

addEventListener(Event.REMOVED, resetStage);

function camControl(event: Event): void {

camColor = this.transform.colorTransform;

parent.transform.colorTransform = camColor;

var xScale: Number = sX / this.width;

var yScale: Number = sY / this.height;

parent.x = cX - (this.x * xScale);

parent.y = cY - (this.y * yScale);

parent.scaleX = xScale;

parent.scaleY = yScale;

}

function resetStage(event: Event): void {

removeEventListener(Event.ENTER_FRAME, camControl);

parent.transform.colorTransform = parentColor;

parent.scaleX = 1;

parent.scaleY = 1;

parent.x = 0;

parent.y = 0;

}

TOPICS
ActionScript

Views

372

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

Community Expert , Oct 20, 2018 Oct 20, 2018

Why not just use the camera built into Animate now?

Screen Shot 2018-10-20 at 4.38.27 PM.png

Votes

Translate

Translate
Advisor ,
Oct 20, 2018 Oct 20, 2018

Copy link to clipboard

Copied

what do you mean by VCam sources?

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
New Here ,
Oct 20, 2018 Oct 20, 2018

Copy link to clipboard

Copied

The code that I gave preview to. It simply redraws stage.

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
Community Expert ,
Oct 20, 2018 Oct 20, 2018

Copy link to clipboard

Copied

Why not just use the camera built into Animate now?

Screen Shot 2018-10-20 at 4.38.27 PM.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
New Here ,
Oct 20, 2018 Oct 20, 2018

Copy link to clipboard

Copied

LATEST

How do you control it from code?

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