Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Last Frame Played



Like most people I reference frame labels, but I might reference the same label from two different spots in my timeline. Is there a way to call the last frame played so that I can set different parameters based on where the user came from?



ActionScript.org Forums > Flash General Questions > Flash 8 General Questions
Posted on: 03-24-2006, 06:45 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

If On Frame That Needs To Be Played Over And Over
i need to have a hittest as a frame action as the movie is being attatched and as it is being attached i cannot use a goto and play 1 loop so any ideas how to loop a hittest frame code

If On Frame That Needs To Be Played Over And Over
i need to have a hittest as a frame action as the movie is being attatched and as it is being attached i cannot use a goto and play 1 loop so any ideas how to loop a hittest frame code

Wrong Frame Being Played
Hey,

When i tell the root to goto frame 4, it plays frame 3 :s

how is this possible???
this is my code:
in a movieclip:
code: if (_root.player1health<=-100) {
_root.gotoAndPlay(3)
}

frame 3 of _root:
code: gotoAndPlay("Gameover",1)

greetz

Xaero

Check If Frame Has Played?
Is there a way to write an IF actionscript statement that checks to see if a frame (50 for example) has played, and if so then to skip to a different frame. I want to only play frame 50 once and all other times the action is started, skip to a different frame.
Thanks.

[F8] How To Reference A MC On A Frame Not Yet Played
If, from the root timeline, I wish to change the alpha of a movieclip with in a movieclip I just use something like:

_root.parentMC.childMC._alpha = 0;

But that doesn't work if childMC is located on frame 2 of parentMC, and parentMC is currently paused on frame 1.

Is there a way to change a property of the childMC BEFORE moving the playhead of it's parent?

(I could change alpha after loading the frame, but it don't seem to work.)

Thank you!

Go To Next Frame After Video Is Played
Hey everyone,

I'm looking for a very simple actionscript that will go to the next frame in my timeline after an FLV video has completed it's playback. I've found a bunch of different scripts but I can't seem to get any of them to work. I've tried the media.complete command, but that seems to be used for looping a video.

Any help is appreciated.

-mg

Set _alpha If Frame... Is Played
Hi,

I want to set _visible[not alpha as said in the subject line] of a button to true if frame 40 is played.
could you show me how?

Thanks.

Go To Next Frame After Video Is Played
Hey everyone,

I'm looking for a very simple actionscript that will go to the next frame in my timeline after an FLV video has completed it's playback. I've found a bunch of different scripts but I can't seem to get any of them to work. I've tried the media.complete command, but that seems to be used for looping a video.

Any help is appreciated.

-mg

Checking Last Frame Played Possible?
Is it possible to check the last frame played in ActionScript?

I want to execute an animation sequence depending on what the last frame played was or where the playhead was originally just before the animation sequence.

Is this possible? is there a workaround using "_currentframe"?

Any help is appreciated!

Remebering Last Frame Played
hi,

I have a main movie that loads a flash intro movie into _level 50. I want people to be able to click on a button that loads something else into level 50 and when they click on another button it reloads the intro movie back into level 50 and plays from the last frame they saw.

Please help,
thanks

How Do I Say (IF Current Frame Has Played, Goto 10)
How do I say with an action

IF current frame has played, goto frame 10

I want it to work for played, not loaded.

Thanks

Detecting Whether A Frame Or Movie Has Already Been Played
Help help help.
Is there some code that I can use to detect whether a frame has already been played? What I'd like to do is detect yes or no, then jump to a specific frame depending on the condition.
Any suggestions?

Thanks!
Mymy

Detecting Whether A Movie Or Frame Has Already Been Played. - HELP
Help help help.
Is there some code that I can use to detect whether a frame has already been played? What I'd like to do is detect yes or no, then jump to a specific frame depending on the condition.
Any suggestions?

Thanks!
Mymy

IF Frame 13 Played BEFORE, Then Goto(15) HOW? Someone Save Me.
Lets say on frame 1 i want to check if frame 13 has been played BEFORE. if true, then gotoAndPlay frame 15.
if false, then gotoAndPlay frame 2.

Does anyone have an idea? Has anyone done this before?

[F8] Check If A Movieclip Has Played And If So, Go To Frame X
Hi all,

I have a movieclip activated by a button. I want to be able to check if the movieclip has been played once and if so, skip to the end frame of said movieclip.

I've set a variable in the main timeline:
var introPlayed:Boolean = false;

And then, at the end of the movielip in question:
introPlayed = true;

And then on the button which activates the movieclip I've got:
on(release) {
_root.main_mc.gotoAndStop("phone");
gotoAndStop("phone");
if (introPlayed == true) {
_root.main_mc.phone_mc.phonesub_mc.gotoAndStop("in troplayed"); //end frame of movieclip
}
}

but it doesn't work!

Is the fact that my movieclip is rather buried deep, part of the problem?

Thanks in advance!
ScareBBear...

Loading Movie After Frame Played...
Terrible Terrible Title...

Here's the problem: I have one area on my main movie for the content of the website, it is easily accessed through _root.content. I have a movie (home.swf) loaded into "content".

On my main page, I have a button and I want it to play a part of home.swf and then when that is finished, load a different movie into "content". I have been successful in the first part but not the second.

Here is the working script for the button to make "main.swf" play a certain frame:

on (release) {_root.content.gotoAndPlay("next");}

This makes the current movie (home.swf) loaded in "content" to play from the frame labeled "next."

What I want now is that when the movie in "content" gets to the frame labeled "end", I want it to tell it to:

_root.content.loadMovie("bio.swf");

But I don't want to put the script in the movie loaded in "content," I want to put it in the button. Is there a way to do this?

Thanks a bunch,
Rob

I Want Frame 2 To Be Played When These 2 Clips Overlap
First of all, is Flash MX 2003 using ActionScript 1 or 2?

second, I need AS help badly.
k, so I created 2 movie clips, and allowed one to be dragged. I gave it code:
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
}
}
onClipEvent (mouseUp) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.stopDrag();
if (this.hitTest(_.goal)) {
gotoAndStop(2);
}
}
}
_.goal is the other movie clip. I want frame 2 to be played when these 2 clips overlap, but it wouldn't. What's wrong?
Thanks greatly in advance
Helplessman

