PDA

View Full Version : alpha property not effecting textfields


vee
06-19-2008, 04:34 AM
I have textfields which children of buttons. I cannot seem to get the textfields to be alpha 0. I can get all of their parents to be alpha 0. Why is this?
This would be the targeting from the maintimeline:
menuCont.indCont.btnCont.myButtonsAreHere

heres what I am using now from the maintimeline:
var menuCont:MovieClip = new MovieClip();
this.addChild(menuCont)
function bsRollOver(event:MouseEvent):void {
//bs.ts = 150;
if (menuCont.getChildAt(1).alpha > 0) {
menuCont.getChildAt(1).alpha = 0;
} else {
menuCont.getChildAt(1).alpha = 1;
}
}
//next i call an instance of a menuClass I made
var m1:MenuDot = new MenuDot (mainTL.menuCont);;

Qutaibah
06-19-2008, 05:44 AM
I believe I have hand a similar situation happen to me once before.

Try embedding the fonts. If your TextField is created in the flash IDE, use the properties panel to embed fonts. If your TextField is created at runtime, it will involve using AS3.

SimonK
06-19-2008, 10:39 AM
Qutaibah is right. If you want to take a closer look at this problem this page might explain a bit more:

http://swedishfika.com/2008/06/14/how-to-settween-alpha-of-textfield-in-actionscript-30/

vee
06-19-2008, 05:33 PM
I know how top embed a font and share it with another swf but...
1. how do you use it in the swf that loads it?
2. can you show me using two or more fonts?
heres what i have so far to load 1 font:
var fontLoader:Loader = new Loader();
var fontLoaderInfo:LoaderInfo = fontLoader.contentLoaderInfo;
fontLoaderInfo.addEventListener(Event.COMPLETE, onFontLoaded);
fontLoader.load(new URLRequest("fonts/ArialRegular.swf"));
fontLoaderInfo.addEventListener(Event.COMPLETE, onFontLoaded);
function onFontLoaded (e:Event):void {
trace("finished loading");
}