|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Menu problems
I have a bit of a problem. I'm ultimatly looking for some ActionScript that will count to 5 and then load up a new page. This is my problem:
I have a menu bar that is near the middle of the screen for the main page and then for other pages i have made a tween that moves that bar to the top of the page, that lasts for 10 frames (2-11). So after a button (there are 7) is pressed, I want the bar to move to the top and then goto my next page, but i can't find a single thing that will work. Any ideas? Thanks guys Last edited by TylerH : January 17th, 2004 at 02:14 AM. |
|
#2
|
|||
|
|||
|
Hi, I dont see where the counting to 5 comes in. As for the rest well...
say your menu movie is called myMenu. on each button have on(release) { myMenu.nextPage = "News"; myMenu.gotoAndPlay(2); } Then on the last keyframe for the menu animation have: _root.gotoAndPlay(nextPage); That's assuming you have each page on the main stage sectioned off with named keyframes, in this case we want to jump to the News page (keyframe). |
|
#3
|
|||
|
|||
|
Well that wont work because i have 7 different links and i'm not moving ahead in the movie, i'm linking to an html page, so a new page will be loaded in the browser, not a continuation of the .swf
So that is where the timing comes in, what would happen would be that the button would be clicked, the tween would occur (for a timed period) and then the new page would be loaded in the browser. Since i don't want the new page to be loaded immediatly after release i'm having problems. Thanks |
|
#4
|
|||
|
|||
|
Hi, I'm not sure why you think that wont work. It should. Anyway if you really want a timed method then this should do:
Code:
function openPage(theLink)
{
getURL(link, "_self");
}
setInterval(openPage, 5000);
Normally I would recommend cancelling setInterval with clearInterval but if you loading a new page onto it wont matter since the whole thing is replaced. I still reccomend the first thing I said, if you want it to open a new page then use: Code:
on(release)
{
myMenu.nextPage = "News.html";
myMenu.gotoAndPlay(2);
}
last menu kf: Code:
getURL(nextPage, "_self"); |
|
#5
|
|||
|
|||
|
So if in enter that it will go to frame 2 of my scene, play it and when the tween has finished will open up a new page?
Thanks, I will try that |
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > Menu problems |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|