Cue To Next Frame After Flash Video Is Played.
Basically, I have a video that I have converted to flash video using the encoder. I have imported this video into the first frame of my project. After the movie plays, I would like it to cue a frame with a picture. I will then stop the project on that picture....and that will be the end of it.

I did place a cue point at the end of my video when I encoded it. I thought I could then give an action script command at this cue point to send it to the next frame which would be my picture.

Two problems:

1. Not sure of the cue point action script to give for the "event value" so that it will go to the next frame.
2. My project basically consists of two frames. The first frame has my whole movie, the second from has my ending image. I need to know what script to add so that the project starts with the movie, plays it all the way through, then goes to the frame with the image.

I hope this makes sense.

Cue To Next Frame After Flash Video Is Played.
I posted the last question concerning the image showing up after the picture was played. The anwer I was given did work.

Now I went and complicated things. I would like to move into a tweened set of frames instead of just one frame. what would the script look like for that.

here's was I did for the single frame:

var vidList : Object = new Object();
vidList.complete = function() {
nextFrame(); //or whatever action you want
}
vid.addEventListener ("complete",vidList);
stop();

Once A Movie Has Played, How Do I Get It To Skip To The Last Frame If It Reloads?
So I built a webpage in both Flash and HTML (flash components nested in HTML tables).

I have an intro movie that plays directly into the homepage (all one movie). The movie ends with the homepage - which has links to secondary (HTML) pages.

Here's my question. When I go to the secondary pages, everything is fine, but if I click the "back" button the browser I end up playing the intro all over again, when all I want is the last frame, where the intro movie ends and is the homepage.

Is there a way for the movie to jump to the very last frame once the intro has already been played once?

As a temporary fix, I created an intermediate page between the intro movie and the secondary pages - an actual HTML "homepage" with flash components in it. It looks exactly like the last frame of the intro movie - but the client didn't like the "jump" blip that it created when the browser had to load another HTML page, he wanted to keep the intro to homepage segue smooth.

Is there an actionscript that I can put on the first frame that will sense if the movie has already played once, and jump ahead? Or am I doomed actually have to build the whole site as flash movie - something I really don't want to do.

Thanks for any input...

oh yeah, i'm running MAC OS X 10.3.9, Flash MX Professional 2004 Version 7.0

Control Flash Frame Played From Html Page
Is there a way to control a flash movie from the webpage you are on? I have a single swf that is just a slide show but the client wants the flash movie to start on slide "x" and so on depending on what page you are on in the site.

