ActionScript 3.0 :: _root.MyVar Not Working ?

Feb 1, 2010

if 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 Replies


Similar Posts:


ActionScript 2.0 :: If(_root.currentframe Not Working?

Feb 10, 2009

I 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]...

View 3 Replies

ActionScript 2.0 :: If (_root._currentframe != 6){ Is Not Working?

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

ActionScript 2.0 :: Referencing Something In _root Not Working

Nov 13, 2007

I have a class 'resizingObject', with a method 'addFunction()', which is instantiated in _root as 'resizer' (im certain of this - ive checked in the debug - variables list)

I then have another class, 'layerObject', that i want to be able to call the 'addFunction()' method - so inside the layerObject i tried _root.resizer.addFunction(), _level0.resizer.addFunction() and all manner of other business but to no avail...even an attempt to trace _root.resizer returns undefined.

why cant i acces the resizer instance of the resizingObject?

View 1 Replies

ActionScript 2.0 :: _root.onLoad Not Working In Firefox?

Mar 4, 2005

I have a very, very simple thing in Flash that just will NOT work in Firefox and it's driving me nuts. On the very first frame of the root, I have the following code:

Code:
this.onLoad = function() {
_root.createTextField("test1_txt", 10000, 0, 0, 300, 100);
test1_txt.text = "WORK!!!";

[Code]....

This works all right but again, it's a hack, and I'd rather avoid using a hack like this.

View 1 Replies

ActionScript 2.0 :: OnClipEvent + _root = Sliding Pages Not Working

Feb 2, 2009

I'm having a tough time with a page sliding clip, and not sure what to do.

I've got a movieClip with a page sliding effect that I found here at Flash Kit. It's perfect for what I need, however the effect will only work in that movieClip. Once you try to load that movieClip from anywhere else, the sliding no longer works.

Here's the code that's on the image clip:

Code:
onClipEvent (load) {
_x = 0;
_y = 0;
spd = 5;

[Code]....

View 1 Replies

ActionScript 3.0 :: _root, _level... Not Working In Loaded File?

Feb 5, 2009

I have loaded as2 swf in as3 using Loader object. Loading is done fine, but the problem is that the as2 swf uses stuff like _root, _level1.. etc. that doesn't work in as3. So is there any way by which I can make as2 swf work properly inside as2? I have bought some readymade as2 swf and need to use them here. I dont have the as2 fla so can't make any changes in them...

View 9 Replies

ActionScript 2.0 :: Change The _root.broj And _root.logo Variables Inside The Function?

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

ActionScript 2.0 :: _root.cargo Are Multipled By 10 And Added To _root.totalscore?

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

ActionScript 2.0 :: MyVar = X Gives Undefined?

Mar 2, 2007

This is the code i've got, basically checks finds the x,y position of number 2 in a multidimensional array. For some reason sprite.px = x and sprite.py = y give undefined messages when i trace them. What am i doing wrong?

[AS]
for (var x = 0; x<map[x].length; x++) {
for (var y = 0; y<map.length; y++) {

[code]....

View 2 Replies

Flex :: Undefined Public Variables - Value Of MyVar?

Oct 11, 2009

I have a class like this..
public class Doc {
public function Doc():void {}
public var myVar:Boolean;
}
How can I know if the value held by myVar is default false, or someone has assigned false to it? Isn't there an undefined state? How can I achieve such a thing?

View 2 Replies

ActionScript 2.0 :: _root._root[eelmine].nextFrame()?

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

ActionScript 2.0 :: _root - Load Swf Into Another With "loadmovie" With An Empty MC The Pages Stop Working

Nov 14, 2004

Im new in actionsript and I have a problem with _root. I have a swf. with two MC en the main stage: Mc_menu and Mc_pages. The Mc_menu has several buttons with the code "_root.pages=2" which moves the different pages that are in the Mc_pages. If I publish the fla. it works perfectly. Now, when I wanted to load this swf into another with "loadmovie" with an empty MC the pages stop working... I guess is because of the rutes, but i don�t know how to refer them correctly. What I have right now is: in the main stage an empty MC and a button with the code:

[Code]...

View 2 Replies

ActionScript 1/2 :: OnLoad Working At _root Level But Not At Mc_target Level?

Aug 26, 2010

I have two layers in my FLA both with empty movie clips as follows:In mc_Empty1, I attach a faded background movieclip as I wait for mc_Empty2 to load a SWF.  Once the SWF is loaded into mc_Empty2, I want to remove the faded background movieclip from mc_Empty1.  When I load the SWF from the main timeline, the onLoad() function works and removes the faded background from mc_Empty1.  However, when I load the SWF from mc_target, the SWF loads, but the onLoad() function does not.  Here's my AS2 code:
 
//Loading SWF from main timeline
mc_Empty1.attachMovie("mcFadedBg", "mc_FadedBg", 1);
mc_Empty2.loadMovie("My.swf");mc_Empty2.onLoad = function():Void{    trace("loaded"); //This works    removeMovieClip(mc_Empty1.mc_FadedBg); //This works}

[code]....
 
I know I'm targeting properly because the SWF loads as it should, but the onLoad() function does not. 

View 3 Replies

ActionScript 3.0 :: No Longer Move The "_root" By Changing The _x And _y Positions Of The _root?

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

Actionscript 3 :: 1119: Access Of Possibly Undefined Property MyVar Through A Reference With Static Type Flash.displayisplayObject

Nov 30, 2011

I put this code on the main time line:

Code:

var myVar = "something";

if I make create a movieclip and on the first frame trace(root.myVar) I get this error:

Quote: 1119: Access of possibly undefined property myVar through a reference with static type flash.displayisplayObject.

Why? Even if I use the target tool in flash and choose Absolute it gives me 'root' for my main time line.How can I get my variable off the main time line with an absolute path?

View 1 Replies

Actionscript 3 :: Inherited Variables - MyVar Not Keep The Value Of "car" When The Base Class Constructor Is Called

Jan 26, 2012

I have a base class "Vehicle" and a derived class "Car".

[Code]...

Basically, I want to set a vehicle property in Car's constructor, call Vehicle's constructor with super() and have Vehicle do something based on myVar. But this is the output i get: car pre: null car post: car vehicle: vehicle Why does myVar not keep the value of "car" when the base class constructor is called? How am I supposed to implement this correctly?

View 1 Replies

ActionScript 1/2 :: What Does It Mean _root ?

Jul 6, 2009

what does it mean _root and how to convert in AS3 for _root. Is  _root supportable in AS3 ?

View 4 Replies

IDE :: Getting The _root Via JSFL?

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

IDE :: Using _root In External Swf?

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

ActionScript 2.0 :: What _root And This. Do

Oct 27, 2004

explain to me what _root and this. do

View 5 Replies

ActionScript 2.0 :: CS3 Get Array Value From _root?

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

ActionScript 2.0 :: _root And Swf Loaders

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

ActionScript 2.0 :: Shapeflag Within Two Non _root Mcs?

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

ActionScript 2.0 :: Have The _root Fade Out?

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

ActionScript 2.0 :: Change The Fps For Only One Mc And Not The Whole _root?

May 19, 2004

to change the fps for only one mc and not the whole _root and if so how would i do it radomly?

View 4 Replies

ActionScript 2.0 :: _parent, _root Or Something Else?

Jun 14, 2007

I 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?

View 4 Replies

ActionScript 2.0 :: Different Between _root And _global?

Jun 4, 2009

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.

View 3 Replies

ActionScript 2.0 :: _root.mc._alpha == 100?

Feb 13, 2004

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.

View 3 Replies

LoadMovie Will Load To _root, But Not An Instance?

Apr 6, 2009

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 Replies







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