Problem with text and depth assignment

I have placed text boxes within instances of buttons which contain movie clips. There is an assign depth script attached to each button instance.

On placing the text in the boxes I have noticed that flash automatically re-scales or distorts the text. For example size 12 font in one box doesn’t appear to be the same in another.

Do I have to assign depths to the text as well or is there something I can turn on or off in flash mx?

regards

Is it text that you are importing or HTML ? Because you can change the font when importing HTML to a text box, and if you have Render as HTML activated, maybe that’s the origin of your problem

The text has been created in flash, does this mean it is HTML text, in anycase it is not imported, simply created using the text function from the tools menu

Then the text should appear with the aspect you define in the dynamic text tool. You define the font, it’s size and several aspects of the box. I never had problems like that. Do you use MX ?

I am using flash mx, but I haven’t tried the dynamic text options, I am deconstructing the .fla to find the problem. Before I go would you know the difference between:

_level0 = “3”;

and

_level0:highest = “3”;

I am thinking this is a part of the problem

regards

*Originally posted by jimw00d *
**I have placed text boxes within instances of buttons which contain movie clips. There is an assign depth script attached to each button instance. **
:q: You’ll have to repeat that, sir. What’s inside of what exactly? And what’s a depth script?

And concerning the lines you posted, did you intentionally write : or is it just a typo?

pom :hat:

Please don’t send me PM with questions, I read the board :slight_smile:

So your question was

I have solved the problem with the text, however the script was suggested to me for adding an assign depth function to my mcs.

I take it from your reply that I’ve screwed up somewhere.

I must have posted about 20 threads on this, yes, my first flash attempt.

I understood the script:

_level0:highest = “3”;

to be fine when used with swap depth scripts such as:

on (rollOver) {
this.swapDepths(100 );
}
on (rollOut) {
this.swapDepths(3);
}

I am mistaken?

Well, I still don’t see what that level0 line has to do here. You don’t use it anywere.

But if you want to use depths on movie clips, yeah, you’ll have to use swapDepths the way you said. If you want to use it on text, you’ll have to change that a bit.

But I don’t know, you tell me: is it working?

pom :asian:

The .fla works ok with the alpha tween and the depth command. I thought the _level assigned the level 0 to the stage and therefore the other items would be able to understand this in a relational sense.

Bugger, I guess might be the thing to say.

I’ve already has someone this morning tell me to stay away from nested buttons, shame really given the .fla is based on them entirely.

I’ll take the _level line out and see what changes it produces

cheers

If you wanna see the .fla here it is

Also, any idea how to stop nested buttons triggering an animated mc?

I believe tsavo helped you with your fla, then I modified it with the swapDepths, and it work fine - except the layers overlapped and faded when you didn’t want - I didn’t say anything about _level0:highest = “3”.

Tsavo then put invisible buttons which worked fine in my opinion, except the fact that you had an mc, then a button then mcs in the button states. Again this was fine - excpet you wanted to fade effect to occur by button press. Now to do this you have to be able to target those mcs that you put in the button states. And I’m not sure you can do that.

_root.mc.button - then what? If you can point to the over or up state, then fine but I’m not aware of a way of doing that.

I advised you to put your tweens, fade in and out, in one mc, and have a button inside the mc. You could then refer to the fade effects from another button easily.

Just be _root.mc.gotoAndPlay(“fadeIn”) or whatever.

Also note that the mods I made were to test it, and the swapDepths(100) could just be 4 since there are 4 menu items.

I didn’t say it was the complete solution.

I think what you want can be achieved by the collaborated efforts of yourself initially, tsavo and I.

_level has nothing to do with what you want to achieve.

The simple fact is that I have managed to come this far, not very far admittedly, without a fundamental appreciation of AS. Therefore I have had to rely on others in the first instance and then trial and error.

At the moment I have

MC-Button-Animated MC.

My end goal is to place items inside each box that can trigger other events such as loading movies, inside each box, rather than inside the main stage.

Would it be advisable then to cut out the buttons and use AS to target a fade in/out effect on each box?

I think the end result will be the same but maybe my approach will take longer and prove more frustrating.

Any help would be great

I don’t think you can do it with mc.button.mc - because you can’t target it the mcs in the buttons. You may - but I’m not sure how- althoug admittedly I haven’t looked into it properly.

I know it’s frustrating but you’ll save yourself a whole lot of trouble if you do it mc.button, even mc.mc.button.