control the visibility of one actor with another actors button state?
xyloFUN
Member Posts: 1,593
tricky stuff .... google finds two posts in the forum that touch this, each different but both only discuss the theory behind it without practical example.
So, how would I control the visibility (alpha) of one actor when I press another actor?
If there is a tut that covers this, please post me a link as I will use this a lot!
cheers
So, how would I control the visibility (alpha) of one actor when I press another actor?
If there is a tut that covers this, please post me a link as I will use this a lot!
cheers
Comments
On the actor you're pressing:
-----
Rule
When touch is pressed: Change attribute game.showactor to True
Otherwise: Change attribute game.showactor to False
-----
Then on the actor you want to be visible:
-----
Rule
When Attribute game.showactor is True
Change Attribute self.alpha (under colour menu) to 1
Otherwise Change Attribute self.alpha to 0
-----
That's all that should be involved
THANK YOU ... it's been a long day (and a good one to say the least) I didn't think that I would make so much progress today but this visibility issue had me really stumped!
Anyway, I'm going to work on that tomorrow because I can hardly keep my eyes open. I played with my test builds all evening! LOL
Again, thanks for that solution! If I can make that work, I will be able to do a lot more with GS
I've tried a few times, making sure that I enter everything as you describe it but I can not get one actor to hide another actor.
The only thing I did different was that I named the attributes hideRed and another hideGreen
The finished product will nee to show/hide a total of seven actors.
thanks
I will test that in a minute!
Right now, the black part of the screen becomes transparent as soon as I test the game so i have to restart GS!
.... if you're still around in 10 minutes or so, I'll let you know if it worked
I am actually using one actor to hide and unhide another one! Sorry about the confusion ...
How ever, you gave me new food the chew on so maybe i can get something going ....
doing two quick tests, id did not produce the results I'd hoped for. I also wish that GS would take that "Alpha" tag out of the Color settings ... just to speed things up a bit. But with that I can live .... the trick is to get the alpha values to behave!
Amazing how Flash makes that so easy! LOL
with ether way that was described, I can how ever hide. Just to unhide is tricky at this point!
you made much more progress than I have!
I would be happy to hide with touch and unhide with "outside" and released!
How did you do it?
Basically, I need to copy the same functionality as seen in the video
I will definitely try that! Thanks for taking the time and working that out ... that is very nice of you! WOW
It's 1:31 am in Vancouver and I can't keep my eyes open anymore and besides, last night (about the same time) I woke my wife up with that stupid cheer/applause GS puts on when finishing the export!
Plus, I need to power down anyway because adding 7 sounds and all the gfx for the instument and notes is slowing GS down to an almost unworkable level ...
I'll report back tomorrow and tell you how it went
you did it! THANK YOU!
Now I have almost all of my Flash functionality back! YAY!!