Page 1 of 3 123 LastLast
Results 1 to 10 of 26

Thread: Transition class

  1. #1
    Join Date
    Aug 2007
    Location
    Harrisburg, PA
    Posts
    131
    Thanks
    6
    Thanked 9 Times in 9 Posts

    Default Transition class

    i'm trying to use the transition class to create a fade out and fade in for loading in external movies. I found a tutorial on it searching through the forums on the topic. I'm having a troubles though when i click on my buttons nothing occurs. I've checked my script with the source script and its identical as far as i can see except for the slight changes i made since my buttons are inside of another movie clip and perform actions inside. Can anyone have a look and see if i have any errors or just going about all wrong.


    Code:
    import mx.transitions.Tween;
    import mx.transitions.easing.*;
    
    
    
    
    //Transitions & Navigation
    
    
    var mcl:MovieClipLoader = new MovieClipLoader();
    
    var mclL:Object = new Object();
    
    mcl.addListener(mclL);
    
    mcl.loadClip("news.swf",holder_mc);
    
    mclL.onLoadStart = function(){
       preloader_mc.progress_mc._width = 0;
       preloader_mc._visible = true;
       theText._visible = true;
       
       }
       
       mclL.onLoadProgress = function(target,loaded,total){
          theText.text = "Loading" +Math.round((loaded/total)*100) + "%";
          preloader_mc.progress_mc._width  = preloader_mc.base_mc._width * (loaded/total);
          
          
          }
       
       mclL.onLoadInit = function(){
      preloader_mc._visible = false;
      theText._visible = false;
      var myTween1:Tween = new Tween(holder_mc, "_alpha",Back.easeOut,0,100,1,true);
      initButtons();
    
    }
         
         
    
    function initButtons():Void {  
    nav.b_news.onRelease = function(){
       nav.gotoAndStop("Closed");
        var myTween2:Tween = new Tween(holder_mc, "_alpha",Back.easeOut,100,0,1,true);
        myTween2.onMotionFinished = function(){
        mcl.unloadClip(holder_mc);
        mcl.loadClip("news.swf",holder_mc);
          
          }
        
        }
          
    nav.b_web.onRelease = function(){
       nav.gotoAndStop("Closed");
        var myTween2:Tween = new Tween(holder_mc, "_alpha",Back.easeOut,100,0,1,true);
        myTween2.onMotionFinished = function(){
        mcl.unloadClip(holder_mc);
        mcl.loadClip("web.swf",holder_mc);
          
          }
        
        }
    }
    
             
             
         
    
    
    stop();
    thanks in advance

  2. #2
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,486
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    At first glance the code looks fine. If you can zip up your fla I can take a look at that and make sure the inner AS is making the correct calls.

    It always helps to have a visual of the problem
    {CWoT - Riddle } {OSTU - Psycho} {Invasion - Team}
    Follow Me on Twitter: @Negative_Chaos
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  3. #3
    Join Date
    Aug 2007
    Location
    Harrisburg, PA
    Posts
    131
    Thanks
    6
    Thanked 9 Times in 9 Posts

    Default

    hey thanks a lot heres a zip of it.

  4. #4
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,486
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Will have a look as soon as I can. Will get back to you here when I have something.
    {CWoT - Riddle } {OSTU - Psycho} {Invasion - Team}
    Follow Me on Twitter: @Negative_Chaos
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  5. #5
    Join Date
    Aug 2007
    Location
    Harrisburg, PA
    Posts
    131
    Thanks
    6
    Thanked 9 Times in 9 Posts

    Default

    Thanks, I appreciate it a lot, i know there are better ways of doing my navigation movie clip as well, instead of timeline animation. Maybe that could be one reason for it not working.

    anyway thanks a lot again

  6. #6
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,486
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Maybe I won't. Your using the Flash for Mac huh?

    Can you publish the swf and upload it to a server and I can look at it live? Also, double check that when everything is uploaded it is uploaded to the same directory. In your AS make sure your getURLs or LoadMovie()s are using complete URLs not just the file names.

    If all else fails post all related AS here and I will comb over it
    {CWoT - Riddle } {OSTU - Psycho} {Invasion - Team}
    Follow Me on Twitter: @Negative_Chaos
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  7. #7
    Join Date
    Aug 2007
    Location
    Harrisburg, PA
    Posts
    131
    Thanks
    6
    Thanked 9 Times in 9 Posts

    Default

    Yeah sorry i'm a mac user here's a link to what i have the only buttons that have links set to them for the transition and load movie is the web and news buttons

    i have it set so news is loaded in right away also.

    http://www.manifolddesigns.com/Site/main.html

    thanks again

    i really appreciate this

    Jake

  8. #8
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,486
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Here is a silly thought.. you gave your buttons instance names right?

    The code tells button with instance name nav.b_web to do something blah blah...

    Make sure nav.b_web is the instance name for that button (or nav is parent button and b_web is child button)

    Also in the library find your buttons and right click, choose linkage and check "export for action script"

    Let me know how that works.
    {CWoT - Riddle } {OSTU - Psycho} {Invasion - Team}
    Follow Me on Twitter: @Negative_Chaos
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  9. #9
    Join Date
    Aug 2007
    Location
    Harrisburg, PA
    Posts
    131
    Thanks
    6
    Thanked 9 Times in 9 Posts

    Default

    i've checked them hundreds of times and they are all correct (thats the first thing i check now because i always tend to make a dumb mistake with those but they are correct this time) they are movie clip buttons if that makes a difference, i'm not sure. its actually just duplicates of the same movie clip and i define what the button says in the navigation movie clip. but yes the instance names are correct. "nav" is the instance name of my navigation movie clip where the buttons lie within.

    Sorry for slow response after this, i have to go to class.

    I'm a digital art and design major, can't wait for my action script class.!

    just pondering i have an intel mac running flash cs3 shouldnt a pc be able to open the document.

  10. #10
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,486
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Should but that CS3 part is why... I am still running versions 5, 7, and 8
    {CWoT - Riddle } {OSTU - Psycho} {Invasion - Team}
    Follow Me on Twitter: @Negative_Chaos
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •