Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

My Flash conundrum continues

Options
  • 05-10-2009 3:37pm
    #1
    Registered Users Posts: 1,795 ✭✭✭


    Hi all,

    I have received some great help from Boards users regarding this in the past, but starting a new thread would probably be best.

    The Scene
    A website I have done in Flash CS4, Actionscript 2 here:

    www.waynebrennan.com

    has thrown a small wobbler for me. Go to the Video's page (the Starfish). Notice there are 4 stills icons and 4 tags, each activating an appropriate YouTube music video. Click on them and see how they work...

    The Problem
    Now click on 'MENU', which is the tree at bottom-right, then go back to the Videos section, and click on any one of them. The video screen has increased in size. AND if you click on 'MENU', the destroyTube() function will not work. The same process happens when you click 'RELOAD'.

    The Code
    The code for the player functions:
    var ytplayer:MovieClip = _root.createEmptyMovieClip("ytplayer", _root.getNextHighestDepth());
    ytplayer._x = 150;
    ytplayer._y = 360;
    var loadInterval:Number;
    
    // DESIRED TUBE SIZE
    var newW:Number = 350;
    var newH:Number = 270;
    
    var ytPlayerLoaderListener:Object = {
      onLoadInit: function() {
        loadInterval = setInterval(checkPlayerLoaded, 250);
      }
    };
    
    var ytPlayerLoader:MovieClipLoader = new MovieClipLoader();
    
    ytPlayerLoader.addListener(ytPlayerLoaderListener);
    
    function checkPlayerLoaded():Void {
        if (ytplayer.isPlayerLoaded()) {
            clearInterval(loadInterval);
    		loading_mc._alpha = 0;
    		resizeTube(newW,newH);
            ytplayer.addEventListener("onStateChange", onPlayerStateChange);
            ytplayer.addEventListener("onError", onPlayerError);
    		ytplayer.playVideo();
    		ytplayer._alpha = 100; // already resized, show video
        }
    }
    
    function onPlayerStateChange(newState:Number) {
        trace("New player state: "+ newState);
    }
    
    function onPlayerError(errorCode:Number) {
        trace("An error occurred: "+ errorCode);
    }
    
    function resizeTube(W,H) {
    	ytplayer.setSize(W,H);
    } 
    
    function loadByID(tubeID:String) {
    	loading_mc._alpha = 100;
    	ytplayer._alpha = 0; // used to hide the resize action
    	tubeToLoad = "http://www.youtube.com/v/"+tubeID;
    	ytPlayerLoader.loadClip(tubeToLoad, ytplayer);
    }
    	
    function destroyTube() {
    	ytplayer.destroy();
    	// EXTRA COMMANDS FOR WHENEVER THE PLAYER BECOMES BUGGY ;( 
    //	ytplayer.clearVideo();
    //	ytplayer.unloadMovie();
    //	ytplayer.removeMovieClip();
    //	ytPlayerLoader.unloadClip(ytplayer); 
    }
    
    b1.onRelease = function() { 
    	destroyTube();
    	loadByID("PSUKLrSbSc8");
    }
    b1a.onRelease = function() { 
    	destroyTube();
    	loadByID("PSUKLrSbSc8");
    }
    b2.onRelease = function() { 
    	destroyTube();
    	loadByID("lutijjnu_do");
    }
    b2a.onRelease = function() { 
    	destroyTube();
    	loadByID("lutijjnu_do");
    }
    b3.onRelease = function() { 
    	destroyTube();
    	loadByID("lCWXhlmdc8g");
    }
    b3a.onRelease = function() { 
    	destroyTube();
    	loadByID("lCWXhlmdc8g");
    }
    b4.onRelease = function() { 
    	destroyTube();
    	loadByID("LoRS9Zg_icA");
    }
    b4a.onRelease = function() { 
    	destroyTube();
    	loadByID("LoRS9Zg_icA");
    }
    

    The code for the kill function, as on MENU (as shown here) and RELOAD buttons:
    on (release) {
    music_mc.destroyTube();
    gotoAndPlay(661);
    }
    

    The Question
    Can anybody see where I am going wrong?

    Thanks in advance,

    Seanie.


