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




HitTest And _currentframe ?



ok im doing a hitTest im using this code.

onClipEvent (enterFrame) {
if (this.hitTest(_root.blueBUTTTON) == false || _currentframe==1==false) {
tellTarget (_root.animation) {
gotoAndPlay (2);
}
}
}

i want it to see the hitTest and check the currentframe of a MC. at the moment im using the or '||' operator but i need 'and'
like check the hitTest and check the current frame of this target.(i don't know how to tell the script to check the hitTest in the main timeline and check the currentframe of a target MC)

can anyone help me?

mallrat68



FlashKit > Flash Help > Flash ActionScript
Posted on: 03-09-2002, 11:49 AM


View Complete Forum Thread with Replies

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

_currentFrame=what?
I am having a problem with the following code:

c=mc._currentFrame
if(c=3)
othermc.gotoAndStop(c)

The othermc always goes to frame 3 no matter what mc's current frame is. Does anyone have an idea of how to remedy this? I have been fighting this one for awhile.

-gamist

_currentFrame
I have created 5 buttons - each triggering off a different color tween (different m/clips on the main stage). I want it so that when one button is pressed the m/c colour tween appears ontop of the current colour. I have tried to do this using the currentFrame property. I have an if formula that checks to see if the other colour m/c's frame positions are at a specific frame label, and if so it fades out as the new colour tween comes in. It doesn't work! This is the code I have used - does anyone know what's wrong with it? Any help would be much appreciated.

on (press) {
_root.dblue.gotoAndPlay("start");
if (_root.green._currentFrame=="stop") {
_root.green.gotoAndPlay("fade");
}
if (_root.gold._currentFrame == "stop") {
_root.gold.gotoAndPlay("fade");
}
if (_root.mint._currentFrame == "stop") {
_root.mint.gotoAndPlay("fade");
}
if (_root.lblue._currentFrame == "stop") {
_root.lblue.gotoAndPlay("fade");
}
}

Thanks,
Shakaflash

_currentFrame
Hope this makes sense!!

I've got a 3d environment which rotates at a constant speed and is an animation of x amount of frames within a mClip.

I also have a number of menu options which correspond to points within the 3d enviroment.

When a menu item is clicked I need to calculate which frame the 3d animation is on and which frame the animation needs to move to, then stop.

I don't want to jump to a specific frame in the mClip, it has to go through all preceding frames until it reaches the right frame for that option. I'd also like the animation to speed up when a menu option is clicked


Any help would be greatly appreciated

Cheers

Nick

_currentframe
if i say to flash, on mouseevent
if _root.bla._currentframe=1 or 3
_root.bla.nextframe


how do i say if root.bla is 2 or 4 do nothing?

this _currentframe is doing some weird things here

_currentFrame
this is a simple question that I hope has a simple answer:
*how does _CURRENTFRAME work and when is it to be used??
Thanx

If _currentframe Eq ?
on (release) {
_root.gotoAndStop(2);
if (_root.menutransfer._currentframe eq (15)) {
_root.fotos.gotoAndStop("bottom");
}
;
}

ok the deal is here..
if i release the button is goes to the second frame in the stage.. when it hits this frame it starts playing the MC menutransfer...
that works..

next im probably doing this wrong...
i want it to load a target background photo on frame 15 of the MC menutransfer.. but the if statement doesn't seem to be correct..

if i remove the statement.. the correct photo loads.. but too early.. it must load on frame 15!..

please help..

thanks in advance..
Martijn.

_currentframe Help
Hi,
I am a newbie to flash and actionscripting..

I have a movie that shows a virtual tour of a site, with a cursor that moves around various screenshots, demonstrating features. When it shows something important, I attachMovie a new little MC to the main timeline, using attachmovie. (throughout the movie, there are about 60 different popup MCs)

To do this i stop() the main movie at a desired frame, add an instance of the popup MC to the maintimeline and call attachMovie to that MC. the popup MC plays and then a stop() command and a _root.play() is entered to play the main timeline.

My problem is that i want to enter player controls, (ie PAUSE and PLAY button). I've created two buttons, pause and play, and on(release) can call _root.stop(), but i can't make the attachedmovie stop because i don't know what instance is actually going to be playing at the moment someone presses PAUSE. So far i can create an action in the attached movie, but can never track the _currentframe of that clip (i believe the _currentframe just gives me the root frame the MC was attached to). I want to know how i can increment through a MC attached to a stopped main movie clip, using _currentframe + 1. (i want to do this so i can check the state of a variable i have set called bPlaying. if false, then i don't want to increment or go, if true, then go to _currentframe + 1 and do the check again)

