Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > ActionScript Forums Group > Simple Stuff (Newbies)

Reply
 
Thread Tools Rate Thread Display Modes
Old 05-14-2001, 05:13 PM   #1
franmartin
Registered User
 
Join Date: Feb 2001
Posts: 16
Default


Hi again.
I was looking for a explanation solution on the forums but none fits my single "problem". I have a button inside a MC placed in the Mainmovie (_root). This button is to move to the next frame on the _root I was trying it whit those scripts:

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


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

and others similars. Doesn´t work.

on (press) {_root.nextFrame();}

it works but I want to know the properly scripts which could work with the (_currentframe + 1) expression.

Now I was checking scripts ( to be sure before to post ) and ouh... how a miracle...
on (press) { _root.gotoAndPlay (_root._currentframe + 1); }
works fine. Anyway... why first expresion does not work. _root is targeted but it looks like to play the MC again (_currentframe is the last frame of MC and (+ 1) looks like to go to the first frame).why?? I spent last two hours with that problem and I need some explanation.

thanks in advance.





franmartin is offline   Reply With Quote
Old 05-15-2001, 09:35 AM   #2
Jesse
ActionScript.org Founder
 
Jesse's Avatar
 
Join Date: Nov 2000
Location: New York
Posts: 8,736
Default

You have to remember the relativity of timelines. You are doing the right thing by using _root.gotoAndPlay but by the same logic you must use _root._currentframe, otherwise you are taking the current frame of the daughter MC:

on (release) {
_root.gotoAndPlay (_root._currentframe - 1)
}

Cheers

Jesse

keywords: current frame goto time line movie clip
__________________
Cheers

Jesse Stratford
ActionScript.org Cofounder

Please don't email or PM me Flash questions, that's what the Forums are for!

Please don't rely on me reading my PMs either. Email me about important stuff.
Jesse is offline   Reply With Quote
Old 02-11-2009, 01:24 PM   #3
jesseharsh
Registered User
 
Join Date: Jun 2008
Location: Northern Virginia
Posts: 3
Thumbs up thanks!

very simple and clear...
jesseharsh is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
set the params for webservice call - Syntax help needed ! GDP_Sabrina ActionScript 2.0 1 11-16-2004 05:10 PM
Saving data and retrieving Dani Server-Side Scripting 12 10-27-2004 10:24 AM
rpg levels (and not the ones w/ experience..) speedlemon ActionScript 1.0 (and below) 1 10-25-2004 08:51 PM
Button over state with movie clip danny Simple Stuff (Newbies) 8 08-21-2003 06:10 PM
Passing variables - PHP and Actionsript - Dial-up adeangel Server-Side Scripting 7 12-12-2001 11:08 AM


All times are GMT. The time now is 12:36 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.