Skip to main content
barpos
Known Participant
March 21, 2011
Answered

Error message pointing to an unavailable AS line #

  • March 21, 2011
  • 1 reply
  • 459 views

Hi,

The error message I'm getting suggests the culprit might be on line #235.  I have no such line number anywhere.  But I have to admit, I have two Actions layers on my main timeline.  Could it be that the line numbers are combined off the two actionscript layers?

TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::BitmapData@173f8f11 to flash.display.Bitmap.
    at Function/WebsiteNew_fla:MainTimeline/RollingTractor/WebsiteNew_fla:tractorBodyLoadComplete/WebsiteNew_fla:backWheelLoadComplete/WebsiteNew_fla:frontWheelLoadComplete()[WebsiteNew_fla.MainTimeline::frame1:235]

This topic has been closed for replies.
Correct answer kglad

yes.  layers don't exist in your swf.

so, to find the problematic line number add the total lines in each layer starting from the top layer (unless you specified a different load order).  the first layer that exceeds the problem line number contains the problematic line of code.  subtract the total lines in the layers above the problem containing layer from the line number in the error message and you'll have the problematic line number in the problem containing layer.

1 reply

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
March 21, 2011

yes.  layers don't exist in your swf.

so, to find the problematic line number add the total lines in each layer starting from the top layer (unless you specified a different load order).  the first layer that exceeds the problem line number contains the problematic line of code.  subtract the total lines in the layers above the problem containing layer from the line number in the error message and you'll have the problematic line number in the problem containing layer.

barpos
barposAuthor
Known Participant
March 21, 2011

That's exactly what I thought.  I wasn't sure since the code the error is pointing at seems perfectly OK.

Regards!

Ron

kglad
Community Expert
Community Expert
March 21, 2011

you're welcome.