dcsimg
A Flash Developer Resource Site

Results 1 to 11 of 11

Thread: alpha 0-100 on multiple mc's

  1. #1
    Senior Member
    Join Date
    Aug 2006
    Posts
    293

    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?

  2. #2
    AKA [ Paul Bainbridge] webdreamer's Avatar
    Join Date
    Aug 2001
    Location
    Glasgow, Scotland, UK
    Posts
    3,320
    Can you post the fla? it would probably be quicker.
    .: To me AS is like LEGO, Only for the big Kids :.
    - Site - Blog - Twitter - Linkedin
    bringmadeleinehome.com

  3. #3
    Senior Member
    Join Date
    Aug 2006
    Posts
    293
    ...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.

  4. #4
    Senior Member
    Join Date
    Sep 2000
    Location
    Brazil - São Paulo
    Posts
    257
    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"

  5. #5
    AKA [ Paul Bainbridge] webdreamer's Avatar
    Join Date
    Aug 2001
    Location
    Glasgow, Scotland, UK
    Posts
    3,320
    i was thinking something similar but only need one for() loop
    .: To me AS is like LEGO, Only for the big Kids :.
    - Site - Blog - Twitter - Linkedin
    bringmadeleinehome.com

  6. #6
    AKA [ Paul Bainbridge] webdreamer's Avatar
    Join Date
    Aug 2001
    Location
    Glasgow, Scotland, UK
    Posts
    3,320
    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
    .: To me AS is like LEGO, Only for the big Kids :.
    - Site - Blog - Twitter - Linkedin
    bringmadeleinehome.com

  7. #7
    Senior Member
    Join Date
    Aug 2006
    Posts
    293
    ...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?

  8. #8
    AKA [ Paul Bainbridge] webdreamer's Avatar
    Join Date
    Aug 2001
    Location
    Glasgow, Scotland, UK
    Posts
    3,320
    .: To me AS is like LEGO, Only for the big Kids :.
    - Site - Blog - Twitter - Linkedin
    bringmadeleinehome.com

  9. #9
    Senior Member
    Join Date
    Aug 2006
    Posts
    293
    ...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?

  10. #10
    AKA [ Paul Bainbridge] webdreamer's Avatar
    Join Date
    Aug 2001
    Location
    Glasgow, Scotland, UK
    Posts
    3,320
    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.
    .: To me AS is like LEGO, Only for the big Kids :.
    - Site - Blog - Twitter - Linkedin
    bringmadeleinehome.com

  11. #11
    Senior Member
    Join Date
    Aug 2006
    Posts
    293
    ...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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center