Comments

  • Registered Users Posts: 3,140 ✭✭✭ocallagh


    Either that Wayne Brennan Moving Me.mp3 file is a gig in size and is still downloading, or IE8 has crashed for me on your home page


  • Registered Users Posts: 1,795 ✭✭✭Seanie M


    ocallagh wrote: »
    Either that Wayne Brennan Moving Me.mp3 file is a gig in size and is still downloading, or IE8 has crashed for me on your home page
    No, it's 1.8MB in size ocallagh. You're the first person to have registered a 'crash' with the site by the way!

    Seanie.


  • Registered Users Posts: 3,140 ✭✭✭ocallagh


    Hey, It crashed again - this time Quicktime popped up for an update but I can't even click on that. I can't click on the X, minimise window button or even clicking on the window itself won't focus it. Windows Vista with IE8.0.6

    I'll try again a third time after I restart IE.


  • Registered Users Posts: 3,140 ✭✭✭ocallagh


    Yep, happened again. This time after 30 seconds I managed to focus on the window and maximise it but shortly after all control over the window was lost again.

    Also might help you reproduce-
    Windows Media Player 11.0.6
    Quicktime 7.62

    edit: works fine with FF (sorry to crash your thread with a totally different problem!)


  • Registered Users Posts: 35,524 ✭✭✭✭Gordon


    I don't think my scripting is up for understanding the errors with youtube but can I make some constructive comments on your site as it is now? Although, you might try uncommenting the extra bits on the kill function as the comment suggests you do if it becomes buggy..

    Firstly I'm not a fan of splash pages as it's just one more button to click and I'm busy busy to clicky clicky! But that's maybe personal preference.

    What is really important to me though - the song you've got autoloaded down at the bottom there - it keeps playing when you click through into a video, if I was less savvy with computers and had a smaller screen I'd miss the fact that I had to stop that from playing before watching a video. I shouldn't have to stop that from playing to watch a video though. Why is that in the html page anyway when you could drop it into flash and control it on your main stage?

    Secondly, you yourself have had to tell us how to find things by going to the starfish to see the videos. I honestly couldn't find the starfish the first try, I thought you had changed the site without telling us on this thread. You shouldn't have to tell someone "Hey, check out my website! Go to the videos, they are great, you need to click on the first page, look at the tree and find the starfish and click on that to see the videos". It should be obvious to someone and I think if you're a startup musician you should be as user friendly as possible as every view counts.

    Hope you get the scripting problem fixed dude.


  • Advertisement
  • Registered Users Posts: 3,140 ✭✭✭ocallagh


    I echo what Gordon has said. (Using FF now) It is not clear at all that you must click on the items in the tree. The 'links' one is especially difficult to see and I only found it while searching for the starfish (which took me about 30 seconds to find). No way people would click on it without knowing to look for it. If you are going to use that style of navigation (ie if the client wants it) it needs to be a lot clearer. Perhaps make the clickable items bigger and the background less detailed?

    Also, trying to navigate back from a section I see my only real option (aside form knowing to click on the small tree bottom right) is to click the reload link which reloads the entire flash app whch brings me back to the intro screen (and I have to wait for it to load again). I think this could be improved by replacing the reload link with two links, home and menu


  • Closed Accounts Posts: 18,163 ✭✭✭✭Liam Byrne


    Sorry! Navigation is FAR too un-intuitive, and yes, the size of the content means that you'd never know the song player was down the bottom.


  • Registered Users Posts: 35,524 ✭✭✭✭Gordon


    two forward slashes // means comment by the way. Remove those slashes from
    function destroyTube() {
    	ytplayer.destroy();
    	// EXTRA COMMANDS FOR WHENEVER THE PLAYER BECOMES BUGGY ;( 
    //	ytplayer.clearVideo();
    //	ytplayer.unloadMovie();
    //	ytplayer.removeMovieClip();
    //	ytPlayerLoader.unloadClip(ytplayer); 
    }
    
    and try it again.

    Don't remove the slashes from the 'extra commands' line though.

    What export settings are you using when exporting from Flash?


  • Closed Accounts Posts: 1,015 ✭✭✭Epic Tissue


    Any website that just starts downloading a file, I will just leave


  • Registered Users Posts: 1,795 ✭✭✭Seanie M


    ocallagh wrote: »
    edit: works fine with FF (sorry to crash your thread with a totally different problem!)

    (Don't worry about it, I think it is the embed function for a song to autoplay when it loads (check the bottom of the screen).

    Seanie.)


  • Advertisement
  • Registered Users Posts: 1,795 ✭✭✭Seanie M


    What the client wants, the client gets guys. He is big into Flash and its animations. He is proud of his album cover, and I think he has a right to be for a new musician to the scene. It's all down to individual preferences. All your comments are taken on board by the way, I'm not lashing back!

    Gordon,
    thanks for the '//' input, let me try that.

    Seanie.


  • Registered Users Posts: 1,795 ✭✭✭Seanie M


    Gordon wrote: »
    two forward slashes // means comment by the way. Remove those slashes from
    function destroyTube() {
    	ytplayer.destroy();
    	// EXTRA COMMANDS FOR WHENEVER THE PLAYER BECOMES BUGGY ;( 
    //	ytplayer.clearVideo();
    //	ytplayer.unloadMovie();
    //	ytplayer.removeMovieClip();
    //	ytPlayerLoader.unloadClip(ytplayer); 
    }
    
    and try it again.

    Don't remove the slashes from the 'extra commands' line though.

    I tried a combination of the different commands, as well as all at the same time. At best, it removes the bug of the movie playing on the top of everything when MENU or RELOAD is clicked, but the resize connundrum when you go back to Videos and play one continues. The code is now this:
    function destroyTube() {
    	ytplayer.destroy();
    	// EXTRA COMMANDS FOR WHENEVER THE PLAYER BECOMES BUGGY ;( 
     	ytplayer.clearVideo();
     	ytplayer.unloadMovie();
     	ytplayer.removeMovieClip();
     	ytPlayerLoader.unloadClip(ytplayer); 
    }
    
    Gordon wrote: »
    What export settings are you using when exporting from Flash?
    I'm exporting it using Actionscript 2, 'Hidden layers' is enabled, and Script Time is 99 seconds (I also tried 0, the default of 15, and 999).

    Seanie.


  • Closed Accounts Posts: 18,163 ✭✭✭✭Liam Byrne


    Seanie M wrote: »
    What the client wants, the client gets guys. He is big into Flash and its animations. He is proud of his album cover, and I think he has a right to be for a new musician to the scene. It's all down to individual preferences.

    I've interviewed the guy and played his music, and I agree.

    However, there are 2 things wrong with the above post.

    1) The album cover is cool; that's not the issue. The problem is that there's nothing overlaid on it to show there's a menu there, and no instructions - nothing!

    2) You need to guide him better and explain that his preferences aren't the viewers preferences; we're talking the - potential - entire world, and if people can't get into the site, then they won't be buying anything.


Advertisement