ActionScript 2.0 :: Targeting From Movie Clip

Oct 7, 2003

I have a movie clip in my main movie. The movie clip has buttons on it that tell where the play head should go in the main movie. I'm using this script;

[AS]
_parent.gotoandStop(28);
[/AS]

The play head goes to the right frame but it keeps playing even though I've specified it to "gotoAndStop" at frame 28. I've tried using labels and addressing it that way but same thing happens.

View 2 Replies


Similar Posts:


ActionScript 1/2 :: Targeting A Movie Clip Inside Another Movie Clip?

May 9, 2010

im currently trying to target frame 2 and a movieclip on that frame  This works. But now im trying to target a movieclip inside a movie clip.This code works when trying to target one movieclip.cal.onPress = function() {gotoAndPlay(2);message.total = unit1;}how can i edit that code to find another movieclip inside the movieclip message?

View 6 Replies

ActionScript 1/2 :: Targeting Movie Clip Button Within A Movie Clip?

Feb 26, 2011

I am trying to target a movie clip within a movie clip.
  
I have a movie clip on the main stage with an instance name of a
  
I have the following action script on it
 
on (release) {_root.a.gotoAndStop(2);
}

So on frame 2 of a I have a button (instance name b) which also has two frames and a stop action on frame 1. All I want to do is click on the button and make it go to frame 2. It should work but it isn't Here is the actionscript on the button (b) on (press) {_root.a.b.gotoAndPlay(2); }

View 2 Replies

ActionScript 1/2 :: Targeting A Movie Clip Inside A Movie Clip Inside Another Movie Clip With A Twist?

May 9, 2010

