Frame Range Action
I'm in need of an action script to tell a roll over button NOT to trigger if the frame is between frames 5 and 9.
Example: If the playback head is in between frames 5 and 9 the roll over button won't trigger, Outside of 5 and 9 the roll over triggers normally.
Thanks for any help!
FlashKit > Flash Help > Flash ActionScript
Posted on: 08-08-2001, 10:55 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Create Button Action Subject To A Given Frame Range
Hi
I have created a movie which have a set of simple navigation buttons which I would like to be able to start playing the movie from a series of labelled frames going to each label dependent on the position in the timeline?
For example if I have a label at frame 1(start_1) and a label at frame 50(start_50) and so on every 50 frames for a set time, what is the best way to code the button to tell it to return to start_1 before it has reached frame 50 or tell it to return to start_50 on reaching frames 51 to 100 and so on, in the timeline.
I gather that I can use an if else statement but how do I set variables to timeline frame positions to which the button will we act in the correct manner?
Alternatively is there a better(smarter) way to do this?
any help, prodding in a general direction is appreciated
Mizztah
Frame Range Or Delay?
okay heres the deal im trying to get a button to continue playing the movie and then when thats done go to and play scene of my choice
heres what ive tried...i cant just put a goto and play at the end of the first scene because then it would only work for one of the buttons and i have 6 =
on (release) {
gotoAndPlay("Scene 1", 16);
stop("Scene 1", 29);
gotoAndPlay("Scene 2", 1);
}
on (release) {
gotoAndPlay("Scene 1", 16);
wait(13) (also tried delay(13)
gotoAndPlay("Scene 2", 1);
}
on (release) {
gotoAndPlay("Scene 1", 16-29); (i really wish this would work =()
gotoAndPlay("Scene 2", 1);
}
im not familiar with the advanced options so if anyone could help me out that would be great
toast
Looping Frame Range In External Swf
I would like to load an external swf movie, loop a specified range of frames three times, then unload the movie.
Any help would be appreciated.
Thanks!
Frame Action To Call Tell Target (rather Than Button Action)?
I really need a frame to Tell Target a movie clip. For some reason, I can't get a Frame Action to work with Tell Target.
I have no problem applying the same Tell Target to a button, however. Am I missing something? Is Tell Target not meant for Frame Actions?
How To Address A Button On The 5th Frame Of A Movie Clip With Action Script Located On The First Frame Of The Main Time
I'm trying to make a button appear on frame 10 of a movie clip and write actionscript on the main time line that addresses that frame 10 button. I'm not sure of the method I need to do to get that frame 10 button to get a url. I tested the same button when put on frame 1 and it worked, but I'm not sure how to address buttons and other symbols that appear as a result of the playhead moving to different places on movie clip time lines.
Can anyone help, or give me a link?
Thanks
Dennis
Attach Code
//works
_root.buttons_mc.go_btn.onRelease = function(){
_root.mall_mc.gotoAndPlay(1);
//a stop action is placed on frame 10 of the mall_mc movie clip
};
//this button is inside the mall_mc movie clip on frame 10
//doesn't work
_root.mall_mc.url_btn.onRelease = function(){
getURL("http://yahoo.com");
};
//An instance of the same url_btn is dragged on to frame 1 of the mall_mc
//movie clip and given an instance name url_frame1_btn
//works
_root.mall_mc.url_frame1_btn.onRelease = function(){
getURL("http://yahoo.com");
};
Add Action To The Last Frame
I hope this will be the right group to help me. I would like to add an action script like "getURL", so when last frame is played the curent frame opens a new url.
I can only find help on shape and buttons, but not on a frame and "actions".
Thanks for your help.
BTW: I am using KoolMoves product.
Tom,
Help With A Frame Action
I hope this makes sense...
Can I have an action in a movie that gives a command to go somewhere in the scene? After the movie plays, I want it to then goto a frame number in the scene, but it only goes to that frame number in the movie the command is in, and obviously plays it again...help is appreciated, thanks.
[MOD EDIT:- Moved to actionscript! -SJT]
Action For Frame 2 Of A Mc?
Hey guys, i have a movieclip on stage, and it has two frames.
In bouth frames are buttons
MC < Movie on stage
button1 < Button in frame 1
button2 < Button in frame 2
I am trying to dynamically change the color of the buttons using a function
Code:
function changeColor(color1, color2) {
var movieColor = new Color(_root.MC.button1);
movieColor.setRGB(color1);
var movieColor = new Color(_root.MC.button2);
movieColor.setRGB(color2);
}
But as i have mentioned before, the buttons are in different frames!!!
Is there like a frame(2) or something command i could use?
Thanks
~Gabor
AC3 Action Next Frame
Hello all....
I am really having headache with the Flash CS3. and i need your help.
I need some help with script.
I know what i am asking for is very easy to many if not all of you guys.. but i just cant do it .
lets say i have an animation from frame 1 till 30. i want to put an action on frame 15 which is " Stop " so the movie stops on frame 15 and when i click my mouse it continues playing .
now if also possible like if i press any other specific button i can go back to a specific frame.. i am trying all i can to get a script but i am reaching nowhere..
Please help me. i have a presentation on 25th and i have to get this thing working.
Contact me here or on my email . hayder87@hotmail.com
Thanks alot
Go To Frame Action
Hi everybody,
I'm currently working with buttons and animation and am having trouble finding the function for going to a certain frame. I've found all the functions for the play, stop, rewind, forward and bacward buttons, but am going crazy for these, I hope the jpeg helps.
Thanks in advance!
On Frame Unload Action?
Is there a way to trigger an action when a frame is unloaded? I have a number of duplicate movieclips that I want to remove but don't want to have to use the code on every other frame available.
Action On Frame Load.. How?
what action should be used if movie come to a certian place. like
ifFrameLoaded (10) {
if (a == 1){
gotoAndPlay("position1");
}
}
ifFrameLoaded is good aproach or i should use something else? or use other style?
Help - Jumping To Next Frame After Some Action
ok
so i have this problem i have a grid and i can drag mc on that grid but i want to jump to next frame AFTER i put my mc on the grid. In that code i have wrote flash kicks me to next frame when i click mouse button every time. I think that it may be caused because of mouse listener i added on prev frame. But i can remove it and then it changes nothing.
every help appreciated
i attach fla file
Action Triggered From A Frame How?
Please I've been working on this for a very long time, and i can't make it work.
I need this code to trigger from a frame action.
Code:
on (release) {
tellTarget ("_level0.main_mc.loadimages") {
_root.main_mc.gotoAndStop(1);
_root.main_mc.gotoAndStop("main");
_root.zpagetitle = "";
_root.zimgpage = "main";
_root.main_mc.loadimages.gotoAndStop(1);
}
_root.img1txt = _root.img1maintxt;
_root.img1title = _root.img1maintitle;
_root.img2txt = _root.img2maintxt;
_root.img2title = _root.img2maintitle;
_root.img3txt = _root.img3maintxt;
_root.img3title = _root.img3maintitle;
_root.img4txt = _root.img4maintxt;
_root.img4title = _root.img4maintitle;
_root.img5txt = _root.img5maintxt;
_root.img5title = _root.img5maintitle;
if (_root.contenturl1 == "") {
loadMovie("img1main.jpg", "loadimages.img1");
loadMovie("img2main.jpg", "loadimages.img2");
loadMovie("img3main.jpg", "loadimages.img3");
loadMovie("img4main.jpg", "loadimages.img4");
loadMovie("img5main.jpg", "loadimages.img5");
} else {
loadMovie(_root.contenturl1 + "/" + _root.userid + "/img1main.jpg", "loadimages.img1");
loadMovie(_root.contenturl1 + "/" + _root.userid + "/img2main.jpg", "loadimages.img2");
loadMovie(_root.contenturl1 + "/" + _root.userid + "/img3main.jpg", "loadimages.img3");
loadMovie(_root.contenturl1 + "/" + _root.userid + "/img4main.jpg", "loadimages.img4");
loadMovie(_root.contenturl1 + "/" + _root.userid + "/img5main.jpg", "loadimages.img5");
}
tellTarget ("_level0.main_mc.descriptionmc") {
gotoAndStop("on");
}
tellTarget ("_level0.main_mc.contactmc") {
gotoAndStop("off");
}
tellTarget ("_level0.main_mc.btn1mc") {
gotoAndStop("off");
}
tellTarget ("_level0.main_mc.btn2mc") {
gotoAndStop("off");
}
tellTarget ("_level0.main_mc.btn3mc") {
gotoAndStop("off");
}
tellTarget ("_level0.main_mc.btn4mc") {
gotoAndStop("off");
}
tellTarget ("_level0.main_mc.btn5mc") {
gotoAndStop("off");
}
tellTarget ("_level0.main_mc.btn6mc") {
gotoAndStop("off");
}
tellTarget ("_level0.main_mc.btn7mc") {
gotoAndStop("off");
}
tellTarget ("_level0.main_mc.btn8mc") {
gotoAndStop("off");
}
}
I need it to be triggered from fame and not from a button, is this possible?
thank you
Frame Action Questions
I want to create an action using AS3 that will send a user to a specific
frame when another frame is reached. The destination frame, the one that
the user will be sent to, will either have a play or stop action on it.
In this case, is there any reason to put an action on the frame that is
sending the users to the other frame that will tell it to either stop or
play? Or should it just send the user to the other frame and let the
other frame have the action to stop or play?
Thanks.
Action Script For Next Frame
Hi,
I'm making an interactive world map.
The idea is that the mouse rolls over a country which makes the country goes red and the countries name appears. I have got this to work fine, but I am trying to use some script so that when the mouse clicks down and releases on the country, another screen appears which is a screen with information about the country (the original screen needs to disappear - it's not a box of text which will appear but a whole new screen)
Can anyone advise? I have tried to use a basic 'on release go to' script but it doesn't work.
Thanks very much.
On Frame Action,, Not On Button.?
Hi all.
I have the code figured out for how to make Flash do what I want >> If I wanted this to be activated "On Click"
..like click the image, and have "THIS" happen.
problem is I need code that will have the same effect but will activate ONCE FRAME 10 is reached in the movieclip that is playing.
does anyone know how to write it so that it will work like this?
Below is the code that works for the button.
Thanks!
James
Attach Code
btn_TEST_mc.onPress = function() {
_parent.imgholder_mc.unloadMovie();
};
Adding A Frame Action
I have just started using Adobe Flash, having used Macromedia Flash for some time to do simple animations/movies. I have been trying to add a simple Frame Action to a keyframe which in Macromedia Flash simply required clicking on the keyframe required and going into Actions from the menu bar. From here, you simply clicked on the plus sign to add an action and then I selected the Movie Control>Stop action. This then gave me a symbol at the frame I wanted to indicate the action.
This simple action does not seem to be the same procedure in Adobe Flash, when I go into actions and click on the plus sign it brings up a whole list of actions that are not relevant to what I am wanting. Can anyone tell me how I simply add the action to stop an action during a movie, which as noted above is simply Movie Control>Stop action in Macromedia Flash.
Any help appreciated.
Michelle
Frame Action Between MovieClips
Hello Everyone,
I have a little problem with actionscript/behaviors. What I want to do is create a frame action or behavior that takes you from one frame in a MovieClip to a label in the scene 1 timeline.
Any Ideas?
Thanks,
Todd
Action Scripts... Going To Frame (?) In New Swf
I'm having a slight hiccup in trying to make a Flash Presentation.
I created a button that would go to a new movie-clip (a separate swf file) once its released. BUT I want the button to go to frame 23 of the swf file, rather than start from frame 1. Is it possible for the button to activate the swf file from the middle of the movie?
Can someone provide me with the action script (your approximation) for what I want to acheive? pretty please?
Frame Waiting [ Action] ?
HI everyone i'm new HERE
i want my movie to stay on one frame for 10second and second playing the next frame.
can you help ?
tnx.
Action Before Leaving A Frame
In my application I have few frames
In one of the frames, I need to check whether the user has made any changes to the grid and if he leaves the current frame without pressing Save, I have to display an alertbox and do appropriate actions
How can I check this?
Frame Action To Load URL
Hi I kind a new in flash and I'm trying to discover a way to make a frame load an URL my btn takes me to an specific frame and in that frame I need to put an action to load my blog can anyone help me?
thanks in advance!!!!
How To Control ....with A Frame Action
I have the following situation : on scene1 there is a movie clip , instance name : "mc1" ;
"mc1" runs 300 frames and as the last is reached (300th one) I wish this frame controls the action and make it skip to next scene , which is scene 2 ;
Iīve tried that control line bellow -( issued at frame 300) - without result , because it performs a go to and play to the frame 1 of "mc1" and not to frame 1 of scene2 ;
gotoAndPlay ("scene2", 1);
stop ();
Testing the movie with control+shift+enter I can see on debugging screen something like _level0.mc1 what makes me suspect on wrong pathing , despite I donīt know what is wrong.
Can someone give me a hint to make that stuff work ?
navy blue arial
Jump To Frame...(GO TO ACTION)
I would like to create a button and when you click on it, it jumps to a certain frame and text will appear and animations will start playing... Obviously this is very common. One tutorial said that you simply put a "go to" action in the button telling it go for example to frame 5 and then it'll start playing.
Well,say I have 10 buttons each jumping to 10 different places on the timeline! Where does one set of frames stop and the next begin? Does each button link to a different scene perhaps? They have to be separated somehow!thank you.
Leaving A Frame Action?
hi i have a flash that on the first frame [goes on to all of the flash]
i am loading a peace of music into an invisible object.
now i wanna do that when u enter a specific frame the main music will stop and a new one will start playing[no problem]
then i want that when u leave that specific frame the main music will come back[leave i mean to anywhere on the flash]
thanks ahead, z00m
Stop Action At Random Frame
Normally I can find the answers to my questions by searching the forums, but no tips on this one.
On the main time line I have a clock. Here is the action:
When button 1 is pressed a short mc is called which causes the pendulum to swing one way. This then calls an mc on the main timeline which starts the hands on the clock rotating through the hours (12 frames in the mc), which continues looping.
Now when the other button is pressed it calls a short mc which causes the pendulum to swing the other direction.
This is the problem: When the second button is pressed and the pendulum swings the other direction, I want the clock to stop at whatever hour frame happens to be on stage at that time.
I have tried several approaches with no luck. Everything I try seems to start the hour mc over again instead of stopping at a particular frame. Since I do not know which of the 12 frames in the mc will be playing when the second button is pressed, I don't know how to apply the stop action. It's kind of a random thing.
The end result is to keep trying until you can stop the clock at 12:00.
Any suggestions or ideas on the best way to do this? Thanks in advance for any help.
pkw
Pass An Action From Frame In Html To Another One
Hi all,
I have a problem. I have a HTML page with have two FRAMES, left and right. One movie in left FRAME and another in right frame.
I want to pass an action from the movie on the left FRAME to de right one, but I donīt Know how.
ŋCould anybody help me, please?
Thank you.
Action To Be Executed On The Last Frame Of A Timeline
Hi everybody!
I have a button wich controls a movie clip placed in the main movie.
When I release the button, this movie clip plays till it reachs the last frame/keyframe. I need to synchicro the end of this movie with the begining of another one.
I was thinking about using code in the last frame of the movie clip that says that when this last frame was viewed, then begin to play the other movie clip.
How can I do that with actionscript?
Thanks!
Pausing A Timeline With A Frame Action
I have a 180 frame timeline. At frame 1, 60, and 120 I want the playhead to stop for 5 seconds, then start playing again. I know how I would do this with a MC but since its on a timeline I dont know how I would get the condition to loop. Thanks for any assistance.
Target Frame Action Script
I have finished a Navigation menu (button) which made with Flash MX 2004.I put it into my frameset (html), so may i know how to target other frame when people click the button?
Help: Scrolling Text Box Frame Action
I'm trying to make a scroll text block, and I've chosen this method:
scrollable text = "Huntress"
add newline add newline
"Lost in the woods in a never-ending
Pitch black, tall shadows, edges of pine
Needles glowing with a faint eerie
Green hue in the moonlight. The moon that must
Have shown somewhere, somewhere from way up high,
Outside. Not here. Here is a black dream
Standing in thin air with feet on the floor
Which way to go? They are infinite.";
Some how this isn't working, perhaps because I have many lines that skip to the next, with the "enter" button.
Is there some easy way to copy and paste this text into the code that this will work?
Action When Frame In Clip Reached?
Hi,
I have 2 clips, one clip has teh following code.
temp = random(10);
if (temp>5) {
_parent.barC.nextFrame();
}
gotoAndPlay(2);
So this clip just repeats, incrementing the frame number of the child clip.
The child clip has 40 frames, so i want something like
_parent.barC.nextFrame() UNLESS _parent.barC has reached frame 40, in which case, stop, and do something else.
Is there code to pick up the location of the play handler in a clip?
Do i have to use an int counter to achieve my goal or is there a more elegant solution avaialable.
Cheerz
Dwayne
Jump To Next Frame Action Script
Ok, I have this platform game going, but I can't figure out how to make an object link to another frame. I have tried
Code:
onClipEvent (enterFrame) {
if (this.hitTest(_root.char))
this.gotoAndPlay(2);
}
but that does not work at all. What do I do to get it to work? Thank you.
*Edit: Forgot to mention that I have Flash 8 Pro.
Help With Button / Frame Action ASAP
This is basically what I want to do:
((On release / goto and play frame 5
Once you get to frame 8 : goto and play frame 25. ))
I've been trying to add something like this to a button but its not working. Also i want to add this to the button ONLY because I have other buttons doing other things at frame 25 as well!
PLEASE HELP!
Controlling Sound From A Frame Action
hello all..
first post
anyways, my ? to anyone who can help is this, aside from creating a slider to control my sound on a frame/MC (havent decided yet), i want it so that when the user presses a button to go to another section of the site, the music doesnt abruptly turn off, i want it to smoothly turn down to zero....so for example sound is at 100% and when the user goes to another section, it goes to zero then loads the new section with its own sound etc...
any ideas?
thanks
Directing The Movie To A Certain Frame After An Action
this is a simple problem that I have never been able to work through in flash MX
Example: There are 3 scenes, scene 1, scene 2, and scene 3
User is currently in Scene 2, frame 4
if object A hittests object B, he will be directed to frame 5 in the same scene (Scene 2).
so this is what I did on movie clip "OBJECT_A":
onClipEvent(enterFrame){
if(this.hitTest(_root.OBJECT_B)){
_parent.gotoAndStop(5);
}
}
Unfortunately, when the code executes, it directs the movie to Scene 1's frame 5, instead of Scene 2's frame 5. I tried changing the 3rd line to _parent.gotoAndStop("Scene 2", 5);, it simply didn't work. I'm sure there's a direct way to do this, but I can't figure out how. Please give me some help.
Thank you for your time.
Frame Action Load An External Swf
Hi
can a frame action load an external .swf file?
i'm thinking like a loadmovie command - loading one into an MC.
if so any help would be great.
thanks in advance
johnnyu
Can You Fade A Sound Out With A Frame Action?
greetings,
I've searched and read a few posts for fading sounds without the use of buttons - but the answer just fell short (the person figured out what to do, so the thread ended)
Frame 1 on main timeline:
PHP Code:
bouncing = new Sound();
bouncing.attachSound("bouncing");
bouncing.start(0, 1);
I want to be able to fade this sound out on a specifc frame to accomodate different processor speeds and such e.g on my G5 the animation ends before the sound. on my G4 the sound ends before the animation.
Might anyone have an idea on how to accomplish this?
Thanks for the help!
Exporting Action Script In 2nd Frame
I have a preloader in frame one so I export frame for classes in frame two in the publishing settings. I have a scrolling component in the .fla and when I set up the linkage for the scrollable movie clip, it exports into the 1st frame. How do I tell Flash to export action script for component in 2nd frame? Because of the conflict with the publishing settings set at frame 2, the scroll bar won't work unless I publish export action script into frame one.
Please help,
Darryl
[FLA8] Frame Action To Go To Next Slide?
Hi all,
I created a slideshow with two slides. slide1 and slide2.
on slide1 there is an animation.
I would like to go to slide2 once the animation ends (at the end of
the timeline). But when the animation ends, slide1 will restart from
frame 1 and gets into a loop.
Is there a way to make the presentation go to slide 2 automatically,
without keypresses?
I tried various behaviours but can't understand the logic here.
It seems an easy thing to do (to a skilled FLA8 developer, but not for
a newbie).
I Thanks You in advance.
Ciao
;).
tony
Frame Jumping Action Script Help
I want to be able to add action script to a button that not only plays a movie but is able to jump frames in the same movie. For example I want to be able to add an action script to a button so that when the button is released I want the movie to start at frame 10, play till it reaches, frame 20, then immediately jump to frame 30, play to frame 40 and then stop. The Idea is to play different parts of the movie (animation) in sequence with just one button. Whenever I press the button I don't want to see the animation in frames 1-9 or 11-19. If I can figure out how to do this I will be to have different buttons controlling different sequences of the animation of the movie. Is this possible. I haven't been able to figure it out yet.
Frame Jumping Action Script Help
I want to be able to add an action script for a button that is able to jump to different frames of a movie and play them in sequence. For example I want to be able to add an action script to a button so that when the button is released I want the movie (animation) to start at frame 10, play till it reaches, frame 20, then immediately jump to frame 30, play to frame 40 and then stop. The Idea is to play different animations in sequence with just one button. Whenever I press the button I don't want to see the animation in frames 1-9 or 11-19. If I can figure out how to do this I will be to have different buttons controlling different sequences of the animation of the movie. It's seems like it would be a simple thing to do but I can't figure it out and I am new to action script. Please help!!!
FMX2004-probably Really Simple? Next Frame Action
HELP!
Ok well i got this from one of the tut's on here, basically it allows me to move over a little animation of a button and then rollout and it dissapears as easy as it came in. Its great, it works but i am having trouble making it move onto the next frame; heres the source code;
//stop();
stop();
this.onEnterFrame = function(){
if(rewind == true){
prevFrame();
}
}
this.onRollOver = function(){
rewind = false;
play();
}
this.onRollOut = function(){
rewind = true;
}
this.onRelease = function(){
nextFrame();
}
****** Basically i need this button to simply move onto the next frame in the movie. Please find attached the .fla
dean
www.digitalboxes.co.uk
|