Local To Global (variables)
How do i make variable framenumber in _root.img1.goto to be used somewhere else?
I need the value in framenumber to be set to numbers in _root.img1
how do i make framenumber == numbers?
FlashKit > Flash Help > Flash Newbies
Posted on: 09-02-2002, 05:25 AM
View Complete Forum Thread with Replies
Sponsored Links:
Variables: Local Or Global?
Hi everyone. Hope you can understand me
I built a time line with several "pages"
and, in each page, I have lot of buttons.
STEP 1
I thought to assign a variable to each "on release"
tag different for each button.
this "On release" consist of
On release
xxx=1
www=0
eee=0
....
play
(The syntax is not this, obviously
but the code initialize all but the variable I need)
the playhead continues its run,
reach the end of the page and there it
founds a frame action
goto and play
label "base"
STEP 2
it is supposed to go to "base" label
then, after some frames (with some tweenings) there is another frame action
If xxx=1 go to and play "something"
If www= 1 ....
and so on
Is it clear?
The problem is that it does not function..
the play head reachs the STEP two and then
it plays another scene, ignoring all the coding!
I tried to declare the variables i need at the beginning
of the scene but none changes..
I still cannot control the direction of the play head
from "far places" in the scene.
anyone has ideas about it?
thanks in advance
davhub
View Replies !
View Related
Variables Local To Global
Hi,
I am trying to access a different element of an XML file by using a button, I then want the button to go to a clip where this can be displayed.
In the first frame I have loaded the XML file and created a variable called thisfish which contains the data fron the first element of the XML:
data = new XML();
data.ignoreWhite = true;
data.load("aquarium.xml");
data.onLoad = function(success){
if (success){
if(data.status==0){
thisFish = data.childNodes[0].childNodes[0];
parseData(thisFish);
}else{
trace("Parse Error: "+data.status);
}
}else{
trace("Load Error")
}
}
Then when my button is pressed I want to create a variable (I have called it getfish) and have it store the details of another part of the XML object, this is my code:
on(release) {
var getfish = thisfish();
var getfish = _root.data.childNodes[0].childNodes[3];
_root.textbox2.localToGlobal(getfish);
_root.gotoAndPlay("end");
}
In my final frame (called "end") I want to be able to access the data in getfish, however it comes back as undefined.
_root.loadVars(getfish, "GET")
trace(getfish);
stop();
Is there a genius out there who can help me?
Thanks in advance,
Steve
View Replies !
View Related
Global / Local Variables?
Hi,
If you have a variable on the main time line, you can reference if from inside any movieclip by using _root.variable
If you have a variable inside a movieclip, can you reference the variable by using _root.mymovieclip.variable ?
Also what does _global do?
Thanks
View Replies !
View Related
Flash Variables => Local, Global ?
If I initialize a variable in one keyframe, can I than always use it in other keyframes of other movie clips.
Another question: I want to get one variable out of a txt file and use it in the flashscript of a menu i'm making. I know how to output it to the screen but I can't get it fixed to use it in my script. I think the problem is related to my first question.
View Replies !
View Related
Global Local Variables :confused:
Hi,
maybe a stupid question but for some reason i cant figure it out .
how to set global variables.
like :
checkpas = "somepassword"
now I want to check this var whenever I want....
how do I set this vars.
In asp I use .ini files that I include in other pages, or use the global.asa but how to manage this in flash AC
maybe its so simple I cant see it
View Replies !
View Related
Global Versus Local Variables
In my high school programming course, I was taught that "var" statements made inside a function create "local" variables, that cannot be accessed from elsewhere in the program, unless they are passed back (with a return statement)
I am assuming the case is the same with flash (please correct me if I'm wrong).
In my current program, I am calling a certain function "getInfo (someNumber:Number())" about 20-100 times simultaneously, like this:
ActionScript Code:
for (i=0; i<someArray.length; i++) {
getInfo(i);
}
within the function getInfo, I am declaring about 5 different variables, whose values depend on the paramater "someNumber". My question is, will these variables replace each other, and if so, what can I do to prevent this?
thnx
View Replies !
View Related
Global Variable Versus Local Variables...
i have "main menu" MC residing on the root timeline, inside "main menu" MC i have a button that is setting a variable menu == profile. i have another mc called "changer" residing on root timeline and i'm trying to have "changer" MC use a "if" statement that checks the value of the variable "menu" (i set in main menu MC). when i use the "set variable" action, it should set that variable as a global variable right? i can't get the "changer" MC to read the variable! Do i need to use the tell target to set the variable in the "changer" MC??
I hope this is all intelligable enough and i didn't over-explain.. Any help would be greatly appreciated!! Thanks..
View Replies !
View Related
The Same Old Local Vs. Global Variables, In And Out Of Functions, Problem.
For some reason I can't seem to get the hang of this- I apparently just need a bit of help.
Take the following:
ActionScript Code:
stop();
for (i=0; i<5; i++){
addBug(i);
}
function addBug(id){
var tmpBugHolder:MovieClip = _root.main_mc.createEmptyMovieClip("bugholder" + id + "_mc",_root.getNextHighestDepth());
trace("creating bugholder" + i + "_mc");
tmpBugHolder.attachMovie("bug","thisBug_mc",_root.getNextHighestDepth());
}
trace(this.main_mc.bugholder3_mc);
My stage is set with main_mc in the root, the movie clip "bug" set in my library to export in the first frame with a linkage identifier of (surprise) "bug" and the actionscript is all in the second frame of the root timeline.
For some strange reason, the above traces out:
Quote:
creating bugholder0_mc
creating bugholder1_mc
creating bugholder2_mc
creating bugholder3_mc
creating bugholder4_mc
undefined
Now, what I'm taking issue with (of course) is the "undefined" at the end there, which is clearly my final trace call, checking to make sure that bugholder3_mc has been created where I expect it to.
What's strange is if I refer to bugholder4_mc in the final trace, it responds as expected:
Quote:
creating bugholder0_mc
creating bugholder1_mc
creating bugholder2_mc
creating bugholder3_mc
creating bugholder4_mc
_level0.main_mc.bugholder4_mc
I feel like this has something to do with the order in which I'm defining variables or that for some reason, "tmpBugHolder" is being shared, even though the function is being called in separate, isolated attempts (or is it? what do I know?).
What am I doing wrong here? I'm sorry to ask such a dumb question, but I just feel like I'm not understanding something very basic that I should be.
View Replies !
View Related
Local To Global Example For D/l
I made a quick example for n8w over at Were-Here, who was asking about this. I know it's pretty straight forward, but if it helps anyone, you are welcome to d/l it. It's in the downloads section (duh) at:
http://www.developette.com
hope it helps someone...
View Replies !
View Related
Local And Global
hi...
can someone explain me the diff. between a normal variable & a variable created by var
i mean:
a = "name"
var a = "name"
i understand that its a local variable but wats the scope... the guide says its lasts in curly brackets only...
but can we use them across the frames...? on one timeline... or what...?
slightly confusing... i only use var for variables in loop like For (var i=0; i<=10; i++)
thanks
arpit
View Replies !
View Related
Local To Global ?
Hello,
I am trying to track the position of a movie clip inside a movie clip and convert the coordinates to another movie clip on the main stage. Basically, the localToGlobal function....
Code:
onClipEvent (enterFrame) {
_root.trackx = _root._xmouse;
_root.tracky = _root._ymouse;
localX = _root.dart3.anim3.hit3._x;
globalX = _root.dart3._x;
_root.darttip3 = _root.dart3.anim3.hit3._x.localToGlobal(_root.dart3._x);
}
dart3 is on the main stage. I am trying to convert the coordinates of _root.dart3.anim3.hit3._x to the global coordinates of the stage, or MC "dart3". Why wont this work? Any suggestions?
Regards
~GD~
View Replies !
View Related
Local To Global I Think?
I'm in the process of making a very simple golfing gaming. I am having trouble in getting the ball to fall in the hole. The hole_mc is within the pgreen_mc. The ball_mc is on the root. I need to get the hole_mc _x and _y so that I can make it equal to the ball_mc _x and _y. I just can't get it to work. I think it has to do with the fact that the hole is inside the putting movie. This is what I have done so far and it's not working. Any ideas?
if(pgreen_mc.hole1_mc.hitTest(ball_mc))
{
point = new Object();
point.x = pgreen_mc.hole1_mc._x;
point.y = pgreen_mc.hole1_mc._y;
localToGlobal(point);
ball_mc._x = point.x;
ball_mc._y = point.y;
}
View Replies !
View Related
Local To Global Help?
hey, im attempting to use the local to global comand to get an object on the stage to the x and y cordance of an mc with in an mc with in an mc
here is feeble attempt
Code:
trace(localToGlobal(guy.arm.tip._x));
but of coarse... it wont work... does any one know if this is even the right way to go about this or not? or what to do to my code to make it work?
View Replies !
View Related
Global To Local?
Hi guys,
Can someone explain how to do this:
I have a movieclip... called holder
It is positioned here:
holder._x = -400
holder._y = -400
What i would now like to do, is add a movieclip into the "holder" at the global position, not in relation to "holder"
For example:
Code:
Tlevel = _root.holder.getNextHighestDepth()
_root.holder.attachMovie( "Item","tp" + itemNo ,Tlevel);
eval("_root.holder.tp" + itemNo)._x = 200
eval("_root.holder.tp" + itemNo)._y = 200
This is putting it off the screen, when really i want it at the x200 and y200 position of the scene.
Please help!
View Replies !
View Related
Local To Global
I'm using this code to allow rotation of an object
this.onMouseMove = function() {
var xdiff = _root._xmouse-this._x;
var ydiff = _root._ymouse-this._y;
var angle:Number = Math.atan2(ydiff, xdiff);
angle = angle*180/Math.PI;
this._rotation = angle;
};
however it rotates around the top corner rather than the center which is what i need.
I understand i need to use a local to global point but cannot get it to work, can any one help
View Replies !
View Related
Local And Global Variable
HEllo,
Could anyone tell me how to define local variable and global variable in flash and their scope where we defince those variable i mean timeline;
Is there a way to force to define variable?
Best Regards
View Replies !
View Related
Local And Global Problem
I feel a bit silly posting this as its probably a basic problem, but its something I've never run into before.
I'm reading an xml doc, and calling a function on load in which three arrays are created like this:
Code:
function Extract() {
code blah
Completed = new Array();
Experimental = new Array();
InDev = new Array();
more code blah
trace(Completed);
}
MyXML = new XML;
MyXML.load("XML.xml");
MyXML.onLoad = Extract;
trace(Completed);
Now when I trace Completed inside the function it displays my array, but when I trace Completed outside of the function it returns undefined, so I think its creating the arrays as local variables specific to the function, but I need to access them from outside.
Anyone know what I should do?
Thanks in advance
View Replies !
View Related
Flash Var's Local Or Global?
hi,
if I define a var (variable) in a child-movieclip, is it then only for that specific child-movieclip or for the whole flash movie?
and if it's only for that specific child-movieclip, how can I access it then from other child-movieclips in different layers?
thanx for an answer
xant
View Replies !
View Related
Coordinates Local To Global
I'm trying to figure this out. Maybe one o fyou could help me.
I have a MC that has a 20 x 40 square in it. Its top left corner is the 0,0 point of the movie clip and its bottom left is at 0, 20.
Now if i place this clip on the stage say at 300, 300. Then the locs read as follows.
mcBox._x = 300
mcBox._y = 300
mcBox.TLC._x = 0
mcBox.TLC._y = 0
mcBox.BLC._x = 0
mcBox.BLC._y = -20
Now what I want to do is during movie runtime is to Click a buttom that will make a new instance of mcBox called mcBox1.
On doing so I want to snap mcBox1.TRC._x&y to mcBox.TLC._x&y AND mcBox1.BRC._x&y to mcBox.BLC._x&y.
How can I access the local points or somehow convert it all to a single coordinate system? Not all my ojbects are square. So I highly need to rely on the points TLC, BLC for alignment. Not just the outer boundries of the clip.
Hope I've explained it enough to get some input.
TIA
Firehawk
View Replies !
View Related
Local To Global Issue
I have an empty movieClip in the library. I also have a graphic in the library.
I attach the empty MC on the stage at location 0,0 and I attach the graphic within the empty MC at points 35 for X-axis and 185 for Y-axis.
Now when I try to find out the X location of the graphic, it shows me as 35. But when I use localToGLobal property, it then shows the X-axis as 70. How can this be possible.
The graphic is placed at a position, as it would be placed on the stage. It has to actually show 35 only.
Mariam Dholkawala
View Replies !
View Related
Global To Local Question
Hi guys/gals,
Just a quick localToGlobal question. I have a movieclip called frontface_mc . This contains another movieclip mc1 which is just a small round dot.
Now im using this code to draw a line. I am trying to draw the line so that it starts from the 'dot' and goes outwards. As i am defining the line on _root i am trying to use localToGlobal to get the correct cordinates to draw from, but something seems to be not working. As the line does not draw from the dot.
the code is as follows:
Code:
var point:Object = new Object();
point.x = frontface_mc.mc1._x;
point.y = frontface_mc.mc1._y;
_root.localToGlobal(point);
_root.lineStyle(1,0,100);
_root.moveTo(point.x, point.y);
_root.lineTo(point.x+60, point.y+60);
Any idea what im doing wrong..cheers in advance
View Replies !
View Related
Global To Local Points?
I am creating a compass that follows another mc. The compasss is in the root directory and the mc it is foloowing is within another mc. My compass follows the other mc fine when it is in the root directory, but once i move it back into the interior mc then it doesn't work at all. I am thinking this is because the marker is taking the x and y points of the interior mc. Is there a way for me to fix this.
here is the code I am using:
PHP Code:
onClipEvent (enterFrame) {
myRadians = Math.atan2(_root.map.map_mc.marker._y-this._y, _root.map.map_mc.marker._x-this._x);
myDegrees = Math.round((myRadians*180/Math.PI));
_root.yChange = Math.round(_root.map.map_mc.marker._x-this._y);
_root.xChange = Math.round(_root.map.map_mc.marker._y-this._x);
_root.yMove = Math.round(_root.yChange/20);
_root.xMove = Math.round(_root.xChange/20);
localToGlobal(_root.map.map_mc.marker);
//this._y += _root.yMove;
//this._x += _root.xMove;
this._rotation = myDegrees -55;
trace(myDegrees);
trace( _root.map.map_mc.marker._y);
}
View Replies !
View Related
3D Local And Global Rotations
Hi,
I'm trying to create some code that rotates my quad (a square) in 3D space (local rotation), but also allows me to rotate the camera view as well (global rotation). I've got it rotating around its own axis, but I'm not sure how to "add" another rotation to it as well. I've attached a image to this to give everyone a clue as what i'm after (its in plan view). This is the code i'm using which should give it 2 rotations, but obviously I'm not doing it right, as it just rotates it once around its own axis.
Code:
var pointIn2D = new Object();
var angleY:Number = (_xmouse-(Stage.width/2))*.001;
var cosY:Number = Math.cos(angleY);
var sinY:Number = Math.sin(angleY);
var x = pointIn3D.x*cosY-pointIn3D.z*sinY;
var z = pointIn3D.z*cosY+pointIn3D.x*sinY;
pointIn3D.x = x;
pointIn3D.z = z;
var x = pointIn3D.x-cameraView.x;
var y = pointIn3D.y;
var z = pointIn3D.z-cameraView.z;
var angle = Math.atan2(z, x);
var radius = Math.sqrt(x*x+z*z);
x = Math.cos(angle+cameraView.rotation)*radius;
z = Math.sin(angle+cameraView.rotation)*radius;
pointIn3D.x = x;
pointIn3D.z = z;
var scaleRatio = focalLength/(focalLength+pointIn3D.z);
pointIn2D.x = pointIn3D.x*scaleRatio;
pointIn2D.y = pointIn3D.y*scaleRatio;
I think I have to combine the rotations somehow but I'm not sure how to!, any help appreciated!
boombanguk
View Replies !
View Related
Problem In Global To Local
Flash version=7
AS=2
I created three movieClip. a, b and c. a and c is at _root. b is inside a.
I want that when b hit c then b take position of c. I tried but not happening.
I try through following script.
code:
on (press) {
startDrag("", true);
}
on (release) {
if (_root.a.b.hitTest(_root.c)) {
point = {x:0, y:0};
_root.c.globalToLocal(point);
_root.a.b._x = point.x;
_root.a.b._y = point.y;
trace(_root.a.b._x);
}
stopDrag();
}
you can see attach fla.
View Replies !
View Related
Global And Local Variable
I can't figure out how to declare a global variable and call it from another area. Also I have funny things happening with the variables I am using regarding local stuff. Does anybody know if there is a tute on scope and lifetime on variables somewhere?
View Replies !
View Related
Global To Local Question
Given a rotated movie clip that is set up as a mouse listener, when a mouse down event happens, will a call to "globalToLocal" on the click coordinates "rotate" the click to match the rotated clip space?
Thanks
Ken
View Replies !
View Related
Global & Local Variable Problem
Ok real simple.
I have an mc called 'Moving tune', in this mc at frame one I have
stop
position="forward"
Then a tween, at frame 15
stop
position="back"
In main movie I have a 5 buttons with
on (release) {
if (position eq "back") {
tellTarget ("Moving tune") {
gotoAndPlay (16);
}
} else {
}
tellTarget ("Moving tune") {
gotoAndPlay (2);
}
}
as their starting code. Then I'll add more mc's to it once it is working.
What I want the thing to do is when a button is clicked the mc plays to frame 15, sets the variable, then on the next button press it checks for the position and plays the mc from the relevant position.
Help please
Spickee
View Replies !
View Related
Local To Global Problem With Rotation Value
hi,
i can't find a way to retrieve the global rotation value of a mc which is a triangle. the x and y positions works fine. i tried my luck with the rotation value, but it's obviously wrong:
point = new Object();
point.x = tri._x;
point.y = tri._y;
point.rot = tri._rotation;
LocaltoGlobal(point);
xcuadrado = point.x;
ycuadrado = point.y;
rot_tri= point.rot;
is there a way to get the global rotation value?
View Replies !
View Related
I Cant Dodge Local To Global Any Longer...
hi, i need to move a movie clip to a spot that is inside of a different mc thats inside another mc...
so i figured that i need to use local to global... to get it to the right spot... i donno if thats right or not... but maybe somebody on here could help me out with this...
View Replies !
View Related
Changing Global Coords To Local
Hi,
I have some sprites on the stage that when I roll over them, a menu should appear.
I know the Global coords of where the menu should appear, but when I use
GlobalToLocal (The location is calculated according to the angle), it never puts the menu at these coords.
this code appears in the object class:
localcoords = globalToLocal(GlobalCoords);
menu.x = localcoords.x;
menu.y = localcoords.y;
The menu doesn't appear on the stage at the correct coordinates.
What am I doing wrong?
What i am trying to do is to make an object that exists in a special class that extends sprite, appear in a certain location on the main stage.
Thanks in advance,
Guy
View Replies !
View Related
Local To Global? Tracking _X Of Nested MC?
Hello
I have two MCs that are nested 1 deep inside another MC.
This MC groups them together so they move from side to side as a unit (a scroll navigation from left to right)
I need to detect the X coordinate of each of the two MCs as the parent group moves from left to right
I have tried several methods but can not seem to figure out how to track the position of each nested MC as they move across stage
I either get each MCs position as they relate to the parent coordinate system. This does not change since they do not move within this parent
OR
It is the parent that moves so when I try to detect that - I get the same X result for both MCs since it is giving me the X of the parent only
I need the X of each MC as it relates to the stage
I have tried local to global and global to local - I could be missing something though.
here's an example but I am not posting the code to debug it since I have tried so many variations. I am more looking for a clean approach or methodology for my mission as stated above:
Code:
onClipEvent (load) {
var myPoint:Object = new Object();
myPoint.x = this._x;
myPoint.y = this._y;
_root.nest1.globalToLocal(myPoint);
//_root.nest1.localToGlobal(myPoint);
trace("this is "+this._name+": "+myPoint.x);
}
onClipEvent(mouseDown){
trace("this is "+this._name+": "+myPoint.x);
trace("this is nonglobal"+this._name+": "+this._x);
}
Any ideas?
Thanks
FA
View Replies !
View Related
Local To Global Vars.....Help....sniff
I recive value's from a php-file into a movieclip called VarClip embedded in root via a submitbutton with this action:
LoadVariablesNum("name.php", _root.VarClip, "POST");
The value's are received there because I have dynamic-text boxes checking them...and they fill with the appropiate values...
so far so good....
But I need the values received to be available on a global-level so I can share them with other Clips in my Flash movie as well....
Is there a way to bind those values to global values when the arrive??
for exaple when I receive value pName from name.php:
_global.gName = pName
This doesn't seem te work though....
please help...someone....
thnx a million.
View Replies !
View Related
Global And Local Component Issue
Howdy ...
Following Problem
I am working on a Site (Part of it)
The Guys who developed the Site use _global.style.setStyle to reskin their
Comboboxes. I had to design a MC which is loaded into the Main Container the guys did, and i used Comboboxes too, which have to have a different look from their Comboboxes. When I use: this.mc.setStyle <-- for my Comboboxes nothing happens, they just receive the Styleinfo from the Containerfilm ... Is there a workaround for that?? So, that my comboboxes use my style from the MC and the Guys still use their Global Combobox Style???
thanx in advance (i hope my problem is understandable)
cheers
ChromeD
View Replies !
View Related
Local To Global Vars.....Help....sniff
I recive value's from a php-file into a movieclip called VarClip embedded in root via a submitbutton with this action:
LoadVariablesNum("name.php", _root.VarClip, "POST");
The value's are received there because I have dynamic-text boxes checking them...and they fill with the appropiate values...
so far so good....
But I need the values received to be available on a global-level so I can share them with other Clips in my Flash movie as well....
Is there a way to bind those values to global values when the arrive??
for exaple when I receive value pName from name.php:
_global.gName = pName
This doesn't seem te work though....
please help...someone....
thnx a million.
View Replies !
View Related
Best Way To Covert Local Co-ords To Global
I have some mcs which are in another mc. For reason to boring to describe at the moment I need to be able to convert the local x and y co-ords of the movies in the clip to their equivalent as they sit on the main stage. This will enable me to place them programatically.
I am pretty sure there is a function that takes care of this but I can't seem to find it and I do not have my ASDG on me (gasp!).
cheers,
scott
View Replies !
View Related
[F8] Move A MC To A Relative X/y (possible Local/global Problem)
Hi,
Alright, here's the scenario: I have a MovieClip that is a top-down view of a double barrelled tank. Inside this clip, there is a clip of the turret/barrels so that it can rotate independantly. So far, everything is working perfectly.
(The path would be _level0.Enemy1.EnemyTurret, for example)
Now, whether I use duplicateMovieClip or attachMovieClip, I need to fire the bullets off the end of the turrets. I am having a hard time figuring out how to place the bullet clips at the tip of each barrel, because with a rotating turret, the _x and _y of the turret's tip is changing.
I have already figured out how to aim, fire, animate, hittest, etc., just having a hard time with local coordinates.
It probably just requires a localToGlobal or vice versa, but after 2 hours of trying, no dice.
Thanks!
View Replies !
View Related
Variable Problems Local And Global Score
Hi i'm having problem of writing a value to a global variable in a function and using this variable affterwards. My problems is the following i have a firstProduct variable that is initialized as global at the begining of my code and the i have an XML on load function where i should take the first child and write it to his variable and use it afterwards for passing it as a variable to PHP but this is irrelevant, however when im trying to trace im getting undefined any suggestions ?? here is the code
Attach Code
var theXML2:XML = new XML();
theXML2.ignoreWhite = true;
_global.firstProduct1="";
theXML2.load("http://localhost/functions/get_products.php?subcategory_name="+va2);
this.theXML2.onLoad = function() {
var nodes2 = this.firstChild.childNodes;
//problem?!?!?
firstProduct1=nodes2[0].firstChild.nodeValue;
trace(firstProduct1);
for (i=0; i<nodes2.length; i++) {
productsList.addItem({label:nodes2[i].firstChild.nodeValue});
}
}
View Replies !
View Related
Local Global Storage Settings Panel Wo Internet
I've got an application that is on a box that is NOT connected to the internet. It has no internet connectivity whatsoever. I'm running into an issue where flash is running into a local storage overload. Typically, I'd go to
http://www.macromedia.com/support/do...manager03.html
and set the setting to unlimited, but in this instance, I cannot get to the web.
How do I tell flash to allow unlimited storage settings?
View Replies !
View Related
Allowing Global Security Settings For Local Flash Content
Hi all,
We have developed one e-learning course for our client. This course will be deployed on the CD; that means it will run locally. This CD will be dstributed to thousands of users. In this scenario I am currently suffering from the Global Security Settings issue as this project uses Fscommand to communicate with the javascript. We can set the Global Security mannually but it is not feasible to ask client to mannaully set the Security Settings to "always" as there are thousands of users viewing this course locally.
I have tried setting "always" value to allowScriptAccess property of the Object/embed tag in the html but it does not work where the browser Security Settings are kept as "High".(I think this is the reason)
So what will be the workaround for this issue?
Please reply me if you gone through this problem and found any workaround.
Thanks in advance.
kt_kt
View Replies !
View Related
EXTREMELY URGENT - Creating Global Variables Using Names Of Other Variables...
I have variables xtile and y tile within a movie, and I need to create a global variable that will tell all other movies that this particular movie is situated on tile [xtile][ytile], so I need to know how to create the global variable: _root.objectmovie_xpos_xtile_ypos_ytile = true;
I know how to create global variables, and how to have other movies read them, but how do I actually create a VARIABLE with this name? I tried set ("_root.objectmovie_xpos_" + xtile + "_ypos_" + ytile") = true, but that doesn't work (which I kinda knew already but thought I would give it a shot)
any ideas peeps?
please help, its vital to a project I am doing
cheers all
View Replies !
View Related
Are Global Variables Really Global?
Hi everyone!
This might sound like a dumb question, but i've just been struggling with variables (more specifically global variables) for the last 3 hours, and now that i made it work, i'm wondering if my solution is the "normal" one.
From what i gather, when you declare a _global variable, you can just use it from any timeline without using a path, right? I have a variable (whichHoliday) which i initiate in the first frame of the main timeline, this way:
_global.whichHoliday="";
I want to give a new value to this variable inside a MC on that timeline. The only way i could do it was by using:
_global.whichHoliday="whatevervalue";
Shouldn't i have been able to use only: whichHoliday="whatevervalue" ?
Why did i need to use _global again to set the value?
Thanks for any input!
View Replies !
View Related
[F8] My Global Variables Are Not Global
Hi
I have a problem, my global variables aren't global, as soon as a new timeline is entered the global variable is undefined. (I read somewhere in a forum that it is only possible to use a couple of global variables for F8, could that be correct?)
I use:
if (_global.thing == true){
thing._visible = true;
}
This works for the timeline where true was set and one more timeline, but as soon a third timeline is entered the global value is set to undefined!
What could be the problem?
I am soo grateful for any suggestions!
Thanks!
View Replies !
View Related
My Global Variables Don't Seem So Global
what the hell am i doing wrong!?
heres what i've got:
in my UI class i have this:
#include "ContainerClass.as"
#include "MapClass.as"
#include "ObjectiveClass.as"
#include "SponsorClass.as"
#include "MeasureClass.as"
#include "InitiativeClass.as"
#include "AnalystClass.as"
#include "MilestoneClass.as"
#include "StoryLineClass.as"
#include "CommentsClass.as"
var dbPath = "localhost";
_global.scriptPath = "http://"+dbPath+"/strategymap/scripts/";
then in all of the included files i have something like:
myloadvars.sendandload(scriptPath+"/filestoload.whatever",x,"POST");;
sometimes i just want to break something. grrrrr!
View Replies !
View Related
Global Variables Within MCs
ive used this code on a button:
selectedscene = "begincontactus";
and at the endd of the current scene ive said:
gotoAndPlay(selectedscene);
this works fine when the button is on the main timeline but when i put it wihtin an mc on the main timeline it doesnt work. do i have to use targets for gloabl variables? how?
View Replies !
View Related
Global Variables
ive used this code on a button:
selectedscene = "begincontactus";
and at the endd of the current scene ive said:
gotoAndPlay(selectedscene);
this works fine when the button is on the main timeline but when i put it wihtin an mc on the main timeline it doesnt work. do i have to use targets for gloabl variables? how?
View Replies !
View Related
Global Variables
ive used this code on a button:
selectedscene = "begincontactus";
and at the endd of the current scene ive said:
gotoAndPlay(selectedscene);
this works fine when the button is on the main timeline but when i put it wihtin an mc on the main timeline it doesnt work. do i have to use targets for gloabl variables? how?
View Replies !
View Related
Global Variables
ive used this code on a button:
_root.selectedscene = "begincontactus";
and at the end of the current scene ive said:
gotoAndPlay(_root.selectedscene);
this works fine when the button is on the main timeline but when i put it witin an mc on the main timeline it doesnt work. do i have to use targets for gloabl variables? how?
actually i have five MCs wtihin an MC on the main timline.
there is a button within each of the five MCs. an action on the buttons changes the variable. so ive created the variable first in the main timeline and refered to it from within the buttons' actionscripts. so i created
_root.selectedscene = "empty"
on the first frame of the movie just to create it.
why isnt it working??????????
View Replies !
View Related
|