So at home page it will start on frame 1("start") and on the menu page the swf needs to start at frame"x"("menu")

Any suggestions?

Thanks for your time.

Chris

[AS2] What Actionscript Is Needed To Play The Next Frame After FLV Movie Has Played
Help! I am working on this flash website that holds an intro animation which is a .flv file placed in a .fla file. I am trying to figure out the Actionscript needed to tell it to go to the next frame within the same movie once the flv file has played. Right now it just stops and sits on the last frame of the flv file or the flv file just loops. Any help would be much appreciated.

Thanks,
SR

How Do You Code - "every Frame Played Increases A Variable By 1"
How would you write... "every frame played increases a variable by 1"

example...

if 50 frames are played then "frameVar" = 50
if another 50 frames are played then "frameVar" = 100

Does this work?

Thanks.

Played Progress Bar
Hi everyone

trying to make a progress bar that shows how much of the movie has been played. i did this successfully but i also have a replay button on my movie, when i click the replay button the main movie replays but my sub movie (the bar) does not. i tried an if else statement like: if (main movies plays, play sub movie) else stop but with the correct syntax, the actionscript is within the sub movie and am using MX, any ideas?

cheers

Determine SWF Played Once
I am looking for a script that can be used to determine if an SWF file has been played or not.

We want it to be played once on the first visit to the site and when a user returns on the same day it would either load another file or have a 'Play Again' button in the swf file...

Going to update the swf every few days or even daily on a basis.

Any suggestions?

Redirect To Another Url After A Swf Is Played
Hi,
I want to load another page after the current page has played a swf movie. How can I do it? Thank you very much!

Anyone Played With YahooMaps API In AS?
Hi,
I'm workin w/ the YahooMaps API in Actionscript and have run into a problem. I posted to the Yahoo board, but they aren't really responsive there.

Anyways, what I want to do is have a MapController class that listens to events that are broadcasted from elsewhere. I can handle that part, my problem is the importing of the YahooMap API.

Code looks as such ...

Code:
import com.yahoo.maps.api.flash.YahooMap;
import com.yahoo.maps.tools.PanTool;
import com.yahoo.maps.markers.CustomPOIMarker;
import com.yahoo.maps.widgets.NavigatorWidget;
import com.yahoo.maps.overlays.PolyLineOverlay;

class MapController {
var map:YahooMap;

public function MapController(newMap:YahooMap) {
this.map = newMap;
map.addEventListener(com.yahoo.maps.api.flash.YahooMap.EVENT_INITIALIZE, onInitMap);
}

private function onInitMap(eventData) {
map.addTool(new PanTool(), true);
map.addWidget(new NavigatorWidget("closed"));

/**
var poly:PolyLineOverlay = new PolylineOverlay("yahoo.xml");
map.addOverlay(poly);
**/
}
}
And gives me errors that the YahooMap, PanTool and NavigatorWidget cannot be found. This is odd because if I use the same code within the scripts layer on the .fla doc, then it works flawlessly.

So if anyone has any experience/ideas with this, that'd be great.

Thanks,
Jason

If Movie Played
I have a grid of four images. On each image there are 4 fours that correspond to image 1,2,3,4

HOw would i go about coding the following:

If you press #2 the image shifts over to image 2.
If you press image three it shifts to image 3
If you are on image 1 and you press image 1 nothing happens.
etc etc

thanks
evan

Go To Next Scene After Mc's Played?
Ok here's my situation.

I've got 4 movieclips with a motion tween in them
mcMist1, mcMist2, mcMist3, mcMist4
The mc's are all in 1 frame on the main timeline

My Flash movie is divided into 4 scenes.

Now i want my movie to go from scene 1 to scene 2, after all my 4 movie clips have played.

I've did a lot of searching en found out it can be done with the use of variables, but i don't know how to do ik exactly.

anyone here who can help me out?

tia

[edit] btw I'm using Flash 8 [/edit]

Goto End Of MC If MC Has Already Played
Hello,

I have a short intro that loads the components of my "home" section of the page in a visually pleasing way so it stops at the end with my navigation bar working and active. I want this to play when someone first visits the site, but if they then return to home from another page, i do not want the intro to play again. if they close the site completely then return to it by typing the URL in the address bar, i would like the intro to play on load again (and not play when they navigate back to home from within the site)