this sounds pretty wack, I may not have constructed the main movie and attachmovie correctly, or it just may not be the best way to solve this, but i would appreciate any or all help in the matter. any solutions or just knowledge on how to create this thing would be great. i have looked all over for tutorials, but haven't found much cept one on flashkit that i was unable to use. thanks in advance,

you can see an example of what it looks like here, its unfinished right now.
http://www.mixonic.com/demo.jsp

thanks for real yo.
ameet

If _currentframe Then What?
I have a movie which is activated by a button. The movie has three stages. the first stage consists of one frame and there is no motion. the second stage it tweens and the third stage is one frame it there is no motion. the button controls which stage the movie is in. on release of the button it moves the movie from the first frame to the second frame beginning the tween. other buttons in the movie cause it to be on frame number 17 which is the third stage of the button. if the movie reaches it's third stage i need the buttons that control its first and second stages to not activate the movie again unless it is brought back to the first stage. the code below is what i am using.

on (release) {
if (_currentframe._root.info_panel.scroll_mov=17) {
_root.info_panel.scroll_mov.gotoAndStop(17);
}
}

i hope you can see what i am trying to do, although you have probably found that i have no idea what i am doing. if you have time please help.

matthew

Using _currentframe
This is bugging me and I must be looking something over...

myCurrentframe = _root._currentframe();
trace(myCurrentframe);

When I try to trace the variable it says the variable is undefined which is reakin havok for my current frame status bar. Does this look defined to you? Flash MUST me wrong! hehe

Thanks, A quick responce is always much appreciated

If you visit this thread, please tell me if it looks good to you, or if not.

Josh

If _currentframe
Ok, any help would be great...thanks in advance! What I have besides no clue is: One Movie named "start", one button named "continue", one movieClip named "mc01".

My Goal: With my button "continue" in the timeline of my main movie "start" i wish to control the position of the play head in my movieClip "mc01" BUT with using conditional if statements depending on where the play head is currently at within "mc01"

for example: (forgive my syntax)

if currentframe of _root.mc01 = 1
_root.mc01.gotoAndPlay(2);

else if currentframe of _root.mc01 = 2
_root.mc01.gotoAndPlay(3);

else if currentframe of _root.mc01 = 3
_root.mc01.gotoAndPlay(4);


That is the idea...hope it makes some sence. I just don't know how to write it..Thanks again.

If _currentframe >= 1 ?How To Do That?
Hi guys, i have what i think as a "simple question" for u, but i just cant do it properly...

I want that when a button is pressed, it checks if a movie clip current frame is bigger then 1 and smaller then 7 (example)....if its is, it says to that mc to go to and play another frame (like frame 8)... how can i do that?


thx in advance;.;

_currentframe
//guys please read my reques because i have no
additional place where i can ask a help
/* i'm trying make a movie that would be on main timeline
from where would be loaded other moviclips from other folders
for that reason and for examples i have made two keyframes which:
first is empty and need to load external movie inside it,
and another is keyframe which have own content*/
//in action frame (1st) on layer 2 i wrote this code:

stop();
_root.createEmptyMovieClip("some_mc", 1);
_root.some_mc.loadMovie("someClip.swf");
/*up to now everithing go ok, but when i start
making some condition, problems starting*/
/*for Example i want to make follow, when the loaded MovieClip (someClip.swf)
reach the frame labeled "someName" then back to my _root-mainTimeline and go on
with frame "2" and rest of project*/
// i have try with something like this:
if (_root.some_mc.someClip._currentframe == "LabelName") {
gotoAndPlay(2);
/* i want to go on frame two because over there is my mainMenu*/
}else{
/* here is my second problem whis is make my hurt,
i just don't know do i need to write additional code
which would keep the action untill movie have not reached the last frame*/
}

