ActionScript 2.0 :: Using A For Loop To GotoAndStop At A Specific Frame Of A MC That Is Nested Within MCs?

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


Similar Posts:


6 Buttons, 6 Lights - Using The Gotoandstop Comand To Go To A Specific Frame Based On The Button Press

Feb 9, 2010

I am trying to make a light comparison chart where the lights can be turned on inividually by the user and one can be compared to another depending on which of the 6 lights you want to view.So far i have managed to make this work with 5 lights over 33 layers and diffferent buttons and different handlers for each of the buttons on each layer but as soon as the 4 and 5 light come into play everything slows down struggles and sometimes gives up.Is there a simple way of doing this which i am unaware of.I am currently using the gotoandstop comand to go to a specific frame based on the button press.

View 8 Replies

ActionScript 2.0 :: Send Html Command To Embedded Swf To GotoAndStop Specific Frame Label?

Jul 14, 2009

I have a .swf menu with 20 or so links. Each link opens up a new html page that in turn embeds the same swf menu. All I want is to simply have the html tell the swf to gotoAndStop a specific frame label that really just 'highlights' that particular button, so the user knows where they are. that's it... used to be able to do this with fsCommand, or so i thought.

View 9 Replies

ActionScript 2.0 :: CS3 Linking To Specific Frame On A Nested Movie?

May 18, 2011

Trying to create a link from an html page to the contact section of a flash website. I understand how to link to a specific frame by creating an anchor over the target frame, but it only works if its in a single movie. The problem is that the section I want to target is on a deeply nested movie which the main movie loads such as

Code:
loadMovieNum("images/topback.swf", 8);

Instead of the html code looking like this "index.html#contact" for a single movie what would a nested link code look like?

View 1 Replies

ActionScript 2.0 :: GotoAndStop - Team1 Movie Clip To GotoAndStop At Frame 10 On The Stage

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

ActionScript 3.0 :: "gotoAndStop" On A Frame In A Nested Timeline From The Main Timeline?

Aug 9, 2010

I am trying to "gotoAndStop" on a frame in a nested timeline from the main timeline, but can't seem to figure out the correct way to write it with it's 'parents' etc... this is how I have tried which makes sense to me (have tried other ways too) but no success.
 
gotoAndStop(parent."framename");

View 3 Replies

ActionScript 3.0 :: Loop #  Of Times, Stop At Specific Frame?

Nov 15, 2008

i'm having trouble finding the answer to a simple (I hope) question. I made a flash banner and have successfully added an action that will loop it 3 times, stopping on the last frame. Here is the code I entered in a separate action layer:

