A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Freezing everything on stage?

  1. #1
    Member
    Join Date
    Sep 2014
    Posts
    75

    Freezing everything on stage?

    Hello All,

    Is there a particular function in AS2.0 that can be utilized to freeze objects (e.g. stop buttons from working) on stage when calling(attachMovie) mc from library. Freezing objects like in windown, when sometimes you get an alert massgae.


    Apart from using if-statment, is there any other method, built-in function?


    thanks!

  2. #2
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi,

    From the top of my head I dont think so, there are a couple of ways of doing it,
    you can do the simple and just put a fully transparent clip over the top of evertything, with so script and depth.

    PHP Code:
    stopAll.onRelease = function() {};
    stopAll.useHandCursor false
    make it appear and disappear as and when required.

    or you could do this and find all clips and buttons in this example is _root.

    PHP Code:
    findClips(_root);

    function 
    findClips(a):Void
    {
        for (var 
    i in a)
        {
            if (
    a[i] instanceof MovieClip)
            {
                
    trace(a[i] + " - MovieClip");
                
    a[i].enabled false;
                
    findClips(a[i]);

            }
            if (
    a[i] instanceof Button)
            {
                
    trace(a[i] + " - Button");
                
    a[i].enabled false;
                
    findClips(a[i]);
            }
        }

    simply do a reverse function to re-enable all.
    Last edited by fruitbeard; 05-05-2015 at 08:47 AM.

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