ActionScript 2.0 :: _root._root[eelmine].nextFrame()?
Sep 14, 2004if a condition is true, then:_root.(MC with instance name that is the value of "_root.eelmine").nextFrame(); is this correct?_root._root[eelmine].nextFrame();
View 16 Repliesif a condition is true, then:_root.(MC with instance name that is the value of "_root.eelmine").nextFrame(); is this correct?_root._root[eelmine].nextFrame();
View 16 RepliesIn 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].....
im lookin to make this so that the points taken from the _root.cargo are multipled by 10 and added to _root.totalscore
[Code]...
I just recently began migrating from AS2 to AS3, and I have of course realized that I can no longer move the "_root" by changing the _x and _y positions of the _root (which no longer exists in AS3). How can I do this in AS3 (specifying _x, _y, _z possibly of the "_root")?
View 2 Replieswhat does it mean _root and how to convert in AS3 for _root. Is _root supportable in AS3 ?
View 4 RepliesI an trying to get the _root node of an FLA via JSFL. A co-worker wrote a script that uses _root via actionscript. I was trying to wrap that code into a panel. I have all the trace functionality running and everything running accept I can't seem to access the "_root". I have tried _level0, and almost everything I can think of... I am looking to have JSFL return the _root object from the current file the same way can can hand "_root" to a function. (IE: myfunction( _root ); ) here is my current attempt:
Code:
var doc = MMExecute( "fl.getDocumentDOM()._root;" );
I have an external swf, that is a photo gallery, loading into my main swf. When the external swf loads, everything works fine except when you click on a thumbnail in the external swf, the jpg doesn't load. I have it set up that an empty movie clip is created first, then the jpg is loaded into that. I have a feeling it is something with the fact that I am using _root, but I don't have any guesses whats causing the issue and how to fix it.
Code:
News.onRelease = function(){
if( !this.up ){
[code].....
explain to me what _root and this. do
View 5 Repliesin my root I have this code:
Code:
//score node selection
var i:Number;
var scoresUserName = new Array() ;
var scoresFbid = new Array();
[Code]....
Edit - managed to find an answer to this by using _parent instead of _root
I've got a swf loader that loads a swf obviously but in the swf that's being loaded I have a button inside of a movie clip which I use...
Code:
on (release) {
_root.gotoAndStop("page1");
}
When viewing the swf file on its own this works perfectly, however when it gets loaded into the first file it no longer works because the root has now changed to that first file.
Why isn't this working?I've tried everything.Here's a resume on what's the part with errors:
Code:
var Bl:Object = {x:-18, y:174};
_parent.mwall.globalToLocal(Bl);
[code].....
I was jsut wondering if it is possible to have the _root fade out, when e.g. loading a something into level1 and then have _root fade back in when unloding level1?
View 7 Repliesto change the fps for only one mc and not the whole _root and if so how would i do it radomly?
View 4 RepliesI used the tutorial on Kirupa on loading external swf's. Before writing here I tried to find an answer in the forums, but no luck so here I go.[URL]..If you look at my files: Open portfolio.swf and hit one of the first two images (that initially flies in). here you will see that if you hit the second one, the rpesent one displayed makes an outro and the second one makes an intro, PERFECT!
Now, if you open default.swf (that has portfolio.swf loaded into a movie clip as you can see by looking at the source) and if you hit the second image, the first one makes the outro, and then makes an intro. So the shift to the second one is not happenening. Please, can someone help me to make this happen?
difference between _root and _global when dealing with variables or point me in the direction of a good explaniation on the web? I feel like there is something basic I am missing. For example the other day I was working on making some scenarios. In a nut shell I was setting up dynamic text boxes where the text would changed based on what the student selected (via buttons).
When the varible was changed (by clicking the button) the text wouldn't refresh when it was a _global, but would refresh when it was _root. Everything is working fine but I've been trying to understand the "why" it works this way.
I have this code. It works fine when i press a button.
if (_root.mc._alpha == 100) {
this.onEnterFrame = function() {
speed = 50;[code]....
I need to know how can I trace the _alpha value of the mc and when the value is 0 a movie clip is loading in the same mc.
When I try to use loadMovie, it will not load to an instance (unless it's something that's in the same directory). I figured this was some sort of security thing, but I was able to load the movie into _root just fine.
View 1 RepliesI can't seem to get... if(_root.currentframe to work. It just doesn't seem to recongnise what the _root frame is and won't goto the desired frame.I've attached a simple flash example which is very basic with a button inside a mc that asks the _root for the frame and if it's on frame 1 then should goto frame 5 - but it doesn't work. I've added a trace and that's returning the correct frame so it knows what the frame is.The actionscript on the button is..
on(release){
trace(_root._currentframe);
if(_root.currentframe == 1){
[code]...
i was trying to scale with mouseWheel into a map with _root._xscale and _root._yscale. it works fine but i cant center my map after the scaling.i want the map to be centered at _root._xmouse and _root._ymouse.
View 1 Repliesif i have embeded swf like myswf.swf?myVar=test.txt ,i get by _root.myVar (test.txt)how can i get this parameter in AS3? I have searched google but no success
View 3 RepliesRight now I am trying to make a gallery in my site and the set up is
Main SWF(1)
loaded into a movie clip on SWF(1) I have SWF(2)
This SWF(2) has the various thumbnails in a movie clip
The ideal is to load SWF(Photos) of the images into another movie clip in SWF(2)
When running SWF(2) stand alone it works fine with a _root command. But when SWF(2) is running on SWF(1) it doesn't work. And initially I had the movie clips with SWF;s 1&2 having the same name so when the button was pressed SWF(1) loaded SWF(Photos) where SWF(2) was.
Is there a command like _root but only going down 1 level?
What would you say if I would sad to yo that I have managed to reconstruct _root in AS3 ?
allowing users to reference objects whit
ActionScript Code:_root.someMoveiClip.someText.text = "Root is back in town :)";
and that you can call that statement inside any movie Clip on stage.... ? And you can also use
ActionScript Code:
_root.addChild(someMovieClip);
i have a movie clip with functions which relate to instances of buttons eg.
onClipEvent (enterFrame) {
_root.home.onRelease = function() {
endX = 0;
endY = 0;
};
}
where home equals the home button and so on for the links buttons and contact button etc.
the problem is the buttons are not found at the _root. they are in a movie clip with an instance name 'menu'. i have tried using this in the onClipEvent function:
_global.menu=this;
_global.menu.home.onRelease = function() {
endX = 0;
endY = 0;
};
I have a problem with an input text created dynamicly into a MC that is into a MC that is into a MC (...) So it's, let's say:_root.myclipA.myclipB.myclipC.myinputtext now as my input text isn't on _root, i can't get focus on it (i can never add any text). How can i do to be able to input some text in that textfield? It cannot be moved elsewhere because i drag myclipC when i press myclipB...
View 6 RepliesIve just been stuffing around with this little game, and its been working perfectly up until now. The reason? I have just added another frame for a title and menu. And now when you click "Start" on the menu, and it takes you to the game; The hero wont move, the enemies wont spawn and the music wont play. Its like the script is just not loading. But when I remove the menu frame (leaving only the one frame with the game on it) it works fine again.
View 3 RepliesIn flash i always used tellTarget to control everything, but now i'v discoverd _root... If im working in level 0 this works perfect, but when i'm in a mc in a mc in a mc, it does nothing... I just want a mc to play:
_root.myMc3.gotoAndPlay("label");
so must it be:
_root.myMc/myMc2/myMc3.gotoAndPlay("label");
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]....
I have this actionscript with a MC._root.containerMC.loadMovie(loadswf+".swf");however, it will online work if i put this action on the _root timeline
View 2 RepliesI was wondering, is it possible to call a function in a MC from the _root of the movie?
I have an MC called timer, linked aswith a function in it,
Code:
testFunc = function(){
trace("It Worked!");
}
On the _root in the first frame I have this,
Code:
_root.attachMovie("timer","t",5);
_root.t.testFunc();
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?