ActionScript 2.0 :: Putting A GoToAndStop On The _down Frame In The Actual MC?
Nov 21, 2002
I have managed to script the swap depth AS into my movie, however, I have come across this problem.
I have three MCs on the stage acting as buttons. On rollover, the expand and slightly cover this other MCs. This is fine as long as that particular MC is on top.
So, here's what I did:
_root.button1.onRollOver = function() {
this.swapDepther(button2,button);
};
this works fine except it only does it once. I need to do it everytime they roll over.
I tried putting a goToAndStop on the _down frame in the actual MC, but it didn't make a difference.
View 1 Replies
Similar Posts:
Feb 8, 2007
I have a movie clip on the stage and have given it the instance name "team1". inside this movie clip there are two states. at frame1 it says one thing, then at frame 10 has an image. team1 stops at frame 1 and what i want to do is when the main time line reaches say frame 50, i want the team1 movie clip to gotoAndStop at frame 10, thus showing the image and not the text. i tried doing it by putting this on the main timeline at frame 50: team1.gotoAndStop("team");
View 2 Replies
Dec 12, 2010
I've heard a few things that people recommend not doing unless you absolutely need to. I'm new to actionscripting. I come from a PHP/Javascript background. I was wondering what kind of things are good and bad.I heard using scenes wasn't a good idea. As well I heard that putting actions on frames outside of the first frame isn't such a good idea unless you absolutely need to.I'm curious what good practice is for working with amfphp. Should I make an AMFPHP class in flash? Do I avoid putting functions into the frame actions
View 1 Replies
Jun 30, 2009
I've made it generate enemies and give the player a way to destroy them, i want it so when all the enemies are dead it should move onto level 2, a new frame, or maybe you guys know a better way of putting multiple levels in one frame? so far i have got.[code]
View 4 Replies
Jan 3, 2010
I want to make the player execute the code in the same frame. If I do a gotoAndStop to the same frame number, nothing happens because AS3 assumes since that you're already there, so nothing happens.
View 3 Replies
May 8, 2011
I have a situation where I am modifying a working FLA file to work in just one Scene of a project I am working on.The FLA file is linked to two external .as files.
I would like to take that code and call it from Fram 1 of the Scene as it will only but used for that scene and I do not want it affecting the other scenes.
I removed the package wrapper and changed any private function/public function just to function etc.part of the issue is calling on Movieclips in the library.I am trying to use drag and drop to drag Movieclips to Target transparent Movieclips.
The .as files uses:
import THE;
In a function I use:
the = new THE(); addChild(the); the._targetPiece = tTHE_mc; the.addEventListener(MouseEvent.MOUSE_UP, checkTarget); the.x = 103.50; the.y = 72.60;
I get an error for the "import THE;" as error 1046: Type was not found orwas not a compile-time constant: THE I get the error for the function reference as: error 1180 call to a possibly undefined method THE
View 11 Replies
Dec 7, 2010
Basically I am making a flash website and it is due in next week and I can get a gallery working by putting the actionscript onto a frame inside the flash file however I was just informed that I must make a seperate action script file instead of putting it on the frame.[code]...
View 1 Replies
Mar 6, 2009
I have an AS2 flash movie that has some labeled frames. On the first frame of a particular scene, I have some code that creates a menu of buttons that I construct from movie clips and vector graphics. The onRelease function of those buttons is assigned deep in some code thusly:
code: buttonMC.onRelease = function() {
trace('release, going to ' + this.sceneName);
gotoAndStop(this.sceneName);
};
When one of these buttons is clicked, the scene name reports correctly, but the movie goes to a frame 3 frames later than the targeted frame. I know this because I put trace actions on the subsequent frames like this: code: trace('2 after');
View 1 Replies
May 7, 2010
I've got some code and I'm using gotoAndStop but am in need of something to play to the frame instead of just jumping.
Code:
var beginX:Number;
stage.addEventListener(MouseEvent.MOUSE_DOWN, handleMouseDown);
stage.addEventListener(MouseEvent.MOUSE_UP, handleMouseUp);
[code]...
View 3 Replies
Jun 2, 2010
I'm making a slideshow which pauses on each slide for 10 seconds, and there are also navigation buttons to go to each slide independently. I have this code (which I got off the interwebs) in a separate actions layer to pause the slideshow, independent of any button actions. This, for example, is an action on frame 2[code]...
View 2 Replies
Nov 16, 2009
I am having a problem with the gotoAndStop function in my CS3 flash application. I have 3 frame on my timeline (keyframes). I click on a button of the first frame and pass to the frame 2 by having a listener on the button doing : gotoAndStop(2,"Scene 1"). Frame 1 and Frame 2 contains both a different Datagrid (as a MovieClip)
I have a problem appearing here. The datagrid from frame1 is still displayed under (kind of background) the datagrid from frame2. They are kind of superposed. The datagrid is the only element from frame 1 having this behavior. The buttons and text area are not displayed, following the normal behavior. Here is the part of my code doing that :
[Code]...
View 0 Replies
Jul 13, 2010
I have a website and it functions fine but I want to make a few alternate versions, exactly the same only they start on a different frame. I tried adding a gotoAndStop(9); into the actionscript on the first frame drag all clips when i drag single movie clip(which only contains event listeners and functions) but for some reason part of it goes to frame 5 and part of it does nothing. Only when I click the button that links back to frame 1 does frame 9 load.
View 1 Replies
Nov 20, 2011
I'm making a banner for a "client" and he wants me to make it like yahoo's news banner. I understand that they're using HTML5 and I haven't learned that yet. Anyways, I did a great job learning the banner in less than a month.
(I'll try to make this short) The banner has a 5sec pause and then it proceeds to the next frame. It also has 6 buttons that will direct the user to a specific banner that he/she wants to click. He wants the banner to stop and stay on a specific frame and not proceed further. I have achieved that, but here's the problem.
[Code]...
View 0 Replies
Feb 2, 2009
I'm having an issue with some pictures and a gotoAndStop on frame one command. I have pictures on my website that appear when clicked on, and I've placed a simple close button in the top left corner of the picture that simply tells flash to go back to frame 1 (gotoAndStop(1)). However, it seems that in Internet Explorer (not in FF) when the close button is clicked it goes back to frame one but it leaves part of picture still displayed although it seems to dissapear in segments when rolled over with the mouse. Here is the website where this is occurring: [URL]. Btw, I'm using the flash eff component, but the problem seemed to still occur after i removed all flash eff instances.
View 2 Replies
Jan 16, 2010
Is there a way to move to next (not specified) label frame without indicating a specific name?I have a portfolio movie clip with images, using the AS3 Tween Class.I have a "next" button that hopefully will trigger the tween to NEXT label.
here is my code:
var myLabels:Array = ["print", "printA", "printB", "printC", "printD", "printE", "printF"];
next_btn.addEventListener(MouseEvent.CLICK, clickNextSection);
[code].....
View 3 Replies
Aug 16, 2009
i need to gotoAndPlay then gotoFrame and stop at frameEXAMPLE: gotoAndplay from frame 2 then when it reaches frame 10, i want it to go to the Parent frame with a gotoAnd stop at frame ("willy")so far i have put this script on frame 10 but when it gets to frame 10 it just stops, it does not jump to the parent frame "willy"PLAYS TO FRAME 10 then: gotoAndstop this._parent._parent. ("willy)
View 4 Replies
Jan 31, 2010
i can not seem to get a button working with simple gotoAndStop frame . its setup like _root > EMC_photos > photos_thumbs_ani now in photos_thumbs_ani i have several photo pages all setup every 100 frames with labels page 1, page 2 etc my button is within photos_thumb_ani as a movieclip with code inside this.onRelease = function(){ _root.EMC_photos.photos_thumb_ani.gotoAndStop("pag e2");} I have tried different variations to no sucess
View 2 Replies
Mar 1, 2011
I'm making an app in flash as3, but there is a bug in my code. (i guess)
-I can go from frame 1 --> frame 2
-I can go from frame 2 --> frame 3
If i try to go from, let's say frame 3 --> 2, I get this message:TypeError: Error #1009: Cannot access a property or method of a null object reference.Why cant I go to a previous frame on my timeline?
View 9 Replies
Aug 29, 2011
I have been following Doug WInnie's tutorials on flash, and am up to ep17: http:[url]....He briefly mentions these functions at the end, but doesn't go into any detail: Add event listener and callback function for roll over of the
ballmyBall.addEventListener(MouseEvent.MOUSE_OVER, ballOver);function ballOver(e:MouseEvent)myBall.gotoAndStop('glow');}[code]...
When I tried doing this, I labelled one frame within the myBall movie clip 'normal' and the next one 'glow' and I added a filter glow to the ball on the glow frame.When I play it back, and mouse over the ball it flickers really quickly between glowing and not glowing, and when I mouse out it returns to normal and stops, but I thought it should stop on the glow frame as well.
View 11 Replies
Jan 16, 2009
I made a movie clip or movements and what not and put it on scene1 frame 1. And when the movie clip end I want it to go to scene1 frame2. I tried a few things I have:
_root.gotoAndPlay(2);
Right now it says
1120: Access of undefined property _root.
View 6 Replies
Sep 11, 2011
when i was tryng to get my bal to score a goal. So i as soon as mc_bal.x >= mc_goal.x i would want to go to the next frame on my stage wich woud say goal. But for some reason am not able to find the problem why it wont go to the next frame.
[Code]...
View 4 Replies
Feb 11, 2011
i have a button instance, within a movie clip within a scene. i can not get the gotoAndStop on a frame label within the scene to work. I CAN however get the gotoAndPlay code to work (which defeats the purpose).
[Code]...
View 7 Replies
Mar 17, 2011
I am trying to make sprite sheets for rotation of DisplayObjects, and it seems that the gotoAndStop() calls are not working.Here's an example of what's going on:
function createRotationalSpriteSheet ( displayObject : DisplayObject )
{
findMaxTileDimensions( displayObject );
[code].....
View 3 Replies
Mar 2, 2012
The below function does not work probably due to the path being typed incorrectly. How can i fix it?
ActionScript Code:
function ChangeTheme(Thistheme)
{
for (i = 1; i <= 218; i++)
{
with (this["sector" + i])
[Code]...
Also worth mentioning: On each of those frames, i have defined a local variable to label the sector. the label's name will be the same as the movie clip that is visible on that frame, as described below:
Actions for Frame1 of WallNorth: fLabel = CementRoad_mc
actions for frame2 of WallNorth: fLabel = DirtRoad_mc
P.S. "Thistheme" is just a way of advancing the frame of "Cementroad" (to display the cement road as wet or dry or muddy or w/e)
View 3 Replies
Apr 16, 2009
Well, basically what I want to do is, if the mouse is on the left side of the movie clip.. the movie clip will then play ( "A" animation inside the movie clip) vice cersa, if the mouse cursor is on the right side of the movie clip, the movie clip will then play ("B" animation inside the movie clip)
To put it simply, I would like to make a character in a game which faces the mouse cursor and chasing (with a runnning animation) after the mouse cursor but not rotating. I've got the movie clip slides along with the mouse working well, now I just need the mc to face the mouse cursor.
View 3 Replies
Apr 10, 2010
I have this script in Scene 4:
stop();
import flash.events.MouseEvent;
contact_bttn.addEventListener(MouseEvent.CLICK, bClick);
function bClick(event:MouseEvent):void{
gotoAndStop("getInfo");
}
I have a frame labeled getInfo in Scene 4. When I test scene it works fine. When I test movie I get this:
ArgumentError: Error #2109: Frame label getInfo not found in scene Scene 4.
at flash.display::MovieClip/gotoAndStop()
at ig_index_3_fla::MainTimeline/bClick()
View 1 Replies
Apr 3, 2011
I have tested with frame number it works, it doesn't with label name. Is it possible ? In main.as:
public function gotoTab1(target:MouseEvent) {
gotoAndStop(1);
}[code]....
of course I give tab2 as label name to the frame at position 5.no error shows up.
View 1 Replies
Feb 17, 2008
I understand how to create simple buttons as reuseable classes, but how could you create a next button that does something similar to the AS2 "goto and stop nextframe", and a back button that does something similar to the AS2 "go to and stop previous frame".On each frame that the user navigates to, is a movie clip, within that movie clip is then another button with a go to and play "Frame Label" action required, that navigates within the movieclip to a specific frame.
View 6 Replies
Oct 6, 2009
I want to make the timeline go to the next frame (ie gotoAndStop) only if two button instances are invisible. For the buttons I have scripted an on(release) to make them invisible, but I don't know how to use the if function to make my animation progress when they are both invisible.
View 7 Replies
Jan 29, 2011
I am trying to create my first semi-serious flash game. The problem I am having is I want to be able to click a button in the players inventory to equip a different armor to the player, and have that armor work in the game on the same movieclip(Player) without having to re-make all the attacks and moves etc. for each change on another movieclip. My ideas are extremely novice like putting each armor and update on a different frame inside the Player movieclip and then doing a gotoAndStop to the frame. Though that may work I don't know how to goto a frame inside a movieclip. I would like to control this using as much code as possible.I would paste my code but I don't have any code for this part of the game so far. I have tried some simple coding but so far I cannot get the pieces together.
View 1 Replies