Skip to main content
Participating Frequently
September 1, 2018
Answered

Please help - Dress up game glitches when too many items are added

  • September 1, 2018
  • 1 reply
  • 933 views

So this is the dress up game :

Wip - shadowphoenixfox's Sta.sh

and as you can see if you add too many items things just kinda go missing.

Why does it do this and how can I fix it?

Also I'm very much new to adobe animate and actionscript so maybe it's something wrong with the code

I'm not sure if it's related but I've been getting the error;

ReferenceError: Error #1056: Cannot create property buttonMode on flash.display.SimpleButton.

at wip_fla::hair_panel_1/frame3()

at flash.display::MovieClip/gotoAndStop()

at wip_fla::hair_panel_1/btn3()

I didn't pay too much attention to it because A. I couldn't figure out what was wrong and B. I don't know how to fix it, but could this have something to do with it? btn3 is this by the way

shirtbtn.addEventListener(MouseEvent.CLICK, btn3);

function btn3(event:MouseEvent):void{

gotoAndStop(3);

}

its not really any different from my other buttons so I don't understand. If I get rid of the btn3 code it gets rid of the error but I still get the glitch so they're probably not related.

This topic has been closed for replies.
Correct answer kglad

wip.fla - Google Drive


i don't see a problem.  there's probably a problem with your computer/video memory.

1 reply

kglad
Community Expert
Community Expert
September 1, 2018

you're using something like shritbtn.buttonMode somwhere and that's triggering that 1056 error.

click file>publish settings>swf and tick 'permit debugging' and retest.

the problematic line number will be in the error message.

Participating Frequently
September 1, 2018

Alright Thank you! I managed to fix the 1056 error, seems there were two buttons that were meant to be movie clips oops

However I'm still getting the main issue of the game glitching out when I stack too many items

kglad
Community Expert
Community Expert
September 3, 2018

nothing is dragged everything is put on through clicking a corresponding icon. I'm using variations of this code on all the icons so they will put on the clothing on the doll

import flash.events.MouseEvent;

var myHairArray = [down, buns, pigtail, plaits];

for each (var Hair in myHairArray) {

Hair.addEventListener(MouseEvent.CLICK, onHairClick);

Hair.buttonMode = true;

}

function onHairClick (event:MouseEvent):void {

MovieClip(parent).hair_mc.gotoAndStop(event.target.name);

}

so the depth shouldn't be changing as you play


then you're not adding anything to the stage that's not on stage with your swf starts.  what makes you think there's a problem "..when too many items are added"?