A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: movie cordinates changed after "rollout" for 10 seconds?

  1. #1
    Senior Member
    Join Date
    Jun 2000
    Posts
    102

    movie cordinates changed after "rollout" for 10 seconds?

    How would I tell a movie to change the following after a button is rolled off after 10 seconds?:

    targetx = 450;



    ....so the movie moves out of the way unless the user rolls over the button again.

    Basicly what I have is a photo in the background, then I have some buttons above that when rolled over they move a movie that has subnav in it to a cordinate over the photo...when you roll off the subnav area I want it to only dissapear after a 10 second time so that the photo is uncovered again.

    Anyone know how this is done? I have the source if need be.

    Thanks,
    Joey Anderson
    Mac Web Internet, Inc.,
    a web application developer and service provider.
    http://www.macwebinternet.com
    info@macwebinternet.com

  2. #2
    Senior Member
    Join Date
    Feb 2003
    Location
    right behind you
    Posts
    174
    here we have an mc, which onRollOver sends mc2 to 300. onRollOut, after 10 seconds, mc2 goes back to 450. im not exactly clear on what you're trying to accomplish, but i think its this.....
    Code:
    mc.onRollOut = function() {
    id = setInterval(function () {mc2._x = 450;}, 10000);
    };
    mc.onRollOver=function(){
    clearInterval(id);
    mc2._x=300;
    }
    basically the setInterval is what you want. it calls a function, which in this case is defined in the setInterval function itself, and is executed every 10,000 milliseconds(10 seconds).

  3. #3
    Senior Member
    Join Date
    Jun 2000
    Posts
    102
    sorry I am new to actionscript...

    so where would I put this code?...I think this is the function I want.

    Do I put this in the button actionscript or in the first frame of the movie that changes on cord?

    Thanks so much!

    If you would like to see my movie, email me at joey@marketingtechnology.com and you'll see what I'm trying to do.
    Joey Anderson
    Mac Web Internet, Inc.,
    a web application developer and service provider.
    http://www.macwebinternet.com
    info@macwebinternet.com

  4. #4
    Senior Member
    Join Date
    Feb 2003
    Location
    right behind you
    Posts
    174
    the code goes on the first frame of your movie. make sure to target the buttons and mc's appropriately, i used mc(the button) and mc2(the photo).

    first, try it on two stand in graphics and you should be able to better understand the methods and decide whether this is even close to the effect you want i might have mixed up the photo bit.

    if you can open mac files, ill post the fla.

  5. #5
    Senior Member
    Join Date
    Jun 2000
    Posts
    102
    Yeah...I think you'll need to see the movie I'm creating to better understand my problem...I'll attach the file in an email to you if you can open PC files...I really don't want to post it on the forum...it's for a big project..don't want someone to steal my source.

    Thanks...do you have a hotmail account or something? The file size is only 19k.
    Last edited by macentyre; 09-25-2003 at 06:14 PM.
    Joey Anderson
    Mac Web Internet, Inc.,
    a web application developer and service provider.
    http://www.macwebinternet.com
    info@macwebinternet.com

  6. #6
    Senior Member
    Join Date
    Feb 2003
    Location
    right behind you
    Posts
    174
    what happened to the file?

  7. #7
    Senior Member
    Join Date
    Jun 2000
    Posts
    102
    here it is again...I thought you already snagged it. I had to zip it this time because it was too big with the recent changes...it's only about 221k now....the swf is 24k
    Last edited by macentyre; 09-25-2003 at 08:17 PM.
    Joey Anderson
    Mac Web Internet, Inc.,
    a web application developer and service provider.
    http://www.macwebinternet.com
    info@macwebinternet.com

  8. #8
    Senior Member
    Join Date
    Feb 2003
    Location
    right behind you
    Posts
    174
    i have it now, ill check it out.

  9. #9
    Senior Member
    Join Date
    Jun 2000
    Posts
    102
    thanks again man.
    Joey Anderson
    Mac Web Internet, Inc.,
    a web application developer and service provider.
    http://www.macwebinternet.com
    info@macwebinternet.com

  10. #10
    Senior Member
    Join Date
    Feb 2003
    Location
    right behind you
    Posts
    174
    ok, i assume you just wanted the info panel to move away after 10 seconds. if so, use this code on your buttons. this is for "the park".
    Code:
    on (rollOver) {
    	_root.grad1.gotoAndPlay(2);
    	clearInterval(id);
    	targetx = -1281;
    }
    on (rollOut) {
    	id = setInterval(function () {
    		targetx = 0;
    	}, 10000);
    	_root.grad1.gotoAndPlay(6);
    }
    on (release) {
    	getURL("#");
    }
    there was some old tell target and stuff that i upgraded. you can use the same code for other buttons, just change the respective gradients and target x.
    also, on rollout i wasnt sure where you wanted targetx so i just assigned 0;

    hope that helped

  11. #11
    Senior Member
    Join Date
    Jun 2000
    Posts
    102
    you rock!!...thank you soo much!...you saved me a huge headache!

    Thanks man!
    Joey Anderson
    Mac Web Internet, Inc.,
    a web application developer and service provider.
    http://www.macwebinternet.com
    info@macwebinternet.com

  12. #12
    Senior Member
    Join Date
    Jun 2000
    Posts
    102
    Hey DrSPock?

    If your still out there...

    how would I make the section just fade out using alpha after they mouse out?

    instead of the nav windows flying back across the scene?...I want them to fly in like they do now, but then after rollout just fade away...I attached the source movie again...thanks man...if you don't have time to help, no problem.

    url to source code: http://www.marketingtechnology.com/flash/main_nav.fla

    THanks again!
    Joey Anderson
    Mac Web Internet, Inc.,
    a web application developer and service provider.
    http://www.macwebinternet.com
    info@macwebinternet.com

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