ActionScript 3.0 :: Calling An MC On Root Timeline From Inside Another MC?

Apr 12, 2010

how can I call an MC on root timeline from a button inside another MC?

View 1 Replies


Similar Posts:


ActionScript 2.0 :: Calling A Function To Change Frames In A Mc On Root Timeline?

Sep 26, 2005

I have created a function on the root timeline, to be called at a certain point (when the character is on a certain frame and so is the certain item, he loses a life)the lives_mc advances frame by frame to show lives being lost.heres the function

Code:
function loseLife(){
if(_root.lives_mc._currentframe=1){
_root.lives_mc._currentframe=1[code].....

View 7 Replies

Flash :: CurrentFrame Of Root Timeline From Inside Object?

Jun 15, 2011

Is it possible to pull the currentFrame of the root timeline from inside an object class? Normally a currentFrame call only checks the frame of the movieclip it's attached to within an object class, so how would you go about checking the frame of the entire project from within the object class file?

edit: Nevermind, I found what I was looking for. All you have to do is use MovieClip(root).currentFrame and it works just fine. Consider the question answered.

View 1 Replies

ActionScript 2.0 :: Controlling Buttons Inside MC's From Root Timeline?

May 8, 2008

I have a Nav Bar on my _root timeline. Inside of which I have buttons and MC's. I want to have all the code for my buttons on the _root timeline. So, I can adjust from there.

Below is an example of what I'm trying to do from the _root timeline Actions Layer:

Code:
// ------ NAV BAR ON MAIN STAGE -----------------------------------
// ------ Instance Name = NavBar ------------------------------------
// ------ Button inside of "NavBar" = MyButton ----------------------

[Code].....

View 8 Replies

Flash - Tell The Root Timeline To Root.gotoAndStop(2); From The Timeline Of A MovieClip Added Using AddChild?

Nov 7, 2011

How do you tell the root timeline to root.gotoAndStop(2); from the timeline of a movieClip added using addChild?In the maintime line I have

addChild(fade_eng);

and in fade_eng I have the following on frame 20

root.gotoAndStop(2);
this.gotoAndStop(1);

But I am getting 1061: Call to a possibly undefined method gotoAndStop through a reference with static type flash.display:Stage.

View 1 Replies

ActionScript 3.0 :: Calling A Function Inside A Class From The Main Timeline

Aug 12, 2009

i am getting a "ReferenceError: Error #1069: Property beginTargetLock not found on AimCursor and there is no default value."

[Code].....

View 2 Replies

ActionScript 3.0 :: OOP - Calling Function In Root?

Dec 23, 2009

This is kinda complicated, and I'm still trying to wrap my head around the whole concept of OOP. So right now I am building a XML Gallery, and in the FLA (Root) I've added the thumbnails. Everytime the thumbnails been clicked, it will bring up the "Detail" movieclip, which also is created in the root. And inside the Detail movieclip, I am creating a few buttons with an external class. My question is how can I call a function in the FLA (Root) when I click on the buttons inside the Detail movieclip? Note it seems I've successfully import my external class in both the root and the Detail movieclip.

View 7 Replies

ActionScript 3.0 :: Calling Function In Root Movieclip?

Apr 27, 2010

I've got a movieclip on the root of the stage called "bgImg", in that clip I've made this function:

Actionscript Code:[code]..........When you click a button in the nav it loads a movieclip to the stage from the library, inside this movieclip I have a row of buttons,when you click one of these I want to call the function in the movieclip on the root (ie. the function inside "bgImg" .

View 3 Replies

ActionScript 2.0 :: Calling Function From Root That Is Defined In MC?

Jan 1, 2006

i've got this mc component i've created and reuse on some sites i've made. It's a real simple shoutbox that grabs info from a database using a php script.What i'd like to do is have this component refresh every 200 frames, which means, grab most current msgs and post them in the database.so for example, i have a movieclip called MC1. there's a function in MC1 that goes like: grabdata = function() {}; this basically calls the php scripts, loads the info, and so on.i wanna call this function from the root or even a parent MC.I have considered using prototypes or a class, but i dont think it's really necessary for something that seems basic enough.

View 1 Replies

ActionScript 3.0 :: Calling An Object From External To Root?

Sep 16, 2010

I have my main fla and then I have a actionscript named bullet.as.in the bullet.as I create a bullet using "this" throughout the script now how would I call the bullet on my main timeline?

View 3 Replies

ActionScript 2.0 :: Calling The Timelines Wrong With The Root Handlers?

Jan 26, 2004

I'm having a few problems with the php tutorial. I've got all the actions in my main timeline and calling them using instances. I have a mc called formset with an instance of formset in which is another mc called form with an instance of form which on the mc has the following code -

onClipEvent(data){
// show welcome screen
_root.formset.nextFrame();
}

I have a submit and back buttons with the following syntax -

formset.submit.submitbutton.onRelease = function(){
this.formset.form.loadVariables("email.php", "POST");[code]..........

I've a feeling I'm calling the timelines wrong with the root handlers etc.

View 1 Replies

ActionScript 3.0 :: Calling Root Object To Main Stage?

Feb 15, 2010

If I have a movieclip loaded with Loader and I want it to call back down to the movie that loaded it how do i do that? Referencing a root object just gets me to the root of the child not to the main stage.

View 1 Replies

ActionScript 3.0 :: Nested Child Calling Root Parent Function ?

Jul 18, 2010

I'm switching from as2 to as3 and everything was going swimmingly with my new site until i tried to use a _root call to a function on the main timeline by a loaded movieClip that is loaded nested into 2 other movieclips. the movieClip needs to tell the _root when it's done playing so the root knows to load the next one in line through a php call. Everything works except for the _root call. In as3 there's no such thing as root anymore so I figured no big deal, i'll just find out what the new thing is and holy crap wtf! I can't figure this out!! I've read from doing stuff like custom eventLisnters (which i am trying now) and casting the root as a movieClip and then I read this whole crazy tutorial on building an event structure and the proper MVC way of coding and blah blah blah ALL I WANT TO DO is tell the _root that the loaded MC has reached the end of its timeline. Basically if it were as2 i could just go _root.loadNext(); and it would work.how to make a loaded MC talk to the _root timeline and call a funciton from there?

View 19 Replies

ActionScript 2.0 :: Referencing Root Timeline From Within A Mc

Aug 20, 2006

I have a root timeline in which contains a movie clip on a certain frame. Inside that movieclip, on it's second frame, there is a button. I would like to use this button, when clicked, to move take the user to a frame on the root timeline.

View 5 Replies

ActionScript 3.0 :: Navigate To Root Timeline?

Jun 29, 2010

So im new to AS3 im trying to do some basic things that i knew in as2 but they arent working in AS3.Im basically trying to do this.this.gotoAndStop("1");basically i just want my main timeline to jump back to the beginning the main time line

View 2 Replies

ActionScript 2.0 :: BNT Inside MC To Root?

Jan 14, 2011

I need some help in Flash As2. I have an animated movie clip that has a button inside it. The idea is to be able to click on the movie clip and get it to run the animation (with on(release){ gotoandplay(2);} as its code) and then stop on frame 10. So far that is working fine as it should.

Where im falling down is that on Frame 10 there is a new symbol (Attractions_button (This has an instance name)) that I want to be able to click and take me to a frame on the main time-line.

With some research into this I cannot find a solution. So far I have labeled the frame i wish to link to on the main time-line as NRM and have tried the following code on the button symbol itself:

[Code]...

View 1 Replies

ActionScript 3.0 :: Can't Access A MovieClip On The Root Timeline?

Mar 26, 2009

What I'm trying to do is very very basic however its flat out not working. I'm trying to add a event listener to a button located within a movieclip thats on the root time line.Here's the code:

Code:
function main_init():void
{

[code].....

View 2 Replies

ActionScript 2.0 :: Check To See If The Root Timeline Is At A Certain Frame?

Jul 7, 2009

I am using Flash CS4 and Actionscript 2.0, and I want to be able to run a certain command for a time I am making only on certain frames...

[Code]...

This doesn't work. The reason I am trying to do this, is because every time I complete a level the timer is still going at the 'congratulations screen' and then when I go to level 2 the timer would start up again, and the seconds would go twice as fast.

View 1 Replies

ActionScript 3.0 :: Can't Access The Root Timeline From A Movieclip

Feb 24, 2010

I have a movielclip, nav_mc, inside which contains my navigation buttons. Lets say I want to effect the time timeline. Before in AS 2.0 I could simply go

jan1_mc.onRelease = function() {
_root.january_mc.gotoAndStop(2);
}

Now in AS 3.0, nothing works.

button_mc.addEventListener(MouseEvent.MOUSE_UP, doIt);

function doIt(evt:MouseEvent):void {
_root.january.gotoAndStop(2);
}

That doesn't work. Returns this in errors:

Warning: 1058: Migration issue: The property _root is no longer supported. This property has been removed. The closest equivalent is the Stage, which serves as the root of the ActionScript 3.0 display list..

Neither does

root.january.gotoAndStop(2)

or

stage.january.gotoAndStop(2)
(1119: Access of possibly undefined property ball_mc through a reference with static type flash.display:Stage.)

or

_stage.january.gotoAndStop(2)

or anything!

How do we do this very simple thing now in AS 3.0

TLDR;

How do I reference the _root timeline in AS 3.0 since _root. no longer works in 3.0

View 3 Replies

Actionscript :: Can't Access The Variable From Root Timeline

Mar 11, 2011

I created a movieclip called holder in my Stage and I name it, inside them i put a variable called

name = "whatever"

Now I can't access the variable from root timeline, I try this:

trace(holder.name);

The result gives me undefined! what mean this?

View 1 Replies

AS3 :: Call Function In Root Timeline From Class?

Dec 8, 2011

I want to call a function that is inside the root timeline of Flash from an external class.

This code is from the class:

private function loadImage(event:Event):void
{
addToContainer()
}

[Code].....

View 3 Replies

ActionScript 3.0 :: Accessing Variables On The Root Timeline?

Feb 18, 2008

I have some variables declared on the root timeline that I need to access from some MovieClips. In AS2 I would do something like this _parent.myVar from within my MovieClip. I intend on getting fully up to speed with AS3 but right now I need a quick fix.on the root timeline I have a variable : var myHitTest:Boolean = false;My MovieClip needs to access this var so I tried it several ways listed here. I've had no success.

parent.myHitTest:Boolean
root.myHitTest:Boolean
Stage.myHitTest:Boolean

[code].....

View 6 Replies

ActionScript 2.0 :: Referencing Functions In Root Timeline

Jun 30, 2009

I have a 13 movieclips within another movieclip which in turn is placed on the root timeline. I have written a function in the actions layer of the main timeline:
function illboxClear(){
_root.illpre.ill1.gotoAndStop(1);
_root.illpre.ill2.gotoAndStop(1);
_root.illpre.ill3.gotoAndStop(1);
_root.illpre.ill4.gotoAndStop(1);
[Code] .....

It sends the animation in each of those described movieclips back to frame one as you can see. When I try to call the function from actions on a button which itself within a separate movieclip placed on the stage:
on (rollOver) {
illboxClear();
_root.illpre.ill2.play()
} on (rollOut) {
_root.illpre.ill2.play()
} on (release) {getURL("boxer.html","_blank");
}
It doesn't work! Can I not call functions from button objects or have I made some other elementary error?

View 7 Replies

ActionScript 2.0 :: Accessing Root Function From Timeline?

Aug 17, 2009

im attempting to keep it as portable as possible so its easier to edit later, and i dont have to go around copying/pasting too much code. - i'll cut to the chase..

On my main timeline, i load all the image-file names, as variables.. using loadvars into thumbnails, which ive given instancenames Loader_1 to Loader_20, inside these thumbnails is the Loader component Thumb_1. Here is the code on the main timeline, to load these variables.

Code:
BigLoader._visible = false;
var my_lv:LoadVars = new LoadVars();
// load variable function

[Code]....

how i could make this more portable without -completely- changing the format its in [so i can still understand it]

View 9 Replies

Movie Clips - Layers On Root Timeline?

Feb 28, 2010

I have only been using FLASH CS3 for a little under a month. I have messed about with it to create some basic stuff. However recently I started on a bit of a larger project. I 'm by no means an expert in FLASH CS3 or AS3.My problem -I created a .FLA file that has seven movie clips on the main timeline, each in its own layer. These are listed below in the order they appear within the main time line.

layer ------------ movie clip
ON -------------- on_mc
RIM ------------- rim_mc
NAV-------------- coverbase_mc
PLAYER---------- player_mc
MAIN------------- main_mc
NAMEBOX------- shellname_mc
BASE------------ Base_mc

The art work for these was all imported from adobe photoshop. They all only have one frame on the main timeline. Each movie clip though has its own internal time line and some have further nested movie clips within them.The issue occurs within the NAV layer/coverbase_mc. I placed a movie clip(to act as a button) within coverbase_mc. This movie clip is called navbut_mc.Now, I already have a couple of similar movie clips, that act as buttons, in on_mc and rim_mc these work as I intended them to. However navbut_mc does not work at all in its current position. I get no errors at all on testing the movie but the action that I want it to do does not work even buttonmode = true; will not work on it.

However, if I use the same movie clip in the rim.mc, but obviously give it a seperate instance name (start_mc), then it works as intended. I have looked at various diffrent things but have to admit i'm stummped. Its almost as if when its in coverbase_mc its being hidden by the clips above it, if thats possible.The reasons I need it to work in coverbase_mc are for a) the overall look of the project b)I have some other buttons in that location that need to work from there.

View 1 Replies

ActionScript 2.0 :: Controlling MovieClip On Root Timeline?

Aug 19, 2008

My stage is empty except for an MC with a simple animation and an AS 2 layer. There is not a button or user interaction that engages the MC. I want the MC to play when the timeline reaches the frame with the AS. My MC has an instance name of 'blueMC' and here's the AS I've tried:

blueMC.play();
_root.blueMC.gotoAndPlay("2");
on(load){
blueMC.play();
} onClipEvent(load) {
blueMC.gotoAndPlay("2");
}
Shouldn't it just be this?:
MCinstanceNmae.gotoAndPlay("Frame# or label");

View 1 Replies

ActionScript 2.0 :: Passing Variable From Root Timeline Into MC?

Aug 15, 2009

I'm guessing this is pretty simple, I just can't find the solution through my google searches.

Bascially I created a variable and gave it a value in the first frame of my main timeline.

Now I just want to pass that variable into a MovieClip. When I trace the value of the variable within the movieClip I get undefined.

Is there something else I have to do to make it recognize the root timeline's variable?

View 1 Replies

ActionScript 3.0 :: Reference A Root Timeline From Loaded Swf

Dec 12, 2009

I'm loading a lightbox as an image gallery, but I'm working on changing it to full flash. My site is structured with external swfs. I ran into a barrier, because I'll need to load the images (and reference the stage size) in the root timeline, but I don't know how. MovieClip(root) only references the smaller loaded swf's main timeline.

View 1 Replies

ActionScript 3.0 :: Get A SWF To Load Behind Other Layers In The Root Timeline?

Apr 7, 2010

I am trying to get a SWF to load behind other layers in the root timeline - right now it loads over everything - that is on the top most layer. Is there a way to make it load to a specifc layer on the root timeline?

View 2 Replies

IDE :: Timeline Inside These Movie Clips And The Timeline On The Main Scene Have To Correspond To Work

Jun 10, 2009

why the timeline inside these movie clips and the timeline on the main scene have to correspond to work. [URL]

View 1 Replies







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