ActionScript 2.0 :: Control A Different Movieclip On Root?

Oct 23, 2004

here is the AS i am having trouble with

[AS]
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
_root.this.nextFrame();

[code]....

I want to make it so when i roll over my movie clip (that i attach this AS to), a different movieclip is controlled. This AS

[AS]
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.nextFrame();

[code]....

Works great, when using 'this' for the prev and next frame control but i cant figuire out how to control a different movieclip on root.

View 1 Replies


Similar Posts:


ActionScript 2.0 :: Next And Prev Frame - Control A Different Movieclip On Root?

Oct 23, 2004

here is the AS i am having trouble with

[Code]...

I want to make it so when i roll over my movie clip (that i attach this AS to), a different movieclip is controlled. This AS

[Code]...

Works great, when using 'this' for the prev and next frame control but i cant figuire out how to control a different movieclip on root.

View 1 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 :: Control Root With An Externally Loaded Swf?

Jul 26, 2010

Can I control my main timeline with an externally loaded swf?

View 9 Replies

ActionScript 3.0 :: Control Root Timeline From A Movie Clip

Oct 1, 2007

In Flash CS3 using Action Script 3, how can I tell the main timeline to gotoAndStop(); a certain frame from within a movie clip.

I have a menu (which is a movie clip) with various buttons. Each button corresponds to a certain frame in the main movie. So if a user click on Button1, it should gotoAndStop(1); and Button2 should gotoAndStop(2); and so on.

In Action Script 2, I could use _root.gotoAndPlay(2); from what I understand, but that does not work in Action Script 3.

View 9 Replies

ActionScript 3.0 :: Unable To Control The Root Timeline From A Class?

Sep 1, 2009

I've been trying to switch from AS2 to AS3 by forcing myself to use AS3 on every project and never revert to AS2 no matter what the problem may be. Doing this, I've learned a lot so far, and it has shown me that AS3 has the potential to be much more logical and easier to manage, but every once in a while I run into a problem in which research doesn't prevail.

At the moment I'm working on a project that uses the Union Platform. My goal is to make all control over User1's "Reactor" API managed by a single class.

Anyways, I've ran into a very limiting problem that I can't seem to get by. I can't figure out a way to call the root object and be able to call it's functions from a class!

Here's one of the methods that I've tried (No errors were reported, but it did not work) -

main.as:

Code:
package {
import flash.display.MovieClip;
import net.user1.reactor.Reactor;

[Code]...

As you can see, I tried to pass "this" as a MovieClip in hopes that I would be able to use the MovieClip's class functions. (Which is most likely very nooby and completely wrong since it's probably not considered a MovieClip reference, but what do I know?) Everything is fine, except the swf does not go to frame 2 when readyListener() is called. No errors are outputted either.

View 4 Replies

Actionscript 3 :: Calling MovieClip(root) From A Dynamic MovieClip Instance Produces Error 1034

Jan 14, 2012

For some reason, the same code works now, without any problem at all. I don't know what happened, or why, but I no longer have this problem Here's the original post: To put simply, I created a MovieClip, put it with addChild() to stage, and when I tried to call this piece of code:

[Code]...

View 2 Replies

Actionscript 3 :: Aligning Movieclip With Root/stage Movieclip?

Apr 23, 2010

How do you align a dynamic movie clip position with another movie clip which is in the root stage? I tried to get the mc in root x,y position, but the starting point of the class that loads the dynamic MC does not seems to be accurate. (Meaning at the root stage, the x,y is 0,0 but at the dynamic class, its somewhere like 100,20 for the browser area (and it actually vary base on the browser size))

**the other classes I used to run the custom classes below, I have it added this MC to stage

var blocker:stageBlocker=new stageBlocker();
this.stage.addChild(blocker);

Below is the dynamic MC. Should I not add it to its own "stage"?