_currentframe
//guys please read my reques because i have no
additional place where i can ask a help
/* i'm trying make a movie that would be on main timeline
from where would be loaded other moviclips from other folders
for that reason and for examples i have made two keyframes which:
first is empty and need to load external movie inside it,
and another is keyframe which have own content*/
//in action frame (1st) on layer 2 i wrote this code:

stop();
_root.createEmptyMovieClip("some_mc", 1);
_root.some_mc.loadMovie("someClip.swf");
/*up to now everithing go ok, but when i start
making some condition, problems starting*/
/*for Example i want to make follow, when the loaded MovieClip (someClip.swf)
reach the frame labeled "someName" then back to my _root-mainTimeline and go on
with frame "2" and rest of project*/
// i have try with something like this:
if (_root.some_mc.someClip._currentframe == "LabelName") {
gotoAndPlay(2);
/* i want to go on frame two because over there is my mainMenu*/
}else{
/* here is my second problem whis is make my hurt,
i just don't know do i need to write additional code
which would keep the action untill movie have not reached the last frame*/
}

_currentframe
//guys please read my reques because i have no
additional place where i can ask a help
/* i'm trying make a movie that would be on main timeline
from where would be loaded other moviclips from other folders
for that reason and for examples i have made two keyframes which:
first is empty and need to load external movie inside it,
and another is keyframe which have own content*/
//in action frame (1st) on layer 2 i wrote this code:

stop();
_root.createEmptyMovieClip("some_mc", 1);
_root.some_mc.loadMovie("someClip.swf");
/*up to now everithing go ok, but when i start
making some condition, problems starting*/
/*for Example i want to make follow, when the loaded MovieClip (someClip.swf)
reach the frame labeled "someName" then back to my _root-mainTimeline and go on
with frame "2" and rest of project*/
// i have try with something like this:
if (_root.some_mc.someClip._currentframe == "LabelName") {
gotoAndPlay(2);
/* i want to go on frame two because over there is my mainMenu*/
}else{
/* here is my second problem whis is make my hurt,
i just don't know do i need to write additional code
which would keep the action untill movie have not reached the last frame*/
}

_currentframe
//guys please read my reques because i have no
additional place where i can ask a help
/* i'm trying make a movie that would be on main timeline
from where would be loaded other moviclips from other folders
for that reason and for examples i have made two keyframes which:
first is empty and need to load external movie inside it,
and another is keyframe which have own content*/
//in action frame (1st) on layer 2 i wrote this code:

stop();
_root.createEmptyMovieClip("some_mc", 1);
_root.some_mc.loadMovie("someClip.swf");
/*up to now everithing go ok, but when i start
making some condition, problems starting*/
/*for Example i want to make follow, when the loaded MovieClip (someClip.swf)
reach the frame labeled "someName" then back to my _root-mainTimeline and go on
with frame "2" and rest of project*/
// i have try with something like this:
if (_root.some_mc.someClip._currentframe == "LabelName") {
gotoAndPlay(2);
/* i want to go on frame two because over there is my mainMenu*/
}else{
/* here is my second problem whis is make my hurt,
i just don't know do i need to write additional code
which would keep the action untill movie have not reached the last frame*/
}

_currentframe
hi. trying to get movie to play the rollOut animation only if the rollOver animation is complete. unable to find an operator dealing with "playing" although i thought i've seen one, i resorted to comparison operators. this works, but poorly. can someone give me a hint how to say:


Code:
if(_currentframe = anythingfrom2to30) {
test.waituntilframe30thenplay;
}
else {
test.gotoAndPlay(31);
}
}
obviously, the red portion doesn't work and is what i need to replace with ____???

below is the crapfest i'm dealing with since i don't know anything better. disregard it at will.


Code:
on (rollOver) {
test.gotoAndPlay(2);
}
on (rollOut) {
if (_currentframe == 20 || 21 || 22 || 23 || 24 || 25 || 26 ) {
test.gotoAndPlay(31);
}
else {
test.play();
}
}
the animation is 60 frames in length. frame 1 has a stop and frame 30 has a stop.

