Highlighted

Virtual Camera in Animate with Actionscript

Participant ,
Feb 17, 2020

Copy link to clipboard

Copied

Has anyone got this to work when using ActionScript 3 classes, ie not having code on the timeline.

 

It seems to me that Virtual Camera can work with Actionscript if the only actioscript is in the timeline frames Actions windows.

 

As soon as you add a Document class eg Main.as - it starts to thriw weird errors.

 

I tried to import an external class into Actionscript in the timeline (eg seeing frame 1 Actions as Main.as)

but didnt work.

 

Any suggestions help, appreciated.

 

Tommy Banana

TOPICS
ActionScript

Views

348

Likes

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

Virtual Camera in Animate with Actionscript

Participant ,
Feb 17, 2020

Copy link to clipboard

Copied

Has anyone got this to work when using ActionScript 3 classes, ie not having code on the timeline.

 

It seems to me that Virtual Camera can work with Actionscript if the only actioscript is in the timeline frames Actions windows.

 

As soon as you add a Document class eg Main.as - it starts to thriw weird errors.

 

I tried to import an external class into Actionscript in the timeline (eg seeing frame 1 Actions as Main.as)

but didnt work.

 

Any suggestions help, appreciated.

 

Tommy Banana

TOPICS
ActionScript

Views

349

Likes

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
Feb 17, 2020 0
Participant ,
Feb 17, 2020

Copy link to clipboard

Copied

OK- I take it back. Got it working.

 

I moved entire Actionscript based app;ication into a movieclip MC1 - with all code as an external MC1.as class-  - and added it to stage. I am treating frame 1 actions as Main.as and putting the cameraObj code in there and triggering camera functions  from MC1 by reference to MovieClip(root).cameraFunction(null). seems to be working - woop woop !

Likes

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
Reply
Loading...
Feb 17, 2020 0
Adobe Community Professional ,
Feb 17, 2020

Copy link to clipboard

Copied

You have been a few seconds faster than me. Haha

 

Anyway, I'm glad it worked!

__________________________________________
HTML5, JSFL, and AS3 samples: http://bit.ly/2mJgDoG

Likes

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
Reply
Loading...
Feb 17, 2020 0
Adobe Community Professional ,
Feb 17, 2020

Copy link to clipboard

Copied

Hi.

 

What version of Animate are you using?

 

Some previous releases indeed had some issues with the Virtual Camera, but these issues have been fixed in the most recent versions as far as I can tell.

 

And I just ran a test here using a Document Class and a Virtual Camera and everything worked as expected.

 

 

Regards,

JC

__________________________________________
HTML5, JSFL, and AS3 samples: http://bit.ly/2mJgDoG

Likes

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
Reply
Loading...
Feb 17, 2020 0
Participant ,
Feb 17, 2020

Copy link to clipboard

Copied

Using Aimate CC 2020. Are you able to put the VirtualCAmera code into an external class and get it to work without throwing type 1010 errors.

Likes

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
Reply
Loading...
Feb 17, 2020 0
Adobe Community Professional ,
Feb 17, 2020

Copy link to clipboard

Copied

Yeah, I am.

 

This is how my Document Class code looks.

package
{
	import flash.display.MovieClip;
	import fl.VirtualCamera;

	public class Main extends MovieClip
	{
		public function Main()
		{			
			var camera:VirtualCamera = VirtualCamera.getCamera(root);
			camera.setZoom(200);
		}
	}
}

 

__________________________________________
HTML5, JSFL, and AS3 samples: http://bit.ly/2mJgDoG

Likes

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
Reply
Loading...
Feb 17, 2020 0
Participant ,
Mar 01, 2020

Copy link to clipboard

Copied

Do you get any "ReferenceError: Error #1069: Property containertype not found" errors when adding children?

 

Best Tommy B.

Likes

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
Reply
Loading...
Mar 01, 2020 0
Participant ,
Mar 01, 2020

Copy link to clipboard

Copied

I mean when adding a child movieclip to the document class?

Likes

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
Reply
Loading...
Mar 01, 2020 0
Participant ,
Mar 01, 2020

Copy link to clipboard

Copied

I am getting this if I have the camera switched on - ie the camera layer added in timeline - even if no virtual camera code used. If I switch camera off errors dissappear....

Likes

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
Reply
Loading...
Mar 01, 2020 0