INSERTED A KEYFRAME IN FRAME 1:
if (numberOfTimesToLoop<3) {
gotoAndPlay(1);
numberOfTimesToLoop++;

[Code]...

View 5 Replies

ActionScript 3.0 :: Loop 2 Times And Stop On Specific Frame?

Dec 14, 2011

I have a banner with 4 MCs in it. Right now it starts automatically and loops endlessly. I would like the animation to play through 2 times, jump to frame 60 of the first MC and stop.

View 9 Replies

ActionScript 1/2 :: Nested Frames And GotoAndStop?

Dec 2, 2011

I have a very specific AS2 parent/child movie clip issue, I have a main Character movie clip which contains as nested frames each profile of the Character (front,back,left,etc). Within each of these child profile MC frames, animations for those profiles are further nested in frames.

[Code]...

The problem is that when I try to Character.gotoAndStop('Front'); after key release, flash thinks, you're already on the Front frame (because the walk animation is a child of that MC and is already playing).Therefore the walk animation just keeps playing after the key has been released.Is there an easy, one-off way to fix this?

View 8 Replies

ActionScript 3.0 :: Nested MovieClips And GotoAndStop Function?

Feb 26, 2010

I have a movieclip "squareA" -- inside of squareA, on frame 2 is a movieclip called "squareB". I tried the following code:
Actionscript Code:
squareA.x = 10squareA.y = 10squareA.gotoAndStop(2)squareA.squareB.x = 10squareA.squareB.y = 10

But I get the following error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at problem_fla::MainTimeline/problem_fla::frame1()
If I put SquareB in frame 1 of SquareA -- it works.

View 3 Replies

ActionScript 2.0 :: Parent / Child MovieClip - Nested Frames And GotoAndStop

Dec 2, 2011

I have a very specific AS2 parent/child movie clip issue. I have a main Character movie clip which contains as nested frames each profile of the Character (front,back,left,etc). Within each of these child profile MC frames, animations for those profiles are further nested in frames. Then, essentially I have movement code as part of the key listener:

Code:
switch(Key.getCode()){
case 87:
Character._y -= 10;
Character.gotoAndStop('Back');
Character.gotoAndStop('walk');
break;
[Code] .....

And later code to reset to the character's resting frame after key release:
Code:
switch(Character._currentFrame){
case 5:
Character.gotoAndStop('Back');
break;
[Code] .....

The problem is that when I try to Character.gotoAndStop('Front'); after key release, flash thinks, you're already on the Front frame (because the walk animation is a child of that MC and is already playing). Therefore the walk animation just keeps playing after the key has been released.

View 1 Replies

ActionScript 3.0 :: Loop A Specific Bit Of My Movie Until A Specific Link Is Clicked?

Mar 29, 2010

how I can loop a specific bit of my movie until a specific link is clicked?

View 5 Replies

ActionScript 2.0 :: XML Nested Loop - Access The Loop Later?

Feb 19, 2007

Basically, I have data organized by date in an XML file. I'm trying to make a website application that will allow the user to click on a date (in a text field) to see another textfield populate with all the data under that particular date. So far, all the information loads into the textboxes at the same time. How can I get it to only load information under a particular date when somebody clicks on that date?

Before I started this project, I was convinced I could do this by manipulating the [j] (see code below) in the myFunc2 function. Currently, it's set up to increment blank_mc._y by whatever value is returned by [j]. But for some reason this doesn't work. I feel that if I could atleas get this part to work - I could probably do the rest.

AS code:

Code:
function loadXML(loaded) {
if (loaded) {
var nodes = this.firstChild;

[code]....

View 1 Replies

ActionScript 2.0 :: Change The Colour Of A Graphic In A Specific Movie In A Specific Frame

Mar 31, 2006

i need to change the colour of a graphic in a specific movie in a specific frame. if i have a movie clip instance-named "sidetext" thats 15 frames long, and i want a graphic in the movie, called "letterp" to change to one of four colours that i want it to randomly at frame 10 and stay that colour uintil frame 15, how can i do this?

View 2 Replies

Flash 10 :: Export Specific Frames Not All Frame - Specific Timeline

Sep 15, 2010

how do i export specific frames not all frame. ex: if flash has 1 to 200 frames. here i want to export 51 to 150 frames as a movie. if there is any command or plugin to export movie like this.

View 0 Replies

Target A Specific Frame In Specific Movie Clip?

Dec 3, 2009

I have been doing really well figuring everything out up until now.[code]How it stands, what is this link pointing to? Can I make it target a specific frame in a specific movie clip?And if someone would be so kind and explain what this is saying in 3rd grader terms.

View 3 Replies

ActionScript 3.0 :: Load Specific SWF At Specific Frame By Default?

Sep 21, 2009

Basically once my animation loads I want to pull in an external SWF at a specific frame, basically like the "home page" swf that will display first. Underneath that I will have "About Us, Contact, etc..." and those will each load an external SWF into my movie clip. My movieclip right now is called mcHolder. Here is the code I am currently using for the buttons:

Code:
//About Us Button
function test2(evt:Event):void{

[code].....

View 1 Replies

ActionScript 3.0 :: GotoAndStop To Same Frame?

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

ActionScript 2.0 :: GotoAndStop Going To Wrong Frame

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

ActionScript 3.0 :: Play To Frame Instead Of GotoAndStop?

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

ActionScript 1/2 :: GotoAndStop Goes To Frame But Can't Stop

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

ActionScript 3.0 :: Superposition Of Frame With GotoAndStop()

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

ActionScript 3.0 :: Adding A GotoAndStop(9) On The First Frame ?

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

ActionScript 3.0 :: GotoAndStop And Stay On That Frame?

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

IDE :: GotoAndStop On Frame One Command For Pictures

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

ActionScript 3.0 :: GotoAndStop NEXT Label Frame?

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

ActionScript 1/2 :: Specific Frame On A Specific Movieclip?

Sep 1, 2010

I'm trying to get the following movieclip smallbutton to link to frame 5 on movieclip cont.The way the timeline is built is as so:content_mc > cont > (more mcs) > smallbuttonThis seems to be an issue from every answer I've tried so far since the movieclip "cont" is not being called in the main timeline; first there's content_mc and then comes cont.How would I go about getting the movieclip "smallbutton" to link to the 5th frame of movieclip "cont"?This is for AS 2.0So far I'm at:on (release) {  _root.gotoAndPlay("cont");  _root.smallbutton.gotoAndPlay(5);

View 7 Replies

ActionScript 3.0 :: Frame Of Nested Object - Remove Only The Event Listeners From Objects Only On Frame 1?

Jan 21, 2011

I have 3 frames each with a movie clip called map_mc. Each different map_mc have different objects that call the CollisionDetect class. Heres whats happening. objects from frame 1 will start freaking out when I goto frame 2. How do I remove only the event listeners from objects only on frame 1?

I have been trying this.currentFrame but the problem is that all the objects are inside map_mc on the first frame so no matter what it will always be 1. On the other hand MovieClip(root).currentFrame will always give me the current frame but wont tell me what the objects frame is relative to the stage.What I want to do is have something to this effect:MovieClip(root).this.currentFrame would output that this object is on frame 1 and MovieClip(root).currentFrame will tell me that the stage is on frame 2 so I can remove the listeners accordingly.

View 3 Replies

ActionScript 3.0 :: Convert Frame By Frame To Tween/Nested Animation?

Nov 19, 2010

I have an problem whereby I have created a Frame by Frame dancing human figure and now I want to move it across the screen as well as scale it using a Tween.

I have spent quite some time slightly adjusting the upper arms, forearms, hands, legs etc and creating a new keyframe for each movement. All the movements are all in one layer... ie the forearm doesn't have it's own layer etc. I am running the animation at 24fps so there is quite bit going on.

I now realise that I should have created a symbol/movie clip from the first image I created and then scaled and moved the image first before animating it's limbs but I only realized that after hours of work and I would hate to start all over again.

So basically what I have is a dancing human figure in the one spot moving it's arms and legs and I want it to move across the screen and become larger by scaling it using a Tween. I could of course re-edit each keyframe by slightly scaling and the slightly moving the figure but that will take quite some time to get right as there will be a fair bit of trial and error doing it that way.

View 3 Replies

ActionScript 2.0 :: Play To A Certain Frame, Stop Then Gotoandstop?

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







Copyrights 2005-15 www.BigResource.com, All rights reserved