A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: [F8] alpha problem

  1. #1
    will i ever get it?
    Join Date
    Feb 2004
    Posts
    707

    [F8] alpha problem

    hi all...i have a problem setting the alpha of an mc. I think this may have something to do with using an external css, but perhaps i'm totally off. My function looks like this....

    Code:
    function setNewsBoxText(idNews){
    	removeMovieClip(postedNews);
    	removeMovieClip(dateBox);
    	//****************DATTE BOX
    	var dateBox:MovieClip=this.createEmptyMovieClip("dateBox",this.getNextHighestDepth());
    	
    	var dateBoxTx:TextField=dateBox.createTextField("dateBoxTx",0,0,0,500,100)
    	dateBoxTx.autoSize=true;
    	//dateBoxTx.setNewTextFormat(dateTextFormat);
    	//dateBoxTx.embedFonts=true;
    	//dateBoxTx.antiAliasType="advanced";
    	dateBoxTx.html=true;
    	dateBoxTx.styleSheet=fmStylesSheet;
    	
    	dateBoxTx.htmlText="<span class='fm_date_big'>"+idNews.thisDate;
    	dateBox._alpha=10
    }
    it loads the text fine, and looks/position is great...only the alpha is always 100%....any ideas????

  2. #2
    A Flurry of Activity
    Join Date
    Aug 2005
    Posts
    103

    asdf

    *points*

    Code:
    dateBoxTx._alpha=10
    lol I hope you saw that. simple mistake.

    (unless datebox is a parent movieclip of dateboxtx?)
    maximum width 300 no more maximum hieght 40 no more not interchangable

  3. #3
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    it loads the text fine, and looks/position is great...only the alpha is always 100%....any ideas????
    your _alpha shoud be set on some form of onData. When you know the MC has been created and Vars loaded. For example, in the LoadVars() code, instead.

    gparis

    gparis

  4. #4
    will i ever get it?
    Join Date
    Feb 2004
    Posts
    707
    dateBox is a parent clip, that was why i chose tht for the alpha feature. Either way, no matter which i choose, it won't work. gparis...can you elaborate more. i am not sure where to put an onData call. All the text loads from XML, but even an onData with xml did not do the job

  5. #5
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    Is there something else in that dateBox MC? like a shape to show the _alpha? maybe it works, but not the embedFonts. If the font is not embeded, it won't see its opacity change.

    gparis

  6. #6
    will i ever get it?
    Join Date
    Feb 2004
    Posts
    707
    embeding fonts is something i still need to wrap my head around. Do i also need to add the font to the library, and if so, as a bitmap, or not? And if as bm, i guess i have to know exactly what size the font needs to be???? At present, dateBoxTx gets the style from an external stylesheet (thus, it is html)- can this also effect the problem, or do you think it's the mc containg the text box?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center