In my flash buttons on my other pages, is there a way of telling flash to jump to the last frame in the timeline of the intro, thus skipping the intro? or someway of treating the intro playing as an event and recording that event somehow and adding some kind of "if" statement at the beginning of the intro?

please be specific with advice if possible, i dont really know what i am doing yet. thanks.

Continuing Once An Flv Has Played Through
Ok... I'm a designer, not a developer and google isn't helping me out much.

I have an flv playing in the FLVPlayback component on a single frame. I've got a stop on that frame but I need my flash movie to continue once the flv has completed.

I did embed a cuepoint at the very end when I encoded it in case I'd need it.

I'm not seeing an easy solution. Adobe's help is far too cryptic for me... I need someone to write out the syntax for me...

Thanks in advance.

SWF Bug When Played From Browser
Hi,

I've created a movie with an easing scrollbox and an easing combobox.

Both of these items work when loaded into my standalone Flash 9 player, but when loaded from a HTML page using the browser's flash 9 player, the movie fails to load the section with the easing combo/scrollbox. Instead, it removes my nav bar and dispays 'movie not loaded' in the right-click menu.

Why, if it works in a standalone player, does it not work in a browser?

It is not pulling external data/movies from anywhere and I have tested with win/mac ie/safari and have had no luck with either.

To see for yourself, visit:
http://www.ravine-lifestyle.com/new/
and click on the 'Buyers' section..

Then try downloading the swf and playing it back through a standalone player and you should see my combo/scrollbox appear.

I've really no idea how to resolve or even diagnose this problem so if anyone has any ideas i'd be really grateful for the advice.

To download my swf/fla please visit:
http://www.ravine-lifestyle.com/new/download.html

Thanks

Random MC's Everytime SWF Is Played
Word to ya motha's

I have a 'snail racing' game where there is ONE user controlled MC and the other THREE MC's are running on there own timeline.

But the thing is i dont want the other 3 'opponant' MC's to be the same all the time because when a user comes back they will realise that there are only 3 mc's that always play the same.

How do i make the movie load random MC's everytime i load the SWF? (so that the competition is a little different)

Thankyou for the help in advance

Gav

Detecting Mc :played >>> HELP NEEDED <<<
hi
i faced a problem i never thought of.

i have 6 movieclips inside a movieclip.. they are viewed by drag and drop.. every icon u drop it shows specific content.
what i want to do, is after all movieclips have benn viewed, a specific action occurs..
So how to detect that all movieclips have been played ...

please help

thanks
[Edited by houssam on 12-03-2001 at 06:26 AM]

Flash 4 - Quirk When Played In 5
Hi.

I designed a multi-swf movie in MX which needed to be published in 4. I used all the deprecated action script (tell target etc.) and it published without any warnings that it wouldn't work. It works fine in Flash 6, but in Flash 5 there is one quirk, an audio swf that just won't load/play.

Is there a difference maybe between publishing for 4 and exporting to 4?

Thanks for any suggestion you can offer.

Detecting If Movie Has Been Played Before?
Is there any way in MX to detect if a movie has previously been played and if so, to skip to a certain frame?

Thanks for any help in advance.

Check If A Movie Has Been Played
Is there a way to check if a movie has been played?

A movie will be started only if a another movie has been played.

Any solutions?

Thanks in advance,

BruteD

Reversing Only The Frames Played
Hi there,

I am using Flash 5, and have a button, which, on the over state, motion tweens the graphic. When the user rolls out the button returns to the Up state as expected.

But I am looking for a way for the button to 'reverse' the sequence in the Over state, before returning to the UP state.

THe problem is furthered because say for example the user rolls over and then rolls out before the animation is complete - I would then want ONLY THE FRAMES PLAYED, to reverse, before returning to the Up state, rather than reversing the entire sequence of frames played in the Over state.

Can anyone suggest a way to do this?


I apologise if this is unclear and would be happy to elaborate.

Many thanks,

Summoner

Reversing Only The Frames Played
Hi there,

I am using Flash 5, and have a button, which, on the over state, motion tweens the graphic. When the user rolls out the button returns to the Up state as expected.

But I am looking for a way for the button to 'reverse' the sequence in the Over state, before returning to the UP state.

