Share Posted September 3, 2012 Hi, how would I change a dynamic text after I use blitmask blitMask = new BlitMask(this, x, y, width, blockHeight * 5, false, true, 0xFFFFFF, true); I tried to: blitMask.disableBitmapMode(); dynamicText.text = "BLABLA"; blitMask.enableBitmapMode(); blitMask.dispose(); dynamicText.text = "BLABLA"; blitMask = new BlitMask(this, x, y, width, blockHeight * 5, false, true, 0xFFFFFF, true); but nothing works. Any advice on how I can achieve this? Link to comment Share on other sites More sharing options...
Share Posted September 3, 2012 Hi, If you change the contents of the target of the BlitMas, you need BlitMask to take a new capture of the target. It sounds like you need to use the update() method and set the forceRecaptureBitmap parameter to true like so: blitmask.update(false, true); let us know if that works for you. Link to comment Share on other sites More sharing options...
Author Share Posted September 4, 2012 I followed your advice, set autoUpdate to false blitMask = new BlitMask(this, x, y, width, blockHeight * 5, false, [b]false[/b], 0xFFFFFF, true); And I put this in EnterFrame event: blitmask.update(null, true); the dynamic text still doesn't get updated If this is relevant at all, I'm working on a scrolling calendar which followed this tutorial I added a startDrag on the blitmask on mousedown event. Link to comment Share on other sites More sharing options...
Share Posted September 4, 2012 Hi, Please make sure you are embedding your fonts. Below is a very simple example to illustrate dynamic text being updated : import com.greensock.*; var blitMask:BlitMask = new BlitMask(mc,0,0,250,200,true,true,0x000000,true); TweenMax.to(mc, 2, {x:-750, repeat:-1, yoyo:true}); function updateText(){ mc.word_txt.text = "hello"; blitMask.update(null, true); } //update text after 2 seconds TweenLite.delayedCall(2, updateText); Flash CS5 fla and swf attached blitmaskUpdateText.zip Link to comment Share on other sites More sharing options...
Author Share Posted September 4, 2012 (edited) sorry I missed something on my code in my first reply It actually worked after I added this line to enter frame event blitMask.update(null, true); Thanks a lot for your help, sorry for the troubles Edited September 4, 2012 by Icecage Link to comment Share on other sites More sharing options...
Share Posted September 4, 2012 You're very welcome. It was no trouble. Glad to hear you figured it out! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now