A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Movie clip to low opacity when external movie is loaded

  1. #1
    Junior Member
    Join Date
    Apr 2002
    Posts
    11

    Movie clip to low opacity when external movie is loaded

    Hi all,

    I have a movie clip with a button that loads an external flash movie when clicked. Once the external movie is loaded I would like the movie clip (that will remain as a background) to low its opacity. How can I do that ??? I'm using AS2 and the way that I'm loading the external movie is:

    Code:
    on (release) {
        loadMovieNum("new.swf", 1);
    }
    Thanks a lot in advance!
    Last edited by aradada; 07-23-2008 at 05:16 AM.

  2. #2
    ___________________
    Join Date
    May 2004
    Posts
    3,174
    PHP Code:
    on (release) {
    var 
    loader = new MovieClipLoader();
    loader.onLoadInit = function(){
        
    pathtotheclip._alpha 50// or whatever, 0 is fully transparent, 100 is fully opaque
    };
    loader.loadClip("new.swf",_root.createEmptyMovieClip(1,1));
     
        } 

  3. #3
    Junior Member
    Join Date
    Apr 2002
    Posts
    11
    When publishing I get a "Type mismatch" error in
    Code:
    loader.loadClip("new.swf",_root.createEmptyMovieClip(1,1));
    what's wrong??
    Thanks!

  4. #4
    Junior Member
    Join Date
    Apr 2002
    Posts
    11
    Now I'm trying the following for a button in the main fla:

    Code:
    on (release) {
        loadMovie("movieloaded.swf", 1);
    
    _root.myclip._alpha=20;
    
    }
    And then in a button in movieloaded.swf in order to unload the movie and restore the opacity:

    Code:
    on(release)
       {
          unloadMovieNum(1);
    	 _root.myclip._alpha=100;
    	
       }
    The movie is loading great and the opacity in myclip is going to 20%.
    When hitting the button in movieloaded, the movie unloads but the opacity of myclip is not restored to 100% it stays in a 20%.

    What can I do? I need myclip back to its 100% opacity after the movie is unloaded.

    Thanks once again!

  5. #5
    Junior Member
    Join Date
    Apr 2002
    Posts
    11
    Just in case somebody needs it:

    on(release){
    unloadMovieNum(1);
    _level0.myclip._alpha=100;
    }

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