View Full Version : I need help with something
Guybrush Threepwood
05-23-2006, 10:01 AM
I am making a Flash for my end of the year project. We wrote a story about water availability and now I'm making it into an interactive book.
Here is the basic layout:
http://i12.photobucket.com/albums/a220/killer_venom47/info.jpg
Right now, I'm trying to figure out something about the pages.
I want to have a small box that is around the page number you're on, but I don't know how or what I need to do.
I know how to do something like that if it's just going from one page to the next, but some people might want to go to a certain page that they left off at. So I'm guessing you would need action script or something.
Any help would be appreciated.
I might come back in this thread if I need help with anything else.
Thanks again.
Like nextFrame()
and
prevFrame()
THats for goin gforward 1 frame and back 1 frame.
As for typing in the frame you want to go to.
Have an input text box on the frame give it the var of page
Now make a "go" button and give it this code
on(release){
_root.gotoAndStop(_root.page)
}
MOOGLEFIGHTER
05-23-2006, 11:56 AM
If you have flash 8, you don't need the _root. , same function without it.
Guybrush Threepwood
05-23-2006, 12:25 PM
I don't think that's what I need.
I want it so, if you are on page one, there is a small box around the number one on the side. Then if you click on 5, the box will slide to the number five.
You want navigation...
i'll see what I can dig up.
Guybrush Threepwood
05-23-2006, 12:30 PM
Sweet.
http://www.ultrashock.com/ff.htm?http://www.ultrashock.com/flas/Detailed/28.html
Anything you can use there?
Ill keep looking.
Guybrush Threepwood
05-23-2006, 01:04 PM
I'll check it out.
Thanks.
Well, I found something I could use, but not what I originally needed.
arkhan
05-23-2006, 03:57 PM
say, the page 5 MovieClip is named 'b5'
and the box around that will move is named 'box'
so, what you want is to move box to b5 when b5 is clicked
you want
box._y += (b5._y-box._y)/10
basicly, box vertical position adds the distance between itself and b5(final - initial), and that value is divided by a number..so it wont just jump over there..
you also want that to hapend every frame, so you make it in a onEnterFrame function of the box.and you want it to hapend when b5 is clicked.
b5.onRelease = function(){
box.onEnterFrame = function(){
box._y += (b5._y-box._y)/10
if(b5._y-box._y < 0.2 && b5._y-box._y > -0.2){
this.onEnterFrame = function(){}
}
}
}
so, it makes a function that plays when b5 is pressed, it sets the function onEnterFrame of the box to move it to its place, and when the diference is too small, it removes the onEnterFrame, so it stop moving
Guybrush Threepwood
05-24-2006, 10:00 AM
ummm.....
maybe I should learn some more actionscript
Jaroldo
05-25-2006, 05:19 PM
actionscripts actionscripts actionscipts do it
vBulletin® v3.7.3, Copyright ©2000-2010, Jelsoft Enterprises Ltd.