ActionScript 3.0 :: Different Page On The Website Exists At A Different Position On The Timeline?
Aug 6, 2009
This must have been done before and be really easy but I am a newbie so just keep coming up with compiler errors. I have built a website in flash cs4 using as3. I have set up the time line so that each different page on the website exists at a different position on the timeline. Sections have been labeled so that I can jump to that section upon button click.
What happens is when the link to the page/section is clicked the timeline jumps to that section and plays an animation that animates the page onto the stage then stops.("in animation") When you click another link the page should animate off of the stage ("out animation")and the next one animates in.
(I have set the time line up so that after each "in" animation there is a stop and after each "out" animation there is a stop.) This is where i'm having the problem.
I have set up event listeners for the button clicks But i can only get them to either play the "out" animation then that stops, using this code:
[Code]...
What i would like to know is how to add the two together so that when a button is clicked the information about what was clicked is added to a variable. The function plays the out animation then when that is complete checks the variable where the page clicked information is then jumps to that section on the timeline and plays it's "in" animation
View 3 Replies
Similar Posts:
Jul 7, 2010
I'm trying to:Jump from frame 1 to a frame later in the main timeline Reference an object that exists on the stage in that frame, but not in frame 1
Like so:
ActionScript Code:
function endGame():void {
gotoAndPlay("gameOver");
scoreField.visible = false;
}
A movieclip with the instance name 'scorefield' exists in the "gameOver" frame, yet for some reason, I just get a "Cannot access a property or method of a null object reference." This code is all within a function. By the time the reference to scoreField is executed, the timeline is at the right frame.
View 7 Replies
Jun 21, 2004
i am using: mybutton.useHandCursor = false; The button I am using the script on however is not in the main timeline of the movie. I have tried using the script in the first frame of the timeline of the MC that the button exists in. I have also tried using
[Code]...
View 7 Replies
Oct 11, 2011
I have a an unobtrusive flash video looping in the background of a website, it is not essential to navigation - it is purely cosmetic.The flash video loops every 30 seconds.As this video is on all pages, it jumps back to the start when a new page is loaded.Is there an actionscript / javascript way to get it to remember the position it got to on the old page so it can start there on the new page?I do know that this can be accomplished by loading the flash movie in a frame as well as by having the subsequent pages load the contents in AJAX but I was hoping not to go down this route.I have seen other people ask the question and allude to the solution but they only posted that they got it to work without saying how.
View 1 Replies
Jul 8, 2009
I want to learn how to make web page transitions continuous.. Take Virgin free fest for example.. [URL]. when you move from one page to another it has a closing animation of the page you are on before it begins the animation to the next page.. where in the script do I tell it to play the closing animation to this page before playing the opening animation to the next page?
View 1 Replies
Nov 9, 2009
I need to make myself walk in front of my Flash website. All I have is a movie with a white background. Does anyone know the process? Using Flash 8.
View 2 Replies
Nov 22, 2011
How do I link a button thats embedded in frame 2 (music page timeline) to a frame in the main timeline ( frame 3= biography page)? Both pages are on the same scene with link buttons embedded in each page independent timeline.
View 1 Replies
Sep 16, 2009
I've got this API loading on every page of the website. Can .SWF tell itself when it has loaded and thereby default to a loaded position? So that when a user moves to different web pages, the API defaults to its loaded point? NOT from scratch? All the blurs and fade-ins are Methods that respond to a bunch of Timer Events. Once the .SWF is loaded how can it DEFAULT to its loaded point when a user changes web pages?
View 1 Replies
Jul 29, 2010
I have created a simple flash swf which I have added to all the pages of my website. For some reason when I load one particular page a blank screen appears. When I delete the swf the page appears.
[Code]...
View 9 Replies
Sep 2, 2010
How to find Timeline Position of my Movie.
View 16 Replies
Oct 28, 2006
just wondering if it is possible to be able to remeber the timelines position:example:
- the user is say on frame 5 or whatever frame the user is up to (its a quiz senario);
- the user then clicks a link which takes them to frame 15
- when the user clicks on the back button this will take them back to the page which they were viewing whatever that may be for each user.
is this possible or is there any tutorials about it where i can learn this?i have seen one example of it being done where it remebers what level you where at but i ca't remeber where i saw that example/tutorial
View 11 Replies
Nov 5, 2011
I'm creating a presentation, where it involves importing a swf into a new swf ... ironically for me, that's the easy bit (works like a charm! My (probably simple) issue, is trying to import it to a certain placement on the page, instead of the default top left. I tried to "edit multiple frames" approach, but my poor old PC almost froze, as there are many frames involved.
if there is a simple way to import to a specific location on a new blank movie, I'd be very keen to hear how this is achieved.
View 3 Replies
Sep 23, 2011
I am kind of new to javascript/html5. normally I would do that kind of stuff inside flash/as3. but since the iPad doesn't support that I need to switch the horse...I want to build a website where words are floating in position and size and if the mouse comes over one word it should draw some lines to all the other words. are there any frameworks one could use? the whole should look like a tag cloud with lines between the tags.
View 2 Replies
Sep 28, 2009
I'm having an issue with my website design and as I'm relatively new to flash I can't seem to fix it on my own. I know what I'm supposed to do, technically, but not sure how to actually implement it. Below is a picture of my timeline: What my problem is that the buttons for navigating my pages (bio, news, projects, links, etc.) are nested inside of my Navigation MC (on the Navigation layer) and so they appear in the timeline (at frame 20) before my content does (frame 70). Because of this, the buttons can't be aimed at the content because their code is run before the content even exists.
I'm guessing that what I need to do is to instantiate my content at a point in the timeline before the navigation/buttons occur... but as the content is the last part of my loading animation, I'm not sure how to do that. I read something about adding the MC's but keeping them invisible, then making them visible again at teh appropriate time, but I don't know how to do that or if it would somehow mess with my animation (everything fades in one item after the other, with the content being the last part).
View 0 Replies
Feb 3, 2011
I've been playing with this cool template and I'm trying to figure out on how to add another page and link it. Looking at the actionscript below
for (var i = 1; i<=5; i++) {
var butNum = _root.menu["b"+i];
var butNum2 = _root.footer["b"+i];
[Code]....
View 2 Replies
Feb 18, 2009
I want to have a separate swf file, with a separate load associated with it for each page of my website. I'm not quite sure how to do this. i want people to be able to go to specific pages in my flash site. For example, if they wanted to go to the home page they could go to: [URL]. If they wanted to go to the about page, they could go to: [URL]. I believe this means that I would have to have a separate swf file for each unique page, I'm not sure how to jump from one swf file to another. I've read in some other posts something about the GoToAndPlay function.
View 6 Replies
Jul 14, 2009
This is what i am trying to do. I want to insert a webpage inside of a predefined space in flash. Kind of like an iframe in html. Here is where i want the webpage to appear:
How can i define the area where the website will appear and essentially insert an iframe?
View 3 Replies
Oct 2, 2009
I have a mc with thumbnail images ('thumbs_mc'). Within 'thumbs_mc,' I have mc instances that change alpha on rollon and rollout. When clicked, these mc instances also control the main timeline. That's all good and working fine.Now, however, I want something over each thumbnail to indicate which of them is currently active. (I thought about using the same mc for both the mouseover and current marker, but it's problematic since rolling off the mc sets the alpha to 0, destroying the current marker.)
So I figured that I could use another mc (one instance is 'mark_red_btn') and just control its visibility, based upon the where the playhead is in the main timeline.This is what I have in the first frame of the mc that contains the thumbs the mouseovers and the current markers:
mark_red_btn._visible=false;
if (_root._currentframe == "red") {
mark_red_btn._visible = true;
};
Unfortunately, it is not working. The mc 'mark_red_btn' stays invisible even when the main timeline is on the frame labeled 'red.'
View 9 Replies
Sep 10, 2009
I am trying to create a variable in Actionscript 2 that will record the position in the timeline, so Flash knows the user's last position on the timeline.The first line in the mc is: var portfoliostate;On frame 20 of the timeline, I have the following actionscript: portfoliostate = "1_ portfolio";When a button is clicked, I want Flash to recognise if the user has been on frame 20 or not. The code on the button is:this.onRelease = function()[code]However it does not seem to be working. I am implementing this correctly?
View 3 Replies
Sep 3, 2010
How to find Timeline Position of my Movie.
View 9 Replies
Oct 2, 2004
how do u make a currently playing song (s1) move to a new spot in the song?1.position=wure;were wure is the position in milliseconds i want it to bedoes not seem to work .s1.stop;s1.play(wure,0);
View 2 Replies
May 21, 2007
Does anyone know how to control an mc's timeline with the mouse position? So, when you click and drag right it plays the timeline forward and vice versa? I know how to do it with a slider, but I'm stuck on replacing the slider position with the coordinate where you click your mouse...if that makes any sense.
View 2 Replies
Oct 2, 2004
how do u make a currently playing song (s1) move to a new spot in the song? s1.position=wure; were wure is the position in milliseconds i want it to be does not seem to work .
s1.stop;
s1.play(wure,0);
does not seem to work either
View 2 Replies
Feb 10, 2010
how to controll the timeline via moving the moiuse in x (left to right ).basicly i wsant to shocase a sculpture of mine in a seemingly quicktime vr fasion. so i will take lots of images of the sculpture in difrent agles to get the 360 degreemovie. then import intoflash timeline. Then somehow i need a script to control the scrub the timeline images (to create the quicktime vr look )
View 17 Replies
May 15, 2005
i want to know if anyone can tell me how to controll the timeline via moving the moiuse in x (left to right basicly i wsant to shocase a sculpture of mine in a seemingly quicktime vr fasion. so i will take lots of images of the sculpture in difrent agles to get the 360 degreemovie. then import intoflash timeline. Then somehow i need a script to control the scrub the timeline images (to create the quicktime vr look )
View 3 Replies
Jul 1, 2009
I made an intro animation for a website. Packaged it up into a movie clip, selected "Export for ActionScript", dragged it into my timeline, and gave it an instance name (myIntro_mc).
This is not an exported swf... it only exists in my library as a symbol (and what ever folder of classes it goes to when you export for action script).
The intro plays some animation, has a button to continue to the site, plays some more animation and then stops.
The movie clip is in its own layer and has 4 frames of the main timeline.
If I don't tell the main timeline to stop in frame 1, the intro never shows up... playback goes directly to frame 5 (which is the home page).
If I put a stop(); in the first frame the intro plays and stops and the main timeline never resumes.
I can't sort out how to tell the movie clip to play the parent timeline when it reaches the end... nor can I figure out how to wait in the main timeline for the intro to finish playing before resuming the main timeline.
I've been gnawing at this an embarrassing amount of time and have tried all sorts of bad code in both the main timeline and in the child movie clip.
View 4 Replies
Sep 28, 2009
how to build and structure a full flash website using the OOP approach. I have an idea of how to structure an application using the MVC design pattern, but I cannot put things together in order to structure a whole website.
View 4 Replies
Jan 30, 2007
I have a question on Flash structure "best practices". I am wondering which is the best way to go about designing a full website in Flash.I have seen the tutorials provided by Kirupa and others, but nothing answers the question I have. My question is this: How do I combine what I can do in actionscript and use the Flash timeline also? Or should I even try to combine both?
Ideally, I know we should use actionscript to design Flash pages, using CreateEmptyMovieClip, etc. That way the pages are truly dynamic using external images and xml files, and the entire Flash movie is only 4-5 keyframes. However, I cannot accomplish all the tasks in actionscript.I can do many things using Actionscript, write functions, tweens, filters, etc. But obviously I cannot do everything. Many things I want to do are easier using the Flash timeline. For example, a navigation bar which slides in from the outside once the entire page loads. I know the AS to make the nav bar slide in and out, but I cannot use AS to draw the nav bar in the way I want it (two layers of buttons with a line in the middle).
What is the best way to go about designing a site in this manner? Should I use the first few keyframes for the things I can do in AS, such as loading global variables, loading external data, etc. Then use regular Flash animation tools (keyframes & timelines) for the rest?
View 14 Replies
Sep 27, 2009
so I'm having an issue with my website design and as I'm relatively new to flash I can't seem to fix it on my own. I know what I'm supposed to do, technically, but not sure how to actually implement it.Below is a picture of my timeline:What my problem is that the buttons for navigating my pages (bio, news, projects, links, etc.) are nested inside of my Navigation MC (on the Navigation layer) and so they appear in the timeline (at frame 20) before my content does (frame 70). Because of this, the buttons can't be aimed at the content because their code is run before the content even exists.
I'm guessing that what I need to do is to instantiate my content at a point in the timeline before the navigation/buttons occur... but as the content is the last part of my loading animation, I'm not sure how to do that.I read something about adding the MC's but keeping them invisible, then making them visible again at teh appropriate time, but I don't know how to do that or if it would somehow mess with my animation (everything fades in one item after the other, with the content being the last part).
View 3 Replies
Jun 14, 2011
I have a one page web site with 5 links to pseudo pages, so my problem is that on every part of the web site the swf files start playing. (Of course I understand that I can set the first one to play and the others to stop mode, but that doesn't solve the problem) What I try do do is this: *When the web site starts only the first pseudo page let the swf play. *When clicking a link to an other pseudo page that particular movie on the linked page starts playing. *All other swf movies don't play.
View 6 Replies