_currentframe
I want to check whether a movieclip on the main stage is on a particular frame already, before I run something else on another movieclip that also resides on the main stage.

So here's what I do:

code:
if (_root.movie1._currentframe == "theFrameIwantitToBeAt") {
movie2.gotoAndPlay("somesome");
}
else {
movie1.gotoAndPlay("toGotoTheFrameIWantitToBeAt");
}



But this code always does the ELSE part, even if I'm positive it should return True.

Can anyone help me with the _currentframe syntax?

_currentframe Off By 1
I am trying to use _currentframe for my current page number so I can change my movie without having to change page numbers everytime.

On frame 1 I have an action of page=_currentframe.

I also have a function that spans the entire movie that says

next_btn.onRelease = function() {
page = _currentframe;
myPage_txt.htmlText = page+" of "+total;

nextFrame();
}

So frame 2 really should display a 2. I could put it a +1 or something, but I want the user to jump to a particular section if they have been in the movie before, so adding a +1 gives inaccurate page numbers.

Thanks for the help.

_currentframe
I'm trying to test the _root._currentframe value in an "if" statement, but I want to test it using the frame LABEL, not the frame NUMBER.

For example:

on(release) {
if(_root._currentframe != "homePage") {
gotoAndPlay("home");
}
}

I know this works if I put the frame NUMBER instead of the label. But is there a way that I can get it to work with the LABEL??

Thanks!

_currentframe
I want my movie to play if the current frame is a certain frame or not. This happens on press of a button. I'm using the following script but it plays no matter where the movie is... Ideas?
code: on(press) {
this.remotesensor_mc.gotoAndStop(2);
if(_root._currentframe = 1) {
play();
}
if(_root._currentframe = 10){
play();
}
if(_root._currentframe = 19){
play();
}
else {
trace('ELSE');
}
}
on(release) {
this.remotesensor_mc.gotoAndStop(1);
}

_currentframe Help
Hi Everyone,
I just want to seek some expert advise.. I just want to know if "_currentframe" can make another action when it reaches a specific frame upon on(press). Here's the script
======================================

on(press){
this.gotoAndPlay(2);
{
if (this._currentframe == 10){_root.gotoAndPlay(2);
}
else{
this.null();
}
}
}

======================================
1. There are several buttons in the flash movie and each button has a differenct action each time it reaches a frame. I don't know if frame actions will do the job because if i want to reach my frame 10 frameaction and i have an action in frame 9 ofcourse it will do 9 first.
2. I'm not really sure if my else statemet is ok. I just want the "else" to do nothing.

Thanks a lot and i hope for your expert advises!

_currentframe-#
Code:
_currentframe+"any number"
works, but
Code:
currentframe-"any number"
doesnt

is there anyway i can get the movie to go back x amount of frames?

_currentframe Help
Hello flash freaks.

I'v been working hard for a month or so on a little project of myn(in 2.0), but i

could do with a bit of help now with part of it, if some one would be so kind?

The problem go's a little like this :

I have a movie clip called 'Box_mc' which has 10 frames, On those ten frames i'v

placed ten other mc's (each of them colored differently,20 frames long, and

numbered so i can see what frame there on) called 'Num1_mc',Num2_mc and so

on.

Ok so what im trying to do is, when Box_mc's time line go's to nextFrame(or

prevFrame), i would like the Num_mc on that key frame to go to the same frame

number as the Num_mc was on in the preveus key frame, if you see what i mean?

Here's what i'v tryed so far for the first frame :


ActionScript Code:
onClipEvent (enterFrame) {
        if (this._currentframe == (+1)) {
    if (this.nextFrame == (+10)) {
        }
    this.Num10_mc.gotoAndStop(this.Num1_mc._currentframe);
} else {
    if (this.nextFrame == (+2)) {
    }
    this.Num2_mc.gotoAndStop(this.Num1_mc._currentframe);
    }
}

I have a feeling this maybe the wrong way to go about this in the first place,
Bearing in mind i am also a bit of a dumnass,Any pointers would be a helpful .

