2 Replies Latest reply on May 25, 2006 3:40 AM by atog

    dynamic text and animated masking problem?


      Can anyone suggest to me what might be happening here. I will try and explain step by step... I am using flash MX

      I have dynamically created a movieclip which I want to mask -
      _root.createEmptyMovieClip("myMovie", 1);

      I dynamically add a movieclip into it which I then load a jpg into -
      _root.myMovie.createEmptyMovieClip("image1", 0);
      _root.myMovie.image1.createEmptyMovieClip("newFile", 0);

      I dynamically create another movieclip called myNormalText1 insde the first movie -
      _root.myMovie.createEmptyMovieClip("myNormalText1", 2);

      this holds a dynamically created text box called mytext -
      // the text box formating is dynamic, uses devise fonts, arial and is red ect.

      I have then attach a movieclip and use it as a mask to create a transition effect over _root.myMovie (which holds the image and text)

      the mask movieclip is what is causing me the problem!!!

      method one

      when the mask movieclip contains this -
      a phisically drawn box that fills the whole page
      I use a shape tween to make the box transform into a thin rectangle down the left hand side of the screen

      I get a transition effect which makes _root.mymovie disapear to the left which is what I want!

      The image and text are masked correctly!

      *** Please note I am aware that dynamic text boxes using devise fonts are not displayed correctly under a mask layor when they are not embeded, in flash MX. I am able to view my movie in a browser window which uses flash player 8 that now allows dynamic devise fonts to be masked!

      method two

      I then wanted to create a different transition effect like venitian blinds,

      so, in my mask movieclip I created several rectangles that fill the page
      again I used a shape tween so they get thinner,

      when I tested my movie the same way in the browser,
      the mask did not work correctly over my text in _root.mymovie???
      yet the image in _root.mymovie was masked correctly???

      the only differance between the two methods is the shape tween in method one uses one box shape, and the shape tween in method two uses several rectangler box shapes.

      I was wondering if anyone knows why the text is correctly masked in case one and is not correctly masked in case 2
      I want to do other transition effects using masks in this way and I am having no luck :-(

      Thanks for any advice

      Claire Wall
        • 1. Re: dynamic text and animated masking problem?
          claire_wall Level 1

          I have been researching this ALOT and found some info that basically tells me when I use setMask() over dynamic device fonts, the mask uses its bounding box (the rectangular outside edge of the whole mask movieclip) as the mask.

          In case 1 the mask moviclips bounding box shrinks when the shape tween plays because there is one rectangular box being tweened. It appears to mask the text correctly.

          In case 2 I have variouse different shape tweens going on inside the mask movieclip so the bounding box stays the same size across the whole screen and it wont appear to mask my text correctly.

          I think I have answered my own question, but this still leaves me stuck! I want to create this venitian blind effect using masks over devise fonts.

          I came up with the idea of using for example 4 different masks over the one movieclip but again flash doesnt like this and I guess I can only use one setMask() per movieclip?

          Can anyone suggest a way I can use multiple dynamically created masks on one movieclip or cant it be done?


          Claire x
          • 2. Re: dynamic text and animated masking problem?
            Just ideas for an interesting problem...

            Maybe the trouble is not worth the bandwidth & you embed the font....


            Maybe changing the text into a Bitmap Object & then masking the bitmap would work (Providing the text is not editable)???

            Good luck