Jump to content
Search Community

ReferenceError: Error #1056: Cannot create property ID on fl

learner_7n test
Moderator Tag

Recommended Posts

Hi,

 

I am getting the following errors:

 

1) ReferenceError: Error #1056: Cannot create property ID on flash.display.SimpleButton.

at Project_fla::MainTimeline/frame1().

2) ReferenceError: Error #1069: Property ID not found on flash.display.SimpleButton and there is no default value.

at Project_fla::MainTimeline/navClick()

 

The following is the whole code:

 

import com.greensock.*;
import com.greensock.easing.*;
import flash.events.MouseEvent;

var targetSection:String;
var currentSection:String;

var section_clips = [Home_mc,EHS_mc];
for (var j:Number = 0; j < section_clips.length; j++) {
section_clips[j].alpha = 0;
}

var tl:TimelineMax = new TimelineMax();
tl.timeScale = 1;
tl.addLabel("HOME_in", tl.duration);
tl.append(TweenMax.to(Home_mc, 0, {alpha:1, immediateRender:false, onStart:setSection, onStartParams:["HOME"]}));
tl.appendMultiple(TweenMax.allFrom([Home_mc.HomePanel_mc,
Home_mc.BillBoard_mc
],
  .8, {scaleX:0, scaleY:0, alpha:0, ease:Back.easeOut}, .4));
tl.addLabel("HOME_complete", tl.duration);

tl.append(TweenMax.to(Home_mc, .5, {alpha:0, rotationX:80, y:250, x:"20"}));

tl.addLabel("EHS_in", tl.duration);
tl.append(TweenMax.to(EHS_mc, 0, {alpha:1, immediateRender:false, onStart:setSection, onStartParams:["EHS"]}));
tl.append(TweenMax.from(EHS_mc.EHSPanel_mc, .5, {x:"100", alpha:0}));
tl.append(TweenMax.from(EHS_mc.EHSFrame_mc, .5, {x:"-50", alpha:0}), -.25);

tl.addLabel("EHS_complete", tl.duration);
tl.append(TweenMax.to(EHS_mc, .5, {alpha:0, rotationY:90, x:450}));

tl.addLabel("END_in", tl.duration);

// ****************************

ButtonsBar_mc.addEventListener(MouseEvent.CLICK, navClick);

ButtonsBar_mc.Home_btn.ID = "HOME";
ButtonsBar_mc.EHS_btn.ID = "EHS";

function navClick(e:MouseEvent):void {

targetSection = e.target.ID;

if (targetSection != currentSection) {

	if (tl.getLabelAfter().indexOf("_in") != -1) {
		trace("go forward");
		tl.tweenTo(tl.getLabelAfter(), {onComplete:introduceTargetSection});

	}
	else {
		trace("go back");

		tl.timeScale = 3;
		tl.tweenTo(currentSection + "_in", {onComplete:introduceTargetSection});
	}
}
}

function introduceTargetSection() {
tl.timeScale = 1;

tl.tweenFromTo(targetSection + "_in", targetSection + "_complete");
}
function setSection(section) {
currentSection = section;
}

//play through to home_complete automatically on first run
tl.tweenTo("HOME_complete");

 

I tried my best to resolve it. But could not. Please help me out.

 

Buttons Container name is : ButtonsBar_mc

Buttons Names are: Home_btn & EHS_btn

 

Thanks in advance.

Link to comment
Share on other sites

Thanks for the help. Now it is okay. There won't show any errors but still 2 problems are there.

 

1) The Home button (which is movie clip) not working.

2) In out put window I can see only "go forward" but no "go back" those are the trace statements.

 

What could be the reason. The same code is there. No changes.

 

Thanks.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...