A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: rollOut problem

  1. #1
    Snowboarder tomstaveley's Avatar
    Join Date
    Mar 2004
    Location
    Brighton, UK
    Posts
    128

    rollOut problem doesnt work with external swf

    Hi. I have created a button that, when pressed, loads up an external swf into an empty MC above the button, that contains a list (menu) of artists names (called Test Tsunami 3.swf). This is the coding on the empty MC:

    [code]
    onClipEvent (enterFrame) {
    _root.choose_btn.onRelease = function() {
    createEmptyMovieClip("tsunami_external_mc", 1);
    with (tsunami_external_mc) {
    _x = 5.2;
    _y = -210.7;
    loadMovie("Test Tsunami 3.swf", true);
    }
    _root.empty_mc.onRollOut = function() {
    delete empty_mc;
    };
    };
    }
    [/code)

    This works fine but i want it so when u move the mouse cursor off of the button or the loaded list, i want it to delete the swf so it returns back to it's normal state, i tried to do this at the end of the script above, why won't this work?

    Regards
    Tom
    Last edited by tomstaveley; 01-31-2005 at 05:55 PM.

  2. #2
    Glorioso SLB
    Join Date
    Jan 2005
    Location
    Portugal
    Posts
    79
    this work!!?? you have a small problem of }

    Code:
    onClipEvent (enterFrame) {
    	_root.choose_btn.onRelease = function() {
    		createEmptyMovieClip("tsunami_external_mc", 1);
    		with (tsunami_external_mc) {
    			_x = 5.2;
    			_y = -210.7;
    		}
    		loadMovie("Test Tsunami 3.swf", true);
    	};
    	_root.empty_mc.onRollOut = function() {
    		delete empty_mc;
    	};
    }
    Se a vida te virar as costa, aproveita e apalpa-lhe o rabo


  3. #3
    Snowboarder tomstaveley's Avatar
    Join Date
    Mar 2004
    Location
    Brighton, UK
    Posts
    128
    lol, i think this might work but when i click it nothing happens, but what i think might have happened is that it has loaded it and then deleted it straight away, how do i solve this?

    thanks

  4. #4
    Snowboarder tomstaveley's Avatar
    Join Date
    Mar 2004
    Location
    Brighton, UK
    Posts
    128
    here's a zip containing the .fla of the button and the swf that i want to load into the button one, to help solve my problem...

    thanks
    tom

  5. #5
    Member
    Join Date
    Sep 2004
    Posts
    51
    Hello tom.
    You problem is with the delete function.
    Try this:
    Code:
    onClipEvent (enterFrame) {
    	_root.choose_btn.onRelease = function() {
    		createEmptyMovieClip("tsunami_external_mc", 1);
    		with (tsunami_external_mc) {
    			_x = 5.2;
    			_y = -210.7;
    		}
    		loadMovie("Test Tsunami 3.swf", true);
    	};
    	_root.empty_mc.onRollOut = function() {
    		empty_mc.removeMovieClip
    	};
    }
    removeMovieCLip rather than delete

    Hope this helps!

  6. #6
    Snowboarder tomstaveley's Avatar
    Join Date
    Mar 2004
    Location
    Brighton, UK
    Posts
    128
    lol didnt seem to work - same visual result as the coding SuperOito
    gave me, thanks anyway.

    Any other ideas???

    Tom

  7. #7
    Senior Member
    Join Date
    Feb 2004
    Location
    Worcester Ma
    Posts
    161
    I couldn't get it to work either the way you were trying it so I made a simpler solution.

    I manually placed a blank MC at approx x:5 y:-200 like you were doing dynamically. Place this on that MC...

    Code:
    on(RollOut){
    this.unloadMovie();
    Then I just instructed your choose_btn MC to load the swf containingthe Tsunami into that. Worked liked a charm. (also you wont be bogging the program down with an unneeded "onEnterframe"). And I would go into the choose_btn MC and delete that button inside and just place the contents of "choose" directly with choose_btn.

    Hope this helps you.

  8. #8
    Snowboarder tomstaveley's Avatar
    Join Date
    Mar 2004
    Location
    Brighton, UK
    Posts
    128
    i don't suppose u could send ur version tht u tried could u? i'm a little confused :S (blonde!)

    thanks a lot!

    Tom

  9. #9
    Senior Member
    Join Date
    Feb 2004
    Location
    Worcester Ma
    Posts
    161
    You need to republish the uploading Tsunami menu from Flash 5 to at least Flash 6. Thats the problem.
    Attached Files Attached Files

  10. #10
    Snowboarder tomstaveley's Avatar
    Join Date
    Mar 2004
    Location
    Brighton, UK
    Posts
    128

    Thank you so much!

    YAY! It finally works, great!
    Thank you for finding the problem - I would've never of found it!!!

    Regards
    Tom

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