4 Replies Latest reply on Nov 9, 2010 2:43 PM by Hosseinrostamzadeh

    Problem with flash components in director  tollbox


      1- I have 2 buttons named "makeQst1BT" in frame 1 and  "chkQst1BT" in frame 2,  which both are draged from toolbox.



      First the user gets a random question in frame 2 andhas to answer it, When the user clicks "chkQst1BT" its visible is to disappear after answering. it is done nicely  and button disappears.by  the follwing code.

      sprite("chkQst1BT").visible =false


      then later when user navigates back to a frame 1 again and wants to make a new question and presses "makeQst1BT" this button is to set the visible of "chkQst1BT" to true again by this code:

      sprite("chkQst1BT").visible =true


      BUT here I get script error  indicating that PROPERTY #visible not found.

      Why this happens? and how can I set the visible of  chkQst1BT back to true?

      ( I get many similar script errors saying PROPERTY #text not found in the same movie)


      2- I have draged many textArea flash components from toolbox, then want to change their ink from copy to background transparent, it appearantly accepts this choice but it is still displayed like "copy" with white bakgr.( I do it from property inspector window)

      What is strange is that only one of text Areas changes appearance when ink changed to background transparant but not others.


      Any ideas?

      Thanks in advance!

        • 1. Re: Problem with flash components in director  tollbox

          First off, you should know that the flash components aren't that predictable/stable to begin with, but anyway.


          1 If the sprite only exists in frame 2 you can't change it's properties in frame 1. What you can do, and I'm reasonably sure you don't need to, is to put the visible code in a on begin sprite handler for a script on the sprite which should be run every time you enter frame 2.


          2. Works fine here so I can only speculate on what's causing your problem. My guess is that the text areas share sprite channel with some other component during your movie and that component has it's ink set to copy. Move the flash text area component to their own channels or add a behavior script to them that sets the ink in the on begin sprite handler.

          1 person found this helpful
          • 2. Re: Problem with flash components in director  tollbox
            Hosseinrostamzadeh Level 1

            Thanks for good advices, the first one helped.

            But I still can not fix the "ink"-prpoerty of textAreas in the property inspector. I have also tried to isolate all these textAreas in a single channel.

            They simply do not obey ink-changes I make with property inspector,I tried to change to other ink-types,  with no change in the appearance of these textAreas.

            How can put beginSprite behaviour which changes the ink to background transparent?

            Best regards, HR

            • 3. Re: Problem with flash components in director  tollbox
              multiduck Level 1

              select the sprite on stage and in the property inspector select the behavior tab, click the plus and select new behavior and call it something like pflashfield (doesn't really matter just as long as you know what it is later).


              Open the script in the script editor and type



              property pSprite


              on beginsprite me


                pSprite = sprite(me.spritenum)


                pSprite.ink = 36  

                pSprite.blend = 50  -- just to show that it worked
              • 4. Re: Problem with flash components in director  tollbox
                Hosseinrostamzadeh Level 1

                Thanks! It worked!

                It saved me a lot of time!