Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 10-28-2001, 04:16 AM   #1
whispers
Registered User
 
Join Date: Oct 2001
Location: CFA2h (respect the HEX)
Posts: 48
Default Scrolling Background help???

Heres where I am..
Have movie (main),..have a background that I want to scroll...(I have the background inside of a movie clip..but I can just have the plain graphic there NOT inside of a CLIP if need be...I just did that from looking at a .fla) I have all my buttons nested inside of a movie clip which I dragged to the main timeline.
What exactly need to have instance names given? Anything??

How do I get the buttons to control something not in the main movie timeline? (TELLTARGET??..never used it before..)

I dont want the buttons to have the playhead jump to a certain frame number or anything...I just want the buttons have the background image (or background MC....whichever you think I need) "SLIDE" to a certain corresponding "X"location. Please help...I have been at this same problem for weeks...no help from anyone.
Thanks -whispers-
whispers is offline   Reply With Quote
Old 10-28-2001, 05:59 AM   #2
Billy T
Oops I did it again
 
Billy T's Avatar
 
Join Date: Oct 2001
Location: Melbourne
Posts: 8,579
Default

ok heres what you do

first, give the background an instance name of "sections".

next, create a new movie clip - call it "scroller code". In the first frame of this use this script

play ();
current_x = getProperty("_root.sections", _x);
dif_x = current_x-/:xpos;
setProperty ("_root.sections", _x, current_x-(dif_x/5));

then in the second frame put the action -

prevFrame ();


drag this movie clip from your library to somewhere off the stage in your main timeline.

Then give your buttons an action like this -

on (rollOver) {
/:xpos = "95.0";
}


This should work

Let me know how you go

cheers
Billy T is offline   Reply With Quote
Old 10-28-2001, 06:47 AM   #3
whispers
Registered User
 
Join Date: Oct 2001
Location: CFA2h (respect the HEX)
Posts: 48
Default

Thank You..I will try it out rightnow...let ya know how it works out!! Thanks. Seems easy enough! -whispers-
whispers is offline   Reply With Quote
Old 10-28-2001, 07:06 AM   #4
whispers
Registered User
 
Join Date: Oct 2001
Location: CFA2h (respect the HEX)
Posts: 48
Default

Nope...didnt work!! SORRY..I dont kow what I did wrong....followed exactly what you said to do...Do I need to put the image (sections) in the MC??? No scroll thats for sure..LOL..
Maybe I can send you my .fla?? -whispers-
whispers is offline   Reply With Quote
Old 10-28-2001, 07:27 AM   #5
whispers
Registered User
 
Join Date: Oct 2001
Location: CFA2h (respect the HEX)
Posts: 48
Default

YEAH!...after some messing around...at least I got it to work a little...THANKS TO YOU!! Couple of things though.....

1. I want the position I have it in on the stage to be the main/start position.....when I do that and test the movie..it is off centered by half the "HOME Page" graphic. Anyway to fix that??

2.When I change the xpos for the buttons...it doesnt make a difference what number I put there...it will only slide from the left and only to about half way to the next "graphic

Got any tips on these?..and how to fine tune? Thanks

-whispers-
whispers is offline   Reply With Quote
Old 10-28-2001, 07:59 AM   #6
whispers
Registered User
 
Join Date: Oct 2001
Location: CFA2h (respect the HEX)
Posts: 48
Default

Ok..got it working for the most part. Man,....you rock! I have been trying to figure this out for over a week now....THANK YOU SO MUCH!

I gotta book mark this thread until I memorize it.
Just gonna add some tips so I can re-read them when I come back. Thanks again -whispers-

ok heres what you do

first, give the background an instance name of "sections".

next, create a new movie clip - call it "scroller code". In the first frame of this use this script MC instance name has to match the name in the ("_root." ",_x")

play ();
current_x = getProperty("_root.sections", _x); sections...instance name of MC not image

dif_x = current_x-/:xpos;

setProperty ("_root.sections", _x, current_x-(dif_x/5));

then in the second frame put the action -

prevFrame ();


drag this movie clip from your library to somewhere off the stage in your main timeline.

Then give your buttons an action like this -

on (rollOver) {
/:xpos = "95.0"; edit to position needed
}
(end edit)..I think
whispers is offline   Reply With Quote
Old 10-28-2001, 11:01 AM   #7
Billy T
Oops I did it again
 
Billy T's Avatar
 
Join Date: Oct 2001
Location: Melbourne
Posts: 8,579
Default

heheh cool it sounds like you have it all working now

couple of things to note -

(dif_x/5) - this is where you set the speed of the scroll - try changing the 5 to something else and see the effect

also, click on your "sections" clip on the stage and have a look at the info panel. Make sure it is giving you the info of the center of the clip - not the top left corner or anything. Then you can just move the clip to a position you want, make a note of the x value and assign this to a button.

An initial position can be set by giving a movie clip an action like the buttons have but make it activate on movie load.

The code can easily be added to so you can set y values or alpha or whatever

Let me know if you have any probs

cheers
Billy T is offline   Reply With Quote
Old 10-29-2001, 07:40 PM   #8
whispers
Registered User
 
Join Date: Oct 2001
Location: CFA2h (respect the HEX)
Posts: 48
Default

The only problem I am having now is.....defineing the "X" position when the movie starts.....the initial location on the MC/image that is to correspond to the onrollover command on the buttons!

ANYBODY?....have an idea I can try? -whispers-
whispers is offline   Reply With Quote
Old 10-29-2001, 08:52 PM   #9
Billy T
Oops I did it again
 
Billy T's Avatar
 
Join Date: Oct 2001
Location: Melbourne
Posts: 8,579
Default

try putting an empty, off the stage movie clip in your scene that has an action such as

onClipEvent (load) {
/:xpos = "20";
}


If this figure is the same as the initial placement of the scroller on your stage then it shouldnt move until something else occurs. If it is different, then the scroller will move to "20" from wherever it was placed, as soon as the page loads


hope this helps
Billy T is offline   Reply With Quote
Old 03-07-2002, 06:48 AM   #10
Sephiroth
Jenova Lives!
 
Join Date: May 2001
Location: 3rd planet from the Sun
Posts: 148
Default

ok..billy..mabye u can help me with this too..

i got all the scrolling..eetc to work... so far i have no solutions yet..

i want o iniatiate an action onces the slider has reach its X position..

like this:

if i press a button.. slides to positon 100.. then load MC clip number 1, press button 2..bg slides to positioin 300..then load MC 2..etc..


lately i have found no solution..


all i have been getting is this... :

my button is click..the slide works..but simultaneously the MC is loaded even when the MC bg didnt reach its X positon yet...


how do i make it so it reaches the X pos first..
Sephiroth is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
seamless scrolling background Samantha Gram Animation and Effects 8 12-09-2007 05:06 AM
Scrolling background selena Simple Stuff (Newbies) 1 02-24-2005 09:26 PM
removing pause in Scrolling background Romulus Simple Stuff (Newbies) 8 01-05-2004 07:34 PM
Trying to Achieve this Effect without scrolling background turtlepd Animation and Effects 5 02-12-2003 04:37 PM
Scrolling Background?? whispers Simple Stuff (Newbies) 1 10-28-2001 06:20 AM


All times are GMT. The time now is 11:38 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.