_currentframe + X
ok im useing "_currentframe + x" to skip keyframes on the timeline, but the problem is that when its near the end of the timeline w/ lets say 2 keyframes left and x=4, i want it to skip the last 2 keyframes of the timeline and then once it goes back to the beginning of the time line i want it to finish skiping the remainder of 4, essentially stoping at keyframe 2 (does that make sense). but as soon as the timeline starts over it just stops at keyframe 1, which is bad. so my question is, is their a way to make it continue skiping frames even if the timeline starts over?

_currentFrame
_currentFrame is having a real problem, it works on scene but not the other: here's what I did

I did two scenes Sc01 and Sc02, I put a button in each one of them to toggle to the other scene in the same place (frame number) using this function:

1- on the first scene button:
on (release) {
gotoAndPlay("Sc01", _currentFrame);
}

2- on the second scene button:
on (release) {
gotoAndPlay("Sc01", _currentFrame);
}

It worked with the first scene but the second doesnt work with the second scene. Can anyone plaese tell me what's the problem? I attached the Zip file which contains the swf and the Fla files

_currentframe & If -- Used Together? Possible?
Hello all.

Does anybody know how the "_currentframe" and "if" expressions work together? Any example scripts or movies available? I couldn't reach anything via search engines because the word "if" is quite an oftenly used one.

Please...

_currentframe
I can get this code to work, how far off am I?

it is just taking me to the first frame, i want it to take off from the current frame.


on (press) {
_root.gotoAndPlay(_currentframe);
}

_currentframe Help Please
Hey,

Im trying to get my text to change depending on the playhead in another MC. This is my code... someone have a peak at what may be wrong


Code:
btn.onPress = function() {
ball.gotoAndPlay("start");
if (_root.ball._currentframe>2) {
_root.txtArea.text = "Hello Ball!";
} else if (_root.ball._currentframe<10) {
_root.txtArea.text = "Goodbye Ball.";
}
};

_currentframe HELP
Hi Everyone,
I just want to seek some expert advise.. I just want to know if "_currentframe" can make another action when it reaches a specific frame upon on(press). Here's the script
======================================

on(press){
this.gotoAndPlay(2);
{
if (this._currentframe == 10){_root.gotoAndPlay(2);
}
else{
this.null();
}
}
}

======================================
1. There are several buttons in the flash movie and each button has a differenct action each time it reaches a frame. I don't know if frame actions will do the job because if i want to reach my frame 10 frameaction and i have an action in frame 9 ofcourse it will do 9 first.
2. I'm not really sure if my else statemet is ok. I just want the "else" to do nothing.

Thanks a lot and i hope for your expert advises!

_currentframe
I have created five movies with 10 frames in each movie. I placed all 5 movies and named them accordingly on the stage. So now I have five populated frames on the stage. I would like to place PREVIOUS AND NEXT buttons on the stage which will be referencing each movie. I placed instances of PREV|NEXT buttons for each movie (all togather 5 frames) on the stage. So when I go to my 3rd movie, I would like to have a function explore and count the frame within that movie and perform 2 tasks:

If first frame then PREV_btn_visible = false;
if last frame then NEX_btn._visible = false;

I could manually update the NEXT|PREV button which would be a long way..like this.

if (MC_clip1._currentframe == 1) {

this.prev_btn._visible = false;

} else if {

_currentframe == 10;
this.next_btn._visible = false;

}

I wonder if it is possible to find the firs and last frame?

_currentframe, Ugh, Ugh
Hey all.

I'm not sure what I'm missing here. In my mind this should work. Btw, this code is in the frist frame of a MC and not on the _root.

I have five buttons total and I want to check the main timeline _currentframe to tell the button to work or not.

Thanks for any ideas and help.


ActionScript Code:
frame = _root._currentframe;
 
 
news_mc.onPress = function() {
    _root.gotoAndStop(10);
    if (frame == 10) {
        null;
    }else{
        this._ty = -350;
        this.gotoAndPlay(2);
        _root.totalMenu_mc._ty = 560;
    }
}

_currentframe
Hi,

I'm trying to control the position of a movie clip with the function _currentframe. I just want to know that if the movie clip is in a especific frame move to another and if the position is this one don't move.

Well, I thought it was easy but... I'm trying with that but it doesn't work.