THe problem is furthered because say for example the user rolls over and then rolls out before the animation is complete - I would then want ONLY THE FRAMES PLAYED, to reverse, before returning to the Up state, rather than reversing the entire sequence of frames played in the Over state.

Can anyone suggest a way to do this?


I apologise if this is unclear and would be happy to elaborate.

Many thanks,

Summoner

If Intro Has Been Played Before, Don't Play It Again
Is it possible to check if an intro has been cached (i.e played before)- and jump straight to the site?

For example, Is the intro cached? If YES load Main.swf > If NO Load Intro.swf

Its just that the intro is quite long and it gets boring looking at it everytime the site loads!

Why Does Actionscript Not Work Once An Mc Is Played Within Another?
At my site OvercastProductions i use, probably like many of you, movieclips that are played within others. most of my small site works fine, except for the CV page, which is basically a whole load of scrolling text controlled by actionscript, this movieclip works fine by itself, but once it is played from the base mc, the scrolling ceases to work. i have worked out that actionscript (in general) does not work once it is placed under another movieclip.

is there any way i can fix this bloody annoying problem??? im fairly new to actionscript and so would like to keep everything as simple as possible without having to change much, if at all possible.

cheers

Make Mp3 Stop After Played
I have made a streaming music file once the song has played I want it to reset to the begining so when play is pressed again it will start at the beginning rather than the last place it was paused. What do I need to add to the actionscript to do this?

How To Save Swf File To Be Played As Dvd?
can sombody tell me the path????
any clues????

Lock A MC From Replaying If It Was Already Played
How would you code this made up scenario:

Buttons:
bu_0
bu_1
bu_2
bu_3

Movie clips
mc_0
mc_1
mc_2
mc_3
mc_change layout
mc_reverse layout

Buttons 0,1 play its corresponding movie clip and will also play the "mc_change layout"

Buttons 2,3 play its corresponding movie clip and will also play the "mc_reversre layout"

Now if you already played mc_change and click mc_1 it replays mc_change layout. How do you get it to not do this?

Or if you played movie clip 3, how do you get it to not replay mc_reverse layout when you clikc bu_2

make sense?

thanks
e

Stop One Sound As Another Is Played
Hi.

Basically, I have a button, and I have placed a sound on it so that it sounds on mouse-over. Just incase the user flicks through the buttons at a fast pace, I want the next button sound (which is sometimes the same one) to play, but for the one currently playing to stop as the other starts.

I hope I'm describing this properly, and I'm sure there's a simple answer.

Anybody willing to help me out?

Thanks,
TMT2.

Looking For A Slideshow Fla That Can Be Paused, Played And More..
Hello,

I'm looking for a tutorial/code of a slide show that can read from an xml file and just fades in the images one at a time. I use one right now on my site, but it cannot be paused, and it doesn't have thumnails. I'm looking for one that the user can click on a particular thumbnail and it will continue playing after that image.

Any links, tips, sites?

Thank you very much for your help.

[F8] Played Track List
Hi There,

I'm trying to use duplicateMovieClip to create a song logging display for recently played tracks. Whenever the "Add Track" button is clicked then a duplicated movie clip should be created next to the play symbol and all the other should tacks move up one.

I've tried looking for all sorts of duplicateMovie examples and so far I've only been able to find the following code which only allows me to make one new movie clip but does not provide the continuity to create more.

I've attached the .fla adn any help would really be appreciated.

Thanks

ERROR With External SWF To Be Played In Other SWF
Hello, I have a short (10 frame) slide show in flash, with simple next and back buttons, and a few links as well... for one frame I am trying to put a smaller video in -nothing fancy, it just automatically plays, no need for a play button, volume, etc... Anyways, when I try to add this video, it either a) does not show up at all, or b) a small flash logo blinks repeatedly, and still the video does not play. The video plays fine on it's own, and the slideshow works fine on it's own as well, or c) the entire flash video resizes to the smaller size of the video and removes the previous flash video. So it must have something to do with how I am 'embedding'/'inserting'/'linking' (not sure what is the correct word/terminology), and I was hoping for a little help. Thanks so much. B.

Movie Loaded But Not Played
Hello,
I am a newbye:
this is my code:
x=_root.createEmptyMovieClip("container",0)
x.loadMovie("file:///loader.swf")

The movie seems loaded given that I can seen an image but It is not played...
what's wrong?

Copyright © 2005-08 www.BigResource.com, All rights reserved