-
alpha 0-100 on multiple mc's
...hopefully this won't be as silly a question as my last post!
I have an fla file that contains 32 mc's all titled tile followed by it's number - so tile1 tile2 etc...
How can I tell 'all' 32 of the tile clips to start off with a alpha of 0 but then when the user clicks a button all 32 become visible?
How do I do that? other than the painful method of telltarget for each of them?
-
AKA [ Paul Bainbridge]
Can you post the fla? it would probably be quicker.
-
...sure you don't just want to laugh at my incompetence!!! lol!
sure here it is...
Last edited by WWFC; 04-07-2008 at 12:21 PM.
-
Hi wwfc,
U can do that with a "for" action.. just like this.
Code:
function start(){
for (i=0;i<=32;i++){
eval("tile"+i)._alpha=0;
}
}
my_button.onPress=function(){
for (i=0;i<=32;i++){
eval("tile"+i)._alpha=100;
}
}
I dont have the flash here so i cant test the code, but i think its allright... The function start sets all the MCs to inicial 0 alpha, and the second, triggered by the click of the button, sets it to 100 alpha; Tell me if that works for you ( i know eval its not used anymore, but what can i do, used it for a long time, old habits )
Edited* = I forgot to say, u need a button in the stage named my_button to make it work ( u can change it of course)
Last edited by predador; 04-07-2008 at 09:47 AM.
"life is interactive"
-
AKA [ Paul Bainbridge]
i was thinking something similar but only need one for() loop
-
AKA [ Paul Bainbridge]
Thats a ripped fla you have there. Most of the code is knackered.
Code:
function slideACTION(mc, s, sec)
{
var _loc1 = mx.transitions.easing.Elastic.easeOut;
var _loc3 = new mx.transitions.Tween(mc, "_y", _loc1, mc._y, s, sec, true);
}
_loc is used in decompilers
Code:
function checkForXtraBall(theBallName)
{
var xtraBallNum = xtraBallList.length;
i = 0;
for (;;)
{
if (i >= xtraBallNum)
{
return;
}
if (theBallName == xtraBallList[i])
{
return 1;
}
++i;
}
}
note* then for() and the ++i these are also trates of an swf that has been ripped to fla
-
...aah that would explain a fair bit then!!!!
It is something that I found, not sure if it was on here or one of the others - is there a way of putting it into a proper format?
...or does anyone know of a good tut/source for creating a ball pop type game?
-
AKA [ Paul Bainbridge]
-
...cheers for that Paul - I can't find any reference to the arkanoid game other than the preview in games?
Is there an fla for it?
-
AKA [ Paul Bainbridge]
I presumed it would be in there somewhere since the others are there.
Try google for "flash games source" see if that comes up with anything.
-
...okay will do fella - cheers for the help
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|