ActionScript 2.0 :: Target A _root Frame Label From Inside MC?

May 28, 2007

Just wondering how this is done within an "if then" statement. I need a code like

if (_root.frame = "home") then {
this.quickHome.onPress = function () {
_root.gotoAndPlay ("homeToContact");
}
}

I know the first line isn't going to work, but just wondering if someone knew of a code that would?

View 2 Replies


Similar Posts:


ActionScript 2.0 :: _root Inside Target?

Apr 29, 2003

ive loaded a movie into another and postitioned it..

_root.abc._x="400";
_root.abc._y="200";
_root.abc.loadMovie("trig_sub.swf");

but once it is loaded where ever i have used _root in the loaded movie (trig_sub.swf) it nolonger works eg..

on a button i have

on(rollOver){
_root.menu.stop();
}[/AS]

bnut this dosent work when it has been loaded into instance "abc" in the main movie...wat do i have to use instead of root to point at an instance?

View 14 Replies

ActionScript 2.0 :: Get This Function To Target MyClip_mc And Movethe Frame Head To Another Frame Label

Aug 30, 2007

I'm trying to get this function to target myClip_mc and movethe frame head to another frame label.

var counter:Number = 1;
//textBeGone
invisible_btn.onRelease = function(){
counter++;
if(counter % 2 = true) {

[code].....

View 2 Replies

ActionScript 3.0 :: Target Path - Control A Movie Clip Called "nosotrosmc" With A Frame Label Inside Called "historia"?

Oct 5, 2009

i'm trying to control a movie clip called "nosotrosmc" with a frame label inside called "historia" but does not work this is the code:

[Code]...

View 2 Replies

ActionScript 3.0 :: Get A Button To Target A Frame Label?

Jul 27, 2010

I am having trouble trying to get a button to target a frame label. Right now I have the button inside a movie clip and my idea was to have the click event target a frame label that is outside of the button movie clip. The frame label actually lives within the parent movie clip of the movie clip holding the button. I am using Action Script 3.0 so I am not sure what to do. And not sure if I should have the actionscript inside the nested movie clip or in the parent. Here is what I have so far...

/*
The parent movie clip is called "services_mc"
The nested movie clip holding the button is called "brandID_mc"
The button is called "goback_btn"

[code]...

View 2 Replies

Test The _root._currentframe Value In An "if" Statement Using The Frame LABEL?

Sep 9, 2010

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?

View 2 Replies

ActionScript 3.0 :: Controlling MovieClip With Frame Label - Target Path

Oct 5, 2009

I'm trying to control a movie clip called "nosotrosmc" with a frame label inside called "historia" but does not work
Code:
menu.nosotros.addEventListener(MouseEvent.CLICK, subSeccion);
function subSeccion(e:MouseEvent){
trace(""+e.target.name+"boton clicked");
this.nosotrosmc.gotoAndStop("historia");
}

The output window show this:
nosotrosboton clicked
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at HomeSonny_fla::MainTimeline/subSeccion()
I need to made a simple navigation, I'm a designer, not a programmer.

View 6 Replies

ActionScript 2.0 :: Change The _root.broj And _root.logo Variables Inside The Function?

Jan 14, 2010

In the code below i want to change the _root.broj and _root.logo variables inside the function which returns values from .php file. Inside the function everything works fine and all values are correct but when i trace var broj outside the function it's still 0.

var result_lv:LoadVars = new LoadVars();
var send_lv:LoadVars = new LoadVars();
var broj:Number=0;
var logo = new Array();

[Code].....

View 1 Replies

ActionScript 3.0 :: Path Or Target Frame Inside Of MovieClip?

Mar 8, 2009

I'm trying to reference a specific frame inside a MC in my .swf file from an .as file. What I want is to capture the current frame of the movie clip for the .as file. It's for the purpose of points when you shoot each plane. It's an easy trick of frame 1's plane would be worth 100 points, frame 2's plane 200 points, etc. I thought I'd write a line like this in my collision detection section of my .as file.

Code:
planePoints = currentFrame * 100;

The only problem is, of course, it grabs the current frame of the main .swf timeline that my flash file uses, and not the movieclip that's being called to produce the planes. So I thought I'd be able to specify a path to the movie clip (in this case it's called Airplane in the MC's linkage properties).

Code:
planePoints = Airplane.currentFrame * 100;
Then, of course, it freaks out and says that 'access of possibly undefined property currentFrame through a reference with static type Class.'

I still get confused with AS3 and the way items are handled vs AS2. I've lost track of how many times I type _root. Am I getting something basic mucked up here or should I be importing something in the package to get it to recognize the class?

View 1 Replies

Flash :: Methods To Objects Inside A Movieclip With Reference To Frame Label/number?

Mar 14, 2011

there is a movieclip named movie with instance name movie.Inside this movie there is a textbox in frame 1.I want to give properties and methods to that textbox.

View 1 Replies

ActionScript 2.0 :: Target Not Found: Target="_root.icon01" Base="_level0"

Feb 16, 2005

so, i'm making an animated rollover, and i get an output error that says this:

Target not found: Target="_root.icon01" Base="_level0"

i have no idea what the base="_level0" means.

View 1 Replies

ActionScript 2.0 :: LoadMovie In The Target _root.as. And The Url Is Dynamic

Nov 26, 2005

I want to loadMovie in the target _root.as. And the url is dynamic: _root.as.loadMovie(_root.link) Unfortunately the movie isn't loaded I tried to convert _root.link to string but nothing

View 13 Replies

ActionScript 2.0 :: Buttons - Target Movie Clip Effect From The _root Timeline?

Aug 14, 2007

I'm using this complex rollover button on my site i found here --> [URL] What i'm looking to do is have this effect trigered when a second button is rolled over as well. Is there a way to target this movie clip effect from the _root timeline? I was able to achieve this halfway by using labels but I am not able to reverse the animation on roll out with this method.

View 2 Replies

Actionscript 3 :: Change A Frame Label Within A GotoAndStop('label') With The Parameters In A Function?

Feb 29, 2012

Is it possible to change a frame label within a gotoAndStop('label') with the parameters in a function?I'm playing around with updating code as I learn more and more techniques, and at the moment the code is a basic click-a-button to select the object shape, and on press the button disappears:

// Change the object into a circle.
circle_btn.addEventListener(MouseEvent.CLICK,function(){changeShape_fun(circle_btn,circle);});
// Change the object into a square.
square_btn.addEventListener(MouseEvent.CLICK,function(){changeShape_fun(square_btn,square);});

[code]....

However I can't/don't seem to know how to change a frame label through function parameters, or if what I'm trying to do is even possible.Also to note, while I'm all ears for any more efficient ways of doing what I'm trying to do, I would still like to know how/if you can change frame labels through function parmeters.

View 1 Replies

ActionScript 2.0 :: Tell _root To Goto Frame And Then Play Certain Frame Of Movieclip?

May 7, 2006

When you click a button I want my flash to go to the frame label where the movie clip is located, and then play a certain frame of that movie clip.

View 5 Replies

ActionScript 2.0 :: 1MC Inside Another 2MC - Trace _root._x Of MC1?

Jan 24, 2007

I have a MC1 insede MC2. I have to get the _x coordinate of MC1 but relative of _root. instead of the _x valeu of MC2.

View 3 Replies

ActionScript 1/2 :: Link A Button Inside A MC On Frame1 To A Frame Inside Another MC That Is Located On Another Frame?

Apr 25, 2011

is there any way I can link a button inside a MC on frame1 to a frame inside another MC that is located on another frame.Ive got 2 frames in total. On the first frame Ive got an Mc and inside this one Ive got a button that needs to be linked to frame number 50 which is inside a MC located on frame number 2.

View 1 Replies

ActionScript 2.0 :: Is _level1 The Timeline Inside A Movieclip On The _root?

Jan 21, 2004

is _root same as _level0? or is _level1 the timeline inside a movieclip on the _root?

View 5 Replies

ActionScript 2.0 :: Copy/Move A Movieclip From _root To Inside A MC?

Jan 18, 2008

If I have a movieclip on the main timeline, is there a way to put this movieclip inside another movieclip on stage (ofcourse during runtime) ? I know that one of the methods of doing this is using bitmapdata class to capture an image of the movieclip (draw method), then attaching the object it to another movieclip that can be anywhere, but this will make the movieclip lose it's interactivity behaviour, and vector quality.

View 5 Replies

ActionScript 2.0 :: Get _root Array Data From Inside A Deep MC Hierarchy?

Aug 8, 2002

I have some global Arrays defined and loaded with data at the _root level. Data is OK cause I checked it with the List Variables option. I cannot address any of my arrays from within my MC hierarchy (not from MC2, MC1 or Component MC), BUT I can address variables defined at the root level correctly?

MC Hierarchy: ComponentMC-->MC1-->MC2-->Various MCs

I placed trace(_root.MyArray[0]); at MC2 level, then at MC1 level and finally at ComponentMC level but the sentence still reads "undefined". Is there a way to actually get my Arrays data from _root ?

View 3 Replies

ActionScript 2.0 :: Does Not Jump From The _root Frame To The One Indicate

Jan 20, 2006

i'm trying to make a transition, but unfortunatelly cannot make it work! it does not jump from the _root frame to the one i indicate, simply repeats the movie in that frame everytime i press the buttons! here are my actions on the buttons:

[Code]....

View 3 Replies

ActionScript 2.0 :: Enable The Timeline To Automatically Enter A Frame Label On Entering A Certain Frame

Jun 11, 2006

is there an action script code that enables the timeline to automatically enter a frame label on entering a certain frame.

View 1 Replies

ActionScript 2.0 :: Access The Variables Inside The Class Without Using _root.myComponentName.variableName?

Dec 11, 2006

i am creating my own component. the problem is how can i access the variables inside the Class without using _root.myComponentName.variableName.

[Code]....

View 1 Replies

ActionScript 2.0 :: Automatically Name Frame Label With Instance Name Of Item In Frame?

Mar 11, 2011

is it possible automatically name frame label with instance name of item in frame.

View 2 Replies

ActionScript 2.0 :: Make A Simple Movie (call It MovieClip) First Frame Has Stop(); Action, Second Frame Has Label PlayMovie?

Nov 6, 2006

1. I make a simple movie (call it movieClip) first frame has stop(); action, second frame has label playMovie, last frame has action gotoAndPlay(2); (so that movie not stop anymore2. Now I place movieClip on stage3. Question... what is code to make movieClip play frame label playMovie?

I already try to put many different type action in frame one of stage
this.movieClip.gotoAndPlay("2"); //NOT WORK
this.movieClip.gotoAndPlay(2); //NOT WORK

[code].....

View 7 Replies

ActionScript 1/2 :: Play Last Frame In Frame Label In Reverse?

Jun 5, 2009

Yesterday Kglad gave me the following :

nextTX.onRelease = function (){var nextFrameLabelNum:Number = (1+Math.round(thTX._currentframe/27))%10;
thTX.gotoAndPlay("next "+nextFrameLabelNum);
}[code].....

which works great IF I am moving one image at a time.What I have done now is tween 3 slides to move into a visible mask by pressing next, but when I press previous of course the above doesn't work.It just jumps to the previous three with no tween.I would like to maintain the tween but in reverse.I would like the previous just to undo, in reverse, what the next button just did with the tween?Is there anyway to make this happen with as 2.0?

View 1 Replies

ActionScript 3.0 :: Create A Frame Label On A Specific Frame?

Aug 6, 2009

if its possible, via AS3, to create a frame label in a movieclip on a specific frame.

Obviously I can do it by manually by setting up labels on the timeline within the target movieclip, but I would rather use an array so I can loop through it, creating a label name on a the specific frame each time?

so for example I would end up with:
myLabelOne on frame 10
myLabelTwo on frame 25
myLabelThree on frame 115
etc

View 3 Replies

ActionScript 2.0 :: Use If Statement With A Frame Label Instead Of A Frame Number?

Jun 30, 2004

I am trying to use this if statement with a frame label instead of a frame number. I believe that _currentframe is looking for a number only. Is there a different command that looks at frame labels instead of frame numbers?

View 1 Replies

ActionScript 2.0 :: Finding Frame Number Of Frame Label?

Jun 20, 2007

is it possible to find the frame number of frame label with AS if a button is rolled over, the timeline jumps to a label - which plays a set of 3D rendered frames to 'raise' and element, once a user rolls out of the 'button' area the button is meant to 'lower' - which can be done by simply playing backwards to the previous label.

View 5 Replies

ActionScript 2.0 :: Use If Statement With A Frame Label Instead Of A Frame Number?

Jun 30, 2004

I am trying to use this if statement with a frame label instead of a frame number. I believe that _currentframe is looking for a number only. Is there a different command that looks at frame labels instead of frame numbers?

View 1 Replies







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