Jump to content

Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  

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

Recommended Posts



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"]}));
  .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


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.

Share this post

Link to post
Share on other sites

you can't assign new properties to Button symbols. you need to use Movie Clip symbols.

Share this post

Link to post
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.



Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.