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
Similar Posts:
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
Mar 16, 2010
I have an array that movieclips are added into depending on the users actions. When they are added to the the array, they are also added to the display list of another movieclip on the stage.I'm trying to refer to them later so I can remove them from this movieclip's display list, but I can't work out the wording.[code]
View 2 Replies
Feb 19, 2009
the second bit of code "mc_inst1.onRollOver..." works, but the first bit of code, which tries to loop through all movie clip instances, will not work.I think this is because myReference is a String. But can anyone suggest how else I should construct my reference to the instance name?
Code:
for (var a:Number = 1; a<myCount; a++) {
myReference="mc_inst"+a;
var myClip:MovieClip = myReference;
[code]....
View 5 Replies
Apr 1, 2010
How can I refer to an MC that is at a specific position (using frame label) to start playing based on a current event?
View 6 Replies
Jun 25, 2009
I have a movieclip on stage, but I want to move it or animate it with the use of an .as file, how do I refer to a movieclip on stage through a .as file?
Is this even possible or do I have to pass the actual movieclip as a parameter to a function of the class?
To make things more clear, here is my code:
Code on main timeline:
Code:
var myBox:Box = new Box();
myBox.x = 80;
myBox.y = 160;
[Code].....
View 2 Replies
Jun 19, 2011
I have the class avanzada.as:
package
{
import flash.display.MovieClip;
[code]........
View 2 Replies
Aug 8, 2006
asically I have a variable in which I store various numbers depending on other aspects of the flash movie and I have a bunch of movieclips that are on the stage all named by number. I want to use the variable value to access and run methods etc of these movieclips.
e.g.
var myVar = "10";
myVar.myFunction();
where the item on stage called '10' will react. I realise this is a confusion between a string and an object/movieclip reference but i'm almost certain ive done this before and ive got a feeling it had something to do with [] brackets on the end of something...
View 5 Replies
Dec 4, 2006
Is there a way to refer to an object on the main timeline from inside another movie clipThe "_root." function does not work and I am still unfamiliar with the "_parent." functions purpose.
View 2 Replies
Jun 15, 2011
I have this class:
package {
import flash.display.MovieClip;
import flash.filters.BitmapFilter;
[Code]....
Appears this error message:
"1137: Incorrect number of arguments. Expected no more than 0."
I try with:
new MovieClip(this.root).cambiaBlur(gift);
but also fails.
View 1 Replies
Feb 1, 2010
I would like to know how to access a XMLList object in main timeline from movieclips.Can XML be accessed through 2nd level(nested movieclips)? In frame 1 of main timeline, the XML file has been loaded.
var xmlData:XML = new XML();
var data:XMLList;
xmlData.ignoreWhite = true;
[code].....
View 0 Replies
Jun 25, 2009
I had attach a few movieclip in the main stage by using addChild() method. If I going to refer back to them inside other movieclip, How can i do so..
For example,
//attaching at the main stage
var earth1:MovieClip = new earth()
addChild(earth1);
[Code].....
How can I refer back this Movieclip from other movieclip's timeline?
View 1 Replies
Nov 17, 2003
I had a movieclip which contained a button in it exported as "mc". Then I attach this movie clip onto the stage using: _root.attachMovie("mc", "link1", 1); But i couldn't find it with AS. I mean, how can i refer to the button inside the movieclip after I attach it onto the stage using attachMovie?
View 2 Replies
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Jul 6, 2009
I am making another game, and I'm having a problem with the level loader.[code]...
View 9 Replies
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
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