public class stageBlocker extends MovieClip {
private var blocker:MovieClip= new MovieClip();
public function stageBlocker():void {

[Code].....

View 1 Replies

ActionScript 2.0 :: F8 - Attach Sound Object To A Separate Mc To Control Independently From All Other Sound / Root Volumes

Mar 15, 2008

I have been at this for about 19 hours straight! I am going to go to bed immediately after this post, but for crying out loud, I have NEVER had this problem before today! Before anyone reads ahead and says 'you have to attach your sound object to a completely separate mc to be able to control it independently from all other sound/root volumes.' see if the following code accomplishes just that:

[Code]...

View 2 Replies

ActionScript 3.0 :: Add A Movieclip To The Root?

Mar 24, 2009

I have a .fla file that has VerticalMenu.as as the documentclass. In that class, it calls another class called MenuItem.as.Within MenuItem.as, I want to be able to add buttons to the themain timeline (the root), but when I do addChild, it'll just add itto the menuItem object. How do I reference the root fromMenuItem.as to add the child there

View 1 Replies

ActionScript 3.0 :: Use A Button Within A Movieclip To Go To The Root?

Dec 4, 2008

I made a script for the file that i am working with that hasbuttons located within 2 movieclips. I want that button to load andimage into a UILoader (problemLoader_mc) that I placed on the stageon the main timeline (the timeline that contains WeekBar_mc). Theproblem is that I don't know how to get to the root of the file tostart a new directory to tell my function to load the image i want.I have tried multiple approaches including:

MovieClip(root).problemLoader_mc.source = problemArray[0]
MovieClip(parent).problemLoader_mc.source = problemArray[0]
root.problemLoader_mc.source = problemArray[0]

[code]......

View 5 Replies

ActionScript 1/2 :: Refer To A Movieclip Within The Root?

Jul 15, 2010

I am using the load movie from my main file (main.swf) as:
 
mc_zoom.loadMovie("detail.swf");
  
I then have a loader as a movieclip with the detail.swf
 
when the movie (detail.swf) is loaded the preloader I am trying to make/set the play to go:
 
_root.gotoAndStop(2);
 
But this does not work - it works locally but when used with the main file (main.swf)

View 5 Replies

ActionScript 3.0 :: How To Define Root For MovieClip

May 23, 2011

The below code is working fine when I place my button on main time line... when i place my button inside of any MovieClip, it never work and never attach circle from the library???can any one tell me please what should i need to change, when my Button is inside of MovieClip. Image is loading fine but my loading circle is not visible....

btn_About.addEventListener(MouseEvent.CLICK, Loading_AboutImage);
function Loading_AboutImage(event:MouseEvent):void
{

[code]......

View 7 Replies

ActionScript 3.0 :: Reference The Root From A Movieclip?

Feb 24, 2009

I want to control the playback of the root from within a movie-clip.

neither this.gotoAndPlay(n), nor root.gotoAndPlay(n) work.

View 2 Replies

ActionScript 3.0 :: Access To MovieClip From Root?

Dec 9, 2009

PHP Code:var Root:MovieClipvar container=MovieClip;function menuPress() {trace("trace");}function doIT(parameters,WIDTH,HEIGHT) {container=MovieClip(parent.parent.parent);trace(container.name)//HELP Root=MovieClip(parent.parent.parent.parent); 

[Code]...

View 2 Replies

ActionScript 2.0 :: Play A Keyframe In The Root From A Movieclip?

Feb 16, 2009

I made a button within a movieclip.The movieclip name = OurKlips-mainThe scene name = oneWhen I hit this button, it changes two frames in the html part (This works)Also, I want this button to play frame 30 from the root scene, titled "one"on (release) {getURL("content-ourklips.html", "content-txt");_root.gotoAndPlay(30);}

View 2 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 3.0 :: Go To A Framename In The Root Scene From A Movieclip?

Jan 28, 2010

I have created a Flash movie in AS3.It has 1 scene so far titled "wmain"On the first keyframe I have a movieclip: "licence_mc"Nested within this movieclip is a button that does a little fade in/fade out animation over a range of keyframes when you hold the mouse on it.This buttons Instance name is: "license_bu"Right on the keyframe of this button (so within the mc "license_mc") I placed the following code:

Code:
license_bu.addEventListener(MouseEvent.MOUSE_OVER, onOver);
license_bu.addEventListener(MouseEvent.MOUSE_OUT, onOut);

[code].....

View 4 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 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 3.0 :: Buttons In Movieclip That Need To Have 2 Functions In The Root

Sep 10, 2008

Even though i know not much of actionscripting, i like to make sites that are flash-based, so i keep on challanging myself with that. But now i stumbled into something, and i just cant find a solition! here is my problem: I have made dropdownmenu's in a movieclip and the mc works with hittest like this:

[Code]...

View 1 Replies

ActionScript 1/2 :: Movieclip Cannot Access Root Object

Jul 6, 2009

I am making another game, and I'm having a problem with the level loader.[code]...

View 9 Replies

ActionScript 2.0 :: Accessing Text Box In A Movieclip From Root

Mar 23, 2007

I'm trying to change the text on a textbox called "text1" that is part of a movieclip called "menulist" using actionscript. How can I access text1 with actionscript?[code]

View 6 Replies

ActionScript 2.0 :: FMX Attachmovie - Duplicate A Movieclip Into The Root??

Dec 29, 2002

what i want to do is to duplicate a movieclip into the root, but the movieclip i want to duplicate, isn't in the root, instead it is in another movieclip.get it? i hope thats clear...so i heard that the duplicateMovieClip function only works if both movieclips are in 'this', and so i'm guessing i use the attachmovie function. But it doesn't seem to work, how to use this function the way i want it to? i've looked at the flash help thing but its not exactly what i want...

View 2 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 3.0 :: Use A Variable In Root For Nested Movieclip?

Jun 10, 2009

I want to use the same movieclip different times (different instances). The only thing that has to change in this movieclip is a string. I tried to solve this creating a variable.To be more concrete, on root timeline i have Code:var RespJpeg:String = "bandlang2.jpg"and inside the movieclip (actually inside a movieclip in a movieclip in a movieclip in a movieclip: 4level nested) i have

Code:
loadImage("RespJpeg")
This obviously didn't work. What i tried was the following:

[code].....

View 6 Replies

ActionScript 3.0 :: Evaluate A MovieClip(root) Variable?

May 21, 2010

[Code]...

"newbie" is the name of the var ( a URL )and the trace function works ... so that being said i know the function has access to the variable the problem is w the

Code:
URLRequest( MovieClip(root).newbie )how can i get this to evaluate as a URL ...

heres the error i get:

TypeError: Error #1034: Type Coercion failed: cannot convert "http://www.yourfacesucks.com/newbishness" to flash.net.URLRequest.

at ShattrF3_Alpha_fla::squareExpand_WEB01_53/openPage()

View 3 Replies

ActionScript 3.0 :: Accessing Class Instance At Root From Movieclip

Nov 15, 2010

I have declared a object in my 1 st frame of application.

ActionScript Code:
var objTest:Test = new Test();

I am tring to access the object from a movie clip. Movie clip is located in frame 2. I am getting error

ActionScript Code:
this.parent.objTest.IncrementCount();
trace(this.parent.objTest.QuestionCount);

1119: Access of possibly undefined property objTest through a reference with static type flash.displayisplayObjectContainer.

How to access a object instantiated at root from a movie clip.

View 1 Replies

ActionScript 1/2 :: Stop Movieclip When The Root Moves On To Frame 2

Jun 18, 2009

[Code]...

I can not make the above stop when the root moves on to frame 2.

View 5 Replies

Professional :: Accessing Class Instance At Root From Movieclip?

Feb 25, 2010

I have declared a object in my 1 st frame of application.

ActionScript Code:
var objTest:Test = new Test();

I am tring to access the object from a movie clip. Movie clip is located in frame 2. I am getting error

ActionScript Code:
this.parent.objTest.IncrementCount();
trace(this.parent.objTest.QuestionCount);

[code].....

View 4 Replies







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