-
Senior Member
MovieClip Depth Weirdly Changing
Click on the link in my signature, then click OK in the SWF presenting up, then MAKE A MAP, then OK again, then draw some map blocks after pressing 1, 2 or 3 in example.
Then press I, you will go to the instructions screen.
OK, now you click on DONE and when you come back the DEPTH of MOUSEBLOCKCURSOR and MOUSEBLOCK will be set to -16381 and -16379.
Fact is that every time you enter in the BUILDMAP the swapdepth is made and I put the blocks at 10001 and 10002.
What's happening?
HEXTRATEGY - Coming August 2003 (I hope)
-
Senior Member
Make a variable in the beginning:
_root.infovisible=0;
now when user presses I add
_root.infovisible=1;
and when info is closed
_root.infovisible=0;
Now in the actions for your mouseblocks and swapdepths and stuff, put it all inside condition:
if(_root.infovisible==0){
...
}
Hope it helped
-
Senior Member
No, sorry, mate, because I forgot to tell you that when you press I you are going to another frame where are the instructions and the button to get back to the frame to build map.
When you press I first time I remove all blocks, then when you click DONE I get back to the frame where the map is built.
What I don't understand is why repeating the same action in the frame the depths change...
When I remove the instances of the map the depths should free too, isn't it?
So when I get back to that frame nothing shold have changed... what hell is that number -16xxx???
HEXTRATEGY - Coming August 2003 (I hope)
-
Senior Member
Done.
The problem was in the second entering in the building map frame: I was setting the depth of the mouseblock from inside the mouseblock pointing at itself this way: code: _root.mouseblock._x = _root._xmouse;
I replaced with code: this._x = _root._xmouse;
I think this thing was making Flash a bit crazy is it possible?
HEXTRATEGY - Coming August 2003 (I hope)
-
Hype over content...
I know you've solved your problem but this may prove helpful:
There's a major bug in Flash ( MM say it's a "feature" ) involving swapDepths() and author time content.
If you place a mc on the stage and then use swapDepths on it and then loop back to the frame it was first placed on the stage you'll end up with a duplicate copy.
The weird depths you were reporting show the mc is author time content ( depths show up as between -1 and -16383 ) rather than dynamic content.
Squize.
-
Senior Member
LOL so here it is!!!
Thank you very much... I knew that the old code it should have been good anyway!
HEXTRATEGY - Coming August 2003 (I hope)
-
Hype over content...
No worries, I've wasted days and ripped out so much good code because of that "feature"
It's one of those strange quirks of Flash that is very difficult to find out any info about.
Squize.
-
Senior Member
Yes, already the system is much particular to program for my tastes... if there are also these hidden bugs the thing becomes really heavy :|
HEXTRATEGY - Coming August 2003 (I hope)
-
Hype over content...
Flash isn't really that buggy, just got some quirks here and there
The swapDepths one is strange, 'cause finding anything out about it was really difficult ( MM haven't even published a white paper, and have no plans to ) so I thought it was just me being stupid.
99% of the quirks are really well documented with workarounds.
Squize.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|