dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: If statement checking on the visibility prop. of an MC?

  1. #1
    Junior Member
    Join Date
    Dec 2000
    Posts
    22
    Ok, need help... I'm trying to have two MC preloaded on the stage at the same time with the buttons activate the MC's by changing the "_visible" property of the MC's. The problem I'm having is the syntax needed to tell the object (button) if x MC _visible is true then change the value to false and make y MC _visible true. Is this possible, or am I going out of my mind? I'm not a great AS writer and I'm not familiar with the techniques needed to just type out the code so I use the AS liberary in the actions window. I've clicked on if under Actions and it asks me to complete a condition, just one line. I've tried "target._visible.false", and "_visible.target.false", but I'm afraid its not working. What am I doing wrong?

    TxFrog1999


    "Perhaps I am going MAD!"

  2. #2
    Junior Member
    Join Date
    Dec 2000
    Posts
    22
    Ahhh, never mind my idiotic post I've figured it out! I was using true false statements when I should have used 0 and 1! Old binary does the trick everytime!

    In case others want the solution here it is:

    on (release) {
    if (target._visible=1) {
    setProperty ("target", _visible, "0");
    }
    }


    Just replace target with the MC you want to control, can't believe I didn't see that one! Its a sign that its too late for my brain to function, need Coffee or a ton of Coke!

    TxFrog1999

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