Im able to link to a movieclip inside a movieclipUnfortunately one of the movieclips now are a scrollbar and scroll. Now the actionscript isnt working?cal.onPress = function() {gotoAndPlay(2);message1.contentMain.message.total = unit1;

View 17 Replies

ActionScript 2.0 :: Targeting From Movie Clip?

Oct 7, 2003

I have a movie clip in my main movie. The movie clip has buttons on it that tell where the play head should go in the main movie. I'm using this script;

[AS]
_parent.gotoandStop(28);
[/AS]

The play head goes to the right frame but it keeps playing even though I've specified it to "gotoAndStop" at frame 28. I've tried using labels and addressing it that way but same thing happens.

View 2 Replies

ActionScript 3.0 :: Targeting Another Movie Clip To Animate?

Dec 16, 2009

how to target to the another movie clip to animate?I was using code as below but the output is not really correct.It seemed something is duplicating (I just suppected)

PHP Code:
import flash.display.MovieClip;
var mc_Ripple:MovieClip = new Ripple_Text() ;

[code].....

View 7 Replies

ActionScript 3.0 :: Targeting A Parent Movie Clip?

Mar 18, 2010

this is weird, ive tried all my resources and cant come up with the solution.

heres the heirarchy

Main Stage

sampleStage_mc (this contains all my samples)

sampleStageNavigation_mc (this is the movieclip that houses my buttons)

............................................

what i want to happen is when you click on one of the button_mc, i want it to target a frame label on the "sampeStage_mc" timeline.

heres my code:

Actionscript Code:
toshibaBtn_mc.addEventListener(MouseEvent.CLICK, toshibaSample);function toshibaSample(evtObj:MouseEvent) {    parent.gotoAndPlay("toshiba");}


theres four timelines, here is the outline

button_mc (i click this and it runs the code in sampleStageNavigation timeline)
sampleStageNavigation_mc (timeline that holds the ActionScript and the button_mc)
sampleStage_mc (timeline - this is the one I need to access)
main stage (timeline)

View 10 Replies

ActionScript 2.0 :: Targeting Movie Clip Animation?

Jul 28, 2005

I have three small images on the stage in frame 1. I also have an invisible button symbol over one of the images and have given this button an instance name. On frame 2 there are the same three images but with a lower opacity level and also on this frame 2 is a movie clip instance containing an animation. I need an onRollover event connected to the button on frame 1 so that when the user rolls over it, the playhead jumps to frame two and shows the images and also plays the animation in the movie clip.

I've applied the following code to the button symbol on frame 1:

stop();
specialised_btn.onRollOver = function() {
gotoAndPlay(2);
}

and I've also put a stop action on the last frame of the animation within the movie clip in frame 1 so that it won't loop.

The problem is that when I test the movie, when you roll over the image on frame 1 it just continually loops between frames 1 and 2 - it doesn't play the animation on frame 2 as I thought it would.

View 3 Replies

ActionScript 2.0 :: Targeting A Child Movie Clip?

Oct 20, 2004

I have a movie clip on the main timeline calledbg_graphics, I want to target a movie clip within that movieclip called bg1_mc. to gotoAndPlay frame 2.The bg_graphics clip goes to a random frame within that movieclip, there are 3 frames. 1st has bg1_mc, 2nd has bg2_mc, and 3rd has bg3_mc. How could i determine which file to gotoAndPlay frame 2 in bg_graphics when i don't know exactly which frame its going to be on, let alone target a movie clip within a movie clip.I used this code to generate the random frame

function randomBg() {
//generate random BG based on random frames within the MC
randFrame = random(3)+1;[code].....

View 7 Replies

ActionScript 3.0 :: Targeting A Button Inside A Movie Clip?

Feb 10, 2010

Trying to target a button inside a mc in order to trigger a swf.the mc is called "nav_btns"the button is called "contact_btn" The swf has the same name as the listener in order to repeat the function with multiple swfs. my problem is, i'm getting an error of an Access of undefined property with my mcI geting an error:"1120: Access of undefined property nav_btns.

my code:
var Xpos:Number = 461;
var Ypos:Number = 294;

[code].....

View 1 Replies

Actionscript 3.0 :: Targeting A Movie Clip Inside A Loaded Swf?

Jun 10, 2009

I loaded this "slider" swf into a "sliderHolder" on my index swf file. inside that loaded swf there's a movice clip called icon_mc. I'm trying to target it and make it go to a specific y position within that loaded swf on a MouseEvent inside the index.swf. I can't seem to make it work.I triedI have traced sliderHolder and it says it's empty.I have traced sliderLoader and it gives a Loader.So how do I access the movieClip if I just have those two as references?Here's what I have and want to do in code:

Code: Select all
var sliderLoader:Loader = new Loader();
sliderLoader.load( new URLRequest("sliding/ImageBar.swf"));

[code].....

View 1 Replies

ActionScript 2.0 :: Targeting A Movie Clip Created With XML Information?

Jan 27, 2005

I am having trouble targeting a movie clip that was dynamically generated from information in an XML document. Basically, what I want to do is be able to manipulate the movie clip after it was generated by the initial function. Unfortunately, I can't figure out how to properly target the clip even though I am pretty sure I have the proper title and location (tried both _root. and _level0.).[URL]the string at the bottom - "_level0.mc_image2" - is the name of the last movie clip (with an image inside) to the right.

View 1 Replies

ActionScript 2.0 :: Targeting A Timeline In An Loaded Movie Clip?

May 27, 2005

The swf successfully loads where I want it to, but I'm having trouble moving the new movie clip to a specific keyframe in the timeline.

Code:
on (release) {
_parent.productImage.loadMovie("./flash/BT_Closeup.swf");
_parent.productImage.gotoAndStop("set2");
}

View 1 Replies

ActionScript 3.0 :: Targeting Dynamically Created Movie Clip?

Oct 6, 2009

i'm creating a menu where i place movieclips dynamiclly:

for each (var button:XML in XMLgothrough) {
//Create a new menu item
var menuItem:MenuItem=new MenuItem ;[code]....

but i keep getting a ReferenceError: Error #1065: Variable menuItem1 is not defined.at MethodInfo-359()error.

View 14 Replies

ActionScript 2.0 :: Targeting A Movie Clip Created With XML Information

Jan 27, 2005

I am having trouble targeting a movie clip that was dynamically generated from information in an XML document. Basically, what I want to do is be able to manipulate the movie clip after it was generated by the initial function. Unfortunately, I can't figure out how to properly target the clip even though I am pretty sure I have the proper title and location (tried both _root. and _level0.).

I've put the files I am working with online for reference:[URL]

If you load the swf [URL] ) the string at the bottom - "_level0.mc_image2" - is the name of the last movie clip (with an image inside) to the right.

Also, if you look at the code, you'll see this is a modification of the portfolio from: [URL]

View 1 Replies

ActionScript 2.0 :: Targeting Mess - Blank Movie Clip Created In The Preloader Swf

Jan 1, 2004

I have a looped sound and some components in my main movie (scroll bar) which for some reason is really bogging down my swf and causing the preloader bar not to show up until like 46% or something ridiculous.

So I am trying to solve the problem by having a preloader swf as suggested by Kode in this thread. However, now all my targeting is messed up in my main movie. Everything that was _root has to change but I can't tell what to load it into. I tried using _parent, _parent._parent, _root.container_mc (which is a blank movie clip created in the preloader swf that main is loaded into after the preloader is 100%) and others but nothing works. Even the simple looped sound which was originally just _root.backsound.start(0,999) can't be targeted. how to target things on my main stage based on the preloader swf?

View 14 Replies

ActionScript 2.0 :: Targeting Instances - Attaches A Movie Clip To The Stage Each Time At A New Level?

Jul 28, 2008

I have a function that attaches a movie clip to the stage each time at a new level.

myLevel++
attachMovie("myMovieClip", "instanceName"+myLevel, myLevel)
}

At the moment it works just fine but I want to target specific instances and I can't work out the instance names.I am trying this..

instanceName[myLevel]._x = 400

View 9 Replies

ActionScript 2.0 :: Targeting Certain Duplicated Clip?

Aug 19, 2003

[AS]
amount = 1;
i = 1;
while (amount<20) {

[code]....

With that done, you can now do something like:

_root["box"+i].onRelease or whatever you want am i right?So with that said, that targets all the duplicated clips. So is it possible to just target certain ones? like the 3rd, 9th etc? [EDIT] Since the duplicated boxes should be called box1, box2 etc, I have tried something like:

_root.box1.onRelease.....

but no luck either.

View 14 Replies

ActionScript 3.0 :: Targeting Nested Clip From Class?

Jul 23, 2009

I use the loader class to load in an external swf, a preloader movie in my class. (not a document class)

To target the properties in the swf (specifically the text field in it), I coerce it to a movie clip after it's loaded and add the child with:

var thumbPreloaderMC:MovieClip=evt.target.content as MovieClip;

now I can use:
thumbPreloaderMC.preload_text.text "sometext";

to reach the text field. works.

But, I want to nest that clip in a container movieclip I'm placing all the thumbnails I'm loading in, thumbContainer.

So I create the movieclip thumbContainer, add the child, then add the preloader swf to this clip.

I can't name the loaded swf, it throws an error, I googled that and see I can't name an already named clip.

I get an error "TypeError: Error #1010: A term is undefined and has no properties."

First of all, I'm fairly green with as3 still, I think perhaps I should rethink how I'm structuring this. I could and would ask how to target a nested loaded swf from a class.

is nesting clips like this from a class bad practice? What are best practices when it comes to using timeline based animations like preloaders etc by a class? I'd like to make my class as reusable as possible, but one can't create all animations and graphics from code.

View 1 Replies

ActionScript 2.0 :: Targeting The Movie Clips?

Jul 29, 2006

I've just finished the navigation buttons in my flash movie which take the viewer to the different sections of the site by directing the playhead to the right frame label. I've used the following code to do this:

on (release) {
this.gotoAndStop("info");
}

I have a problem though: I've also created a movie clip animation where two rectangular shapes move in simultaneously from the left and right sides of the stage creating a sliding door effect. When the viewer is in a particular section (frame) and they use one of the nav buttons to go to another section, I'd like for this animation to play (giving the effect of sort of closing a particular section) and then having another movie clip where the sliding doors open up in the incoming section to reveal that section. My problem is that I don't know what actionscript I'd use to achieve this. What code would I use on the nav button to make the first sliding door movie clip play, then have it move to the second sliding door movie clip and then finally go to the section labelled on the nav button.

View 5 Replies

ActionScript 2.0 :: Targeting Frames In A Movie

Jan 13, 2007

I can target a movie from another movie just fine, but for some reason when I try to target a specific frame within a movie, from another movie that I'm already in, it will not work. All it does is replay the movie that I'm in. I've tried a million different combinations of code, searched the internet repeatedly, but found nothing that has worked; and I'm about to throw my computer out the window! I know this should be ridiculously simple but... I can't get it!

I'll try and explain what I'm trying to do in a simpler way: I have my Root > One >> Onetwo, Onethree. Onetwo and Onethree are in the movie One, and One is on the main level/root. I want a specific frame in Onethree to gotoAndStop on a frame in Onetwo. I know it sounds confusing but it's a terribly simple thing -- my code's just not working. I would copy and paste what I'm doing but I've done every single combination imaginable to me so I'd rather just have someone here tell me how they would accomplish this.

View 14 Replies

ActionScript 2.0 :: Fmx - Targeting A Movie In A Different Frame?

Jun 4, 2003

I am curious if it is possible without using some other kind of language to target a movie that is located in the same html file, but in a different frame?

Basically lets say my one swf files is a navigation bar. I then have other frames in the html file and when i click a button i want it to goto a frame in a different swf file which is in a different frame. Do i have to do a getUrl call? or is it different because is it an swf file?

View 2 Replies

ActionScript 2.0 :: Targeting Movie Clips?

Feb 25, 2002

Ok, here's the deal. I have a MC in a MC, but i want to target the middle MC.MainStage -> Clock -> clock(art)there is a button on "clock(art)" i want it to target "Clock" to animate. i know the root function should target the mainstage...how can i target that middle MC?

View 3 Replies

ActionScript 2.0 :: Targeting Movie Clips From Buttons Within Other Mcs?

Feb 27, 2010

I'll try and make this as clear as i can, so as not to waste your time. I think it's something really simple i'm just missing...On the main timeline, i've got a movie clip ("mc_A") that contains two other movie clips ("mc_1" and "mc_2").at the end of it's timeline, I put a button in "mc_1" to play "mc_2". I'm using

on (release) {
telltarget ("_root.mc2") {
play () ;

[code].....

View 1 Replies

ActionScript 3.0 :: Targeting Nested Movie Clips?

Feb 25, 2010

Here's my example, on frame 1 is an mc I created named holder. Inside there's an mc named box. Inside box are four mcs, circles1-4, inside the circles I have four skulls. If I want to affect only the skulls, what is the proper way to go about it?For instance, whats the proper way to write a trace statement?or , if I wanted the skulls to fade individually on mouse over, how would you properly go about writing this function?
 
function over(evt:MouseEvent):void{
evt.target.alpha = .5;
{

[code]....

View 8 Replies

ActionScript 2.0 :: Targeting Children Movie Clips?

Jan 23, 2009

I have main MC when press it opens up and then has buttons in that MC.if main_MC is open then press it again will close it. Problem is I need to target the buttons inside main_MC but I can't cause it targets main_MC and thus closes the MCI tried doing main_MC.sub_MC.onPress = function ...... but it still targets the main_MC.

View 4 Replies

ActionScript 2.0 :: Targeting Attached Movie Clips

Dec 13, 2005

I'm having trouble figuring out how to target a series of movie clips i'm attaching to my movie.I'm loading some xml for a slideshow and i'm generating a series of dots at the bottom of the screen to indicate how many steps are in the slideshow and the circle is meant to highlight your current position as you step through the presentation.the MC for the dots is two keyframes with a different color and a stop action on each frame.
Here's the rundown of the code:

1. There's nothing weird here, i'm just bringing the xml in [code]

2. Here is the loadXML function i reference in the xml.Data.onLoad above:[code]Okay so now i have some dots with the instance names, step0, step1 etc. right? And at the end of my loadXML function you see the firstImage(); function. This is where my problem is, how do i target the first (step0) instance? I have no problem when I write "step0.gotoAndStop(2);" but I need to figure out how to use a variable to keep moving it along when i make my next and last functions for the slideshow.

3. Here is the firstImage function:[code]how do i target the step the same way i target the image? do i have to go back and do something in the loadXML for loop?[code]

View 2 Replies

ActionScript 2.0 :: Targeting Container With Movie Button?

Apr 19, 2006

I'm creating a site with buttons (movie buttons) targeting a container clip on the root which targets transitions in external swfs. I'm having trouble with my code in targeting the container.

I know how to do It with a normal button but not with a button inside of a movie clip...

I can use movie buttons for this because they just look better.

View 1 Replies

ActionScript 2.0 :: Targeting Loaded Object / Movie

Jun 29, 2007

I am doing a dynamically loading gallery by way of xml, now, i have the loading of the images going to where flash sizes them and puts them down as thumbs, all i want to do is when the user clicks on the thumb that already loaded image gets duplicated into the main area full size.... for the life of me i can't figure it out, it seems like it would be simple enough but i have been pulling my hair out for the longest..... by the way the publish settings are actionscript 2.0 with fp8.

View 5 Replies

ActionScript 3.0 :: Flash - Movie Clip To Play Unless The Person's Mouse Curser Is On The Movie Clip For More Than A Second

Jun 24, 2010

I am pretty new to ActionScript 3 and Flash. I don't want my movie clip to play unless the person's mouse curser is on the movie clip for more than a second. If the person just runs their curser over the movie clips really quickly, then it should do nothing. It must be more than a second. How do I code that?

[Code]...

View 17 Replies







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