Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adobe Animate Nested MovieClip "synched" mode issue #1030

Open
danzen opened this issue Jul 1, 2019 · 1 comment
Open

Adobe Animate Nested MovieClip "synched" mode issue #1030

danzen opened this issue Jul 1, 2019 · 1 comment

Comments

@danzen
Copy link
Contributor

danzen commented Jul 1, 2019

Hey folks, the Adobe Animate Export to Canvas has changed slightly over the last version. It seems that MovieClips are wrapped in MovieClips and when you run these from Animate it all seems to work - but if you instantiate the outer clip with code, going to the labels are not working in the default "independent" mode. If that is changed to "synched" in the exported code then it works. If you need the full files I can send them. (Not my code - just passing the issue along). Thanks!

(lib.BoyMC = function(mode,startPosition,loop) {
if (loop == null) { loop = false; }	this.initialize(mode,startPosition,loop,{sad:0,happy:29});

	// timeline functions:
	this.frame_0 = function() {
		this.stop();
	}
	this.frame_29 = function() {
		this.stop();
	}
	this.frame_59 = function() {
		this.___loopingOver___ = true;
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(29).call(this.frame_29).wait(30).call(this.frame_59).wait(1));

	// Layer_1_obj_

	/////this is original code that has been replaced////
	////////////////////////////////////////////////
	//this.Layer_1 = new lib.Boy_Layer_1();
	////////////////////////////////////////////////

	this.Layer_1 = new lib.Boy_Layer_1("synched"); // it all works now
	
	this.Layer_1.name = "Layer_1";
	this.Layer_1.parent = this;
	this.Layer_1.setTransform(200,199.5,1,1,0,0,0,200,199.5);
	this.Layer_1.depth = 0;
	this.Layer_1.isAttachedToCamera = 0
	this.Layer_1.isAttachedToMask = 0
	this.Layer_1.layerDepth = 0
	this.Layer_1.layerIndex = 0
	this.Layer_1.maskLayerName = 0

	this.timeline.addTween(cjs.Tween.get(this.Layer_1).wait(60));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(0,0,400,400);

Then in our script we might have:

var boy = new lib.BoyMC();
stage.addChild(boy);
boy.gotoAndPlay("happy"); // does not work unless we make the change
@danzen
Copy link
Contributor Author

danzen commented Jul 19, 2019

Hey folks - any thoughts on this - thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant