Skip to main content
Inspiring
July 11, 2021
Answered

Error 5000 flash.display.MovieClip

  • July 11, 2021
  • 2 replies
  • 948 views

Hello i have a problem with all of my actionscript files they all say they need to subclass flash.display.MovieClip but they already do subclass it.

 

P.S This file has rights to it please do not use it for your self. Only the mods at adobe are allowed to view it.

This topic has been closed for replies.
Correct answer Colin Holgate

That suggests that the object is a Sprite and not a MovieClip. Try this:

private var dispCont:Sprite;

You may also need this line earlier on:

import flash.display.Sprite;

2 replies

XerneyAuthor
Inspiring
July 11, 2021

That seemed to work but now im getting this error TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::Sprite@58d1b4815f1 to flash.display.MovieClip.

Colin Holgate
Colin HolgateCorrect answer
Inspiring
July 11, 2021

That suggests that the object is a Sprite and not a MovieClip. Try this:

private var dispCont:Sprite;

You may also need this line earlier on:

import flash.display.Sprite;

XerneyAuthor
Inspiring
July 11, 2021

Thanks that worked its strange how all the other files fixed even though i only edited one file but ill take it

Colin Holgate
Inspiring
July 11, 2021

Should this:

private var dispCont;

be:

private var dispCont:MovieClip;

Otherwise when you say dispCont = mSystem.contMENU; you are assigning a MovieClip to a non-typed variable.

XerneyAuthor
Inspiring
July 11, 2021

We bought the games from the original developers so im unsure but i could try it