if (_root.mc._currentframe = 20) {
tellTarget ("_root.mc") {
play();
}
} else {
tellTarget ("_root.mc") {
stop();
}
}

Anybody can help me. please. thank you

_currentFrame( Frame_label ) ?
I understand the use of the _currentFrame property

e.g.
if (movieClip._currentFrame == 10) {
...
...
}

...but is there any way you can use this property when refering to a frame's label i.e. so I can resize the relevant movieClip, without altering my code?????


Thanks in advance,
Chopsticks

Use Of _currentframe Object
I am attempting to use a button that lives in a MC, but controls the main (_root) timeline. I am using the following script:

on (press) {
_root.gotoAndStop(_currentframe+5);


It works, but intstead of advancing 5 frames..it advances to the last frame. It was okay when I only had keyframes at 1 and 6 (it would go from 1 to 6). But when I added a keyframe at 11, it would jump from 1 to 11...bypassing 6.

Additionally, when using the code to go back keyframes:

on (press) {
_root.gotoAndStop(_currentframe-5);

it does nothing at all!


Any suggestions or answers as to why this is happening and what I can do to fix it would be VERY much appreciated.

_currentframe And _totalframe?
Hi!

I've put the fla and swf for my 'problem' here:

http://www.simplethoughts.com/happyllama/mover.swf
http://www.simplethoughts.com/happyllama/mover.fla

I'm trying to solve a problem. I have two movie clips and a button on the stage, plus a controller clip living off the stage. The first movie clip ("mc1") is 20 frames long, the second ("mc2") is 65 frames long. Both have stop(); actions on the first frame to keep them from playing. When you press the button, "mc1" goes to frame 2 and plays.

What I'm trying to do though is this:

Once "MC1" begins playing I'm trying to get the controller clip to determine when MC1's currentframe is equal to it's totalframes (_currentframe and _totalframe) and then tell MC2 to play. In other words I don't want MC2 to start playing until MC1 has finished playing.

I can't figure it out! Is it possible? Can anyone offer any advice??

Thanks very much for any help!

_currentframe In Secs
Hello,

I modified a simple frame counter to display the frame count not in frames but in secs. Based on 24 frames a sec.

/:FrameCount24 = z;
z = _root._currentframe;
z = z/24;


That works fine. I can see the secs displayed counting up as the playhead moves along. The thing I don't like is that the counter displays the seconds like this:

3.8333333333333

I would only like to be seeing this:

3.8 or 3.833

Suggestions?

Thanks in Advance,
Mike

New Scene, _currentframe
We have a button that we want to use to jump to the current frame number in a different scene. Tried using the different scenename w/ expression (_currentframe), tried setting var and using that var in expression, tried label + current frame.

Any suggestion would be appreciated...

_currentframe....Aaargh
I have spent 12 hours trying to do the following;
toggle the visibility of an instance by a function of the playhead position of another MC (Flash 5)

the code I am currently trying to use is:

if (mc1._currentframe>=7) {
mc2._visible = 0;
} else {
mc2._visible = 1;
}

(all instances are on the same level)

Can _currentframe even be used in an if/else loop?

Thanks.

_currentframe= A RANGE Of #'s
Here's what i've got in my code

on (press) {
if (_root.sight._currentframe=1 or 2 or 3 or 4 or 5 or 6) { <----This is the problem
_root.sight.nextFrame();
} else {
play();
}
}

I want it to recognize a RANGE of frames.

Also I noticed that even when using currentframe=1 it did not work. do i need to use Frame Labels? what is wrong?

Using The If Statement...and _currentframe
I want a button that makes my MAIN movie go to a certain frame if the current frame is x(in the main movie), but if the current frame is y I want it to go somewhere else.
Here is my current code...
on (release) {
if (_root._currentframe == 57) {
gotoandstop(85);
}
else {
gotoandstop(63);
}
}

What needs to be fixed?
Thanks,
Josh

_currentframe From Within Movie. HELP
Ive been trying to figure an easy way to do this, but i cant do it.
I in a movie item named "control panel". I want to determine what the current frame of the MAIN movie is. I tried _root.currentframe, but that doesnt work. How do i do this?
Thanx
irf2k

How To Use _currentframe After AttachMovie?
From _level9 timeline I have attached a movieclip into _level100.
How can I make this mc follow the timeline of _level9 with _currenframe?
I am able to do it with onClipEvent if the mc is on the _level9 timeline but how to do it after attachMovie command because I can't use onClipEvent.

_currentframe As Variable
I'm trying to do a fairly simple slide show in which I have a movie clip with an image on each frame (1-12) nested in my main movie. I want to control the images from _root. I have not problem getting numbered buttons to jump to individual images and getting the "prev" and "next" buttons to go to previous or next. However, I would like the next button to loop back to image1 if I reach the end of the clip, and vice versa using "prev". I tried to do it by using _currentframe as a variable, but it doesn't work. Here is the code for "previous" that I tried in frame 1, on the "actions" level (WTCImages_wc is the nested clip with the image series in it--there are twelve frames in this clip; imgPrev_btn is the "previous" button):


_global.imageCount = _root.WTCImages_wc._currentframe;
imgPrev_btn.onRelease = function() {
if (imageCount == 1)
{WTCImages_mc.gotoAndStop(12);
}
else {WTCImages_mc.prevFrame();
}
}


I've also tried _root.WTCImages_wc._currentframe in the if statement, without trying to set it as a variable first. I've also tried setting the variable as a local variable within the if statement.

Any advice?

If _currentframe - Help Needed
Im doing a little drag and drop quiz

ive got all the individual ticks working when the correct objects are dropped on to the correct targets, I'm now left with a problem.

Id like a final big tick when all objects are in the correct place

Ive got 4 movie clips (tick1, tick2, tick3 & result) I need an action script to do the following.

If tick1, tick2, tick3 are all on frame 2 (in there own timelines) i need the movieclip "result" to move to frame2

Any help would be greatly appreciated.

Thanks

Ian

The _currentframe Action...
Hiya. New to the forums. Whatever.

When you look at the help section in Flash for _currentframe, all it shows you that you can add or subract to whatever frame number you want. Such as-

if (Key.getCode () == 96) {
this._currentframe += 5;
}

That would just say to skip 5 frames ahead. But... couldn't you use that action just to SEE what frame it's on? Like-

if (_currentframe = 16) {
this.jump = false;
}

It seems like it doesn't work. Any ideas?

_currentFrame Conundrum
Hello

I am trying to get the curser to jump forward by a ever decreasing amount reletive to its position when the button is relesed. i've been trying to use the script below, but to no avail;

on (rollOver) {
gotoAndPlay(_currentFrame + 1);
}
on (rollOut) {
gotoAndPlay(_currentFrame + (80 - _currentFrame));
}

Basicly, what i'm trying to do is get a button to change colour according to how long it's pressed, then change back to another colour over a period of time when relesed.

Please help!!!

Thankyou

_currentframe Problem
i need help on how to make it so that when u have the MC on another frame, how to make the root goto the next frame. heres what i have on the frame


if (targ1._currentFrame==2) {
_root.gotoAndStop(2);
}

targ1 is the MC instance

Problems With _currentframe
I am working on a presentation and I am using a variable equal to _currentframe to let the audiance know what silde I am one out of the total amount.

I am using a button which calls nextFrame(); to advance to the next frame.

My problem arises when I call prevFrame(); to go backwards. Instead of decreasing the frame number by 1, my variable stays the same till I move 2 frames away and then it starts to decrease them normally. Then when I call nextFrame();, it does the same thing. my variable stays the same for one frame and then continues to advance. Anyone have an idea?

_currentframe (pleez)
Hi all. I've posted a message last week about this and i'm still trying to solve this situation. I dunno, my logic says it should work, but it doesn't as i want!
It's pretty simple, there's a movie with 3 squares of 3 colors and 3 buttons outside the movie, 1 for each color. in the MC (named "rgb") there are 6 different motion tweens to represent the transition between the colors. I want the MC to show the color you choose with an horizontal move to the chosen color.
Here's a link to my post with an attached file.
http://flashkit.com/board/showthread...hreadid=549053
Thanks in advance!

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