The _root._currentframe Value In An "if" Statement
Jul 15, 2005
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.
[Code]...
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
Similar Posts:
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
May 5, 2009
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 1 Replies
Jan 8, 2007
this code should work, but doesn't. Am I missing something? I'm simply trying to disable the button "cardSearchBtn" when the root timeline enters frame 6 (along with two other play actions).
Code:
if (_root._currentframe != 6){
cardSearchBtn.enabled = true;[code].........
View 2 Replies
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
Feb 27, 2003
im lookin to make this so that the points taken from the _root.cargo are multipled by 10 and added to _root.totalscore
[Code]...
View 2 Replies
Sep 14, 2004
if 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 Replies
Jan 26, 2009
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 Replies
Nov 10, 2009
I have this code
on(release){
_root.ohm_mc.gotoAndPlay(11);
if (_root.ohm_mc._currentframe == 25)
{
[code]....
I need movieclip to reach frame 25 and then jump to "organos de gobierno", but although it is stopped at frame 25, it does not do the jump to the other frame .... aAny idea why?? Please i need to fix this to finish a job. And in my previous times using this it always worked
View 4 Replies
Feb 5, 2007
I have a flash file, and in it is a movieclipbutton. When you roll over the button, the button has to grow in size and change color. This animation is 10 frames long. When you roll out, the button goes back to it's original size and color, this animation is also 10 frames. But when you roll out of the button before the 10 frames of roll over animation are finished, the movie jumps to the rollout animation, which starts with the button in grown size; so you see a little jump in size. To fix this, I did the following for the onRollOut:
Code:
this.btn_1.onRollOut = function() {
this.gotoAndPlay(45 - this._currentframe);
}
This however, doesn't work. When I put a trace(this._currentframe) inside, it returns 1. But this isn't right, it should return something between 10 and 20! I have the .fla file on the internet:[URL]
View 3 Replies
Apr 4, 2011
Working on a linear movie and I want to do dynamic page numbers, i.e. when on the page, display that you are on page "x" of "xtotal" I created a dynamic text box, and tried to set it equal to ._currentframe, but that didn't work. Is there a way to do this?
View 2 Replies
Nov 15, 2004
i have a menu with 4 buttons. If i rollover an button, it will play a movie clip (tooltip, about 5 seconds long). I know, how to do that. But the problem is, when i roll over another button, then i need to stop that movie clip to stop half way and play reverse.how about using _currentframe and if and else handlers?
View 6 Replies
Jun 12, 2006
I am trying to stop/pause my MC when I click on an image.
EG:
on (press){
gotoAndStop._currentframe;
getURL("image1.jpg", "_blank");
}
But when my image loads into the new window and I go back to the main content window on where I clicked the movie has already started playing!
[Code]...
View 4 Replies
Jan 9, 2009
My script have a list of .swf files and needs to play them one by one. My problem is that i can't detect when the movieclip (containing the swf) completes playing.
I understood that i need to copmare between _currentframe and _totalframes of the moviecip but i keep getting 1 as the _currentframe (my main timeline contains only 1 frame).
Code:
var mcLoader:MovieClipLoader = new MovieClipLoader();
var loadListener:Object = new Object();
var container:MovieClip =
[Code]....
View 4 Replies
May 14, 2009
Having a few problems with what I thought was a simple if statement. Here is the code:
[Code]...
I can't quite figure out the small problem with the code. It seems to just bypass the first requirement of the if statement when I do type in the proper input and go straight to the else statement.
View 7 Replies
Aug 31, 2011
if (variable == 1){
//code
//Execute this code.
} else if (variable == 2) {
//code
[Code]...
I dont want to copy the code from the first into the second and the first and second into the third.
My mind isn't working and there is probably an extremelly simple way to get this working.
I know I could used functions but for some reason it stops the instance referencing working: _root["bullet"+j] doesnt work in a function.
View 7 Replies
Oct 10, 2008
The Flash movie contains 2 Text files, one Component button, and 1 component checkbox.The purpose of the application is to load an XML file(works)Populate 2 text fields with information from the XML file(works)Compare the two text fields, if they contain the same information then the checkbox, via AS is told to be selected. (Heres the problem);
Heres the code:
Code:
runCode_btn.onPress = function() {
data_xml = new XML();
data_xml.ignoreWhite = true;
data_xml.onLoad = function(success) {
[code]....
The idea behind this app is that its an electronic form. The user fills it out, the information is then sent to a newly created XML file, months later the open the XML file in flash, and Flash fills out text fields and check and or unchecks Checkboxes based on the XML data.CheckBoxes are mandatory.But I don't see how I'll be able to use them if i can't create and condition statements based on the loaded Data.
View 1 Replies
Mar 30, 2011
why this code won't work
[Code]...
I'm sure you can put if statements inside other if statements, seriously I can't figure it out
View 4 Replies
Dec 2, 2009
I have this code
[CODE]...
I need ohm movieclip to reach frame 25 and then jump to "organos de gobierno", but although it is stopped at frame 25, it does not do the jump to the other frame.
View 2 Replies
Sep 22, 2010
I need to write an if statement inside an if-else statement. But no matter how I write it it keeps giving me a syntax error.The syntax error is "1083: syntax error: else is unexpected".[code]No matter how or where I place the braces, it keeps giving me errors.
View 13 Replies
Jul 12, 2010
what I'm trying to do is create an else if argument for each object in an array based on a user set number
Code:
for(var i:int=0; i < numberOfElseIfs; i++){
GENERATE AS3 CODE
}
to which I want it to GENERATE THE FOLLOWING CODE:
Code:
}else if(baskets[i].used == false){
baskets[i].used = true;
drawButton(i);
}
the problem is obviously that the compiler reads this code rather than understanding I'm trying to regenerate the code within the for loop...does that make sense :S? So basically I need as3 to read the code between the for statement as if it is going to echo that out later. Is this even possible?
View 4 Replies
Sep 22, 2010
I have a script which is giving me a lot of trouble since I have no idea how to write another "if statement" inside another if-else statement. I keep getting errors, I guess I don't know where to put the braces exactly...
example:
if(bla == bla) {
<------------how would I write another if statement here?
}else if (bla == bla){
}
View 3 Replies
Jul 6, 2009
what does it mean _root and how to convert in AS3 for _root. Is _root supportable in AS3 ?
View 4 Replies
Mar 2, 2009
I 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;" );
View 1 Replies
Jun 2, 2009
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].....
View 4 Replies
Oct 27, 2004
explain to me what _root and this. do
View 5 Replies
May 29, 2009
in my root I have this code:
Code:
//score node selection
var i:Number;
var scoresUserName = new Array() ;
var scoresFbid = new Array();
[Code]....
View 1 Replies
Nov 9, 2010
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.
View 0 Replies
Mar 24, 2012
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].....
View 0 Replies
May 2, 2004
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 Replies