AS3 alternatives to _global variable path?
Hi, through out a very old complicated fla there are buttons which set variables using _global paths
such as:
function menu1_2(Event:MouseEvent) {
global.mode = "hide_hotbox";
MovieClip(this).gotoAndStop("stage_1_b");
How can I make the variable "hide_hotbox" and others like it accessible and changeable from any movie clip -- whether they be nested in other movie clips or on the main timeline, etc?
Thank you...(wits end)...extremely appreciated
yes I will
and post the code here
in the meantime, I'm also going to ask as a side note on future threads: how can one keep up with scripting trends and expected actionscript changes?
I just have one, very, very complicated website -- and otherwise work in CG, etc. most of my time...a few times a year I make graphical changes to this website but updating it from AS 1 to AS 2 and now AS 3 has been a heart stopping nightmare...I'm sure, absolutely confident, if and when I have a family and children I just will not be able to keep up this site...I plan to scale it down, but, how can one be sure to write code now which has a chance of lasting? Are there trends and viewpoints within the Actionscript community which one could use to anticipate changes in AS 4. I would have put my code on timelines rather than buttons and named all the buttons when I originally created the site in AS 1 if I had known I'd have to refamiliarize myself with the guts and bolts of this monster horrific site once again. When I am senial, this site is dead...it is taking every neuron I have.
sources used for research thus far:
http://www.uza.lt/codex/as3-global-object/
most elegant:
http://www.kirupa.com/forum/showthread.php?p=2110832
clear:
http://www.websitemediaplayers.com/blog/global-variables-as3/
thanks again
Similar Messages
-
How do I make a variable path in AppleScript?
I'm mass distributing an application, and for the next update I want to add customization. My application currently make a folder in the "Documents" folder. The folder is called "MCL_CONFIG". What I need to do is make a unicode text file in "MCL_CONFIG". Since it's going to be used on many different computers the path to where I'm making the new file has to change depending on the user. How can I make a variable path to a non-directory? Here's the section of my code with the problem:
tell application "Finder"
if folder MCLConfig exists then
else
display dialog "Welcome to Mc Launcher! You will only recieve this message once, unless you delete the MCL_CONFIG folder." buttons {"Ok"} default button 1
make new folder at New_User with properties {name:"MCL_CONFIG"}
end if
end tell
It's not shown but I set the variable MCLCONFIG to (path to documents folder from user domain) & "MCL_CONFIG" as text.
As a side note how do I make the code look like it does in applescript, here?You can do something like:
set supportFolder to ((path to application support from user domain) as text)
set appName to "My Spiffy App"
set subFolder to "MCL_CONFIG"
tell application "Finder" -- add application support folders if needed
if not (exists folder (supportFolder & appName)) then
make new folder at folder supportFolder with properties {name:appName}
make new folder at result with properties {name:subFolder}
end if
end tell
Edit: it is recommended that the folder in Application Support be named with your application's bundle identifier, but most just use the application name. -
Dynamic ORACLE_HOME in env variable PATH not working
Hi,
We have an issue whereby we want the PATH to be dyanmic with respect to the ORACLE_HOME.
Have implemented the solution in 'ORA-12557: TNS:Protocol Adapter Not Loadable' While Running OUI [ID 735400.1 but not working.
We have Windows 2008 R2 server with Oracle 11.2.0.3 client installed.
First when did set to check environment varibales, fouND no env. variable for ORACLE_HOME even though in registry so have set ORACLE_HOME as user env variable.
Have changed system env variable PATH to have %ORACLE_HOME%\bin; at very start
when do PATH to check value shows
literally as %ORACLE_HOME%\bin at start rather than translating to the real physical location as it does with other logical variables.
How can we ensure translates the ORACLE_HOME correctly so PATH is O.K.user5716448 wrote:
Hi,
We have an issue whereby we want the PATH to be dyanmic with respect to the ORACLE_HOME.
Have implemented the solution in 'ORA-12557: TNS:Protocol Adapter Not Loadable' While Running OUI [ID 735400.1 but not working.
We have Windows 2008 R2 server with Oracle 11.2.0.3 client installed.
First when did set to check environment varibales, fouND no env. variable for ORACLE_HOME even though in registry so have set ORACLE_HOME as user env variable.
Have changed system env variable PATH to have %ORACLE_HOME%\bin; at very start
when do PATH to check value shows
literally as %ORACLE_HOME%\bin at start rather than translating to the real physical location as it does with other logical variables.
How can we ensure translates the ORACLE_HOME correctly so PATH is O.K.
open Command Window & issue command belowecho %ORACLE_HOME%COPY the results, then PASTE all back here -
when i am going to Install 11gR2 then thsi error shows how to solve it plz give me guidance
This test checks whether the length of the environment variable "PATH" does not exceed the recommended length.
Expected Value: 1023
Actual Value: 0HELLO iSHAN SHAH
JUST EXPLAIN US YOUR PROBLEM IN DEPTH.
TELL US YOUR HARDWARE AND SOFTWARE CONFIGURATION.
ALSO TELL US IN WHICH STEP OF INSTALLATION , THIS ERROR RAISED.
THANKS
HARSH SHAH -
Environment variable path failed in oracle 11g installation
hi all,
i am reinstalling oracel 11g in my window 7 64 bit machine after i uninstalled it. however, i got an issue that is environment variable path failed in the installation process. this didn't happen when i firstly successfully installed oracle. how can i fix the issue? thanks in advance.
regards,
honguser571093 wrote:
hi,
the problem is i uninstalled oracle 11g in my windows 7 64 bit machine and then try to install it on my machine. during the prerequisite check stage, an error message popped up like this:
environment variable: "PATH" failed
This test checks whether the length of the environment variable "PATH" does not exceed the recommended length. (more details)
Expected Value
: 1023
Actual Value
: 1433
so, what is the reason caused this problem and how to fix it. thanks in advance.
hongI believe the error message is self-explanatory - assuming you you using a supported database and OS combination (which are unknown)
environment variable: "PATH" failed+
This test checks whether the length of the environment variable "PATH" does not exceed the recommended length.+
Expected Value+
*: 1023*
Actual Value+
*: 1433*
Your PATH variable exceeds the limit of 1023 characters
HTH
Srini -
Shorten environment variable path
I am installing Oracle database 10G on Windows XP. I am getting an error message saying 'The value of the environment variable path is more than 1023 characters.' How do I shorten this path, where do I go? thanks
My Computer ( right click) -> property -> Advance -> Environment Variable
Select patch and edit it , remove all not required paths
Virag -
Hi all,
I am installing 11g database in order to play with it. My OS is windows 7 premium edition, personnal PC and I am having that message:
Environment variable: "PATH" - This test checks whether the length of the environment variable "PATH" does not exceed the recommended length.
Valeur attendue
: 1023
Valeur réelle
: 1558
Liste des erreurs :
PRVF-3929 : Adding the Oracle binary location to the PATH environment variable will exceed the OS length limit of [ "1023" ] for the variable on the node "DATAEBULLITION" - Cause: The installer needs to update the PATH environment variable to include the value "%ORACLE_HOME%/bin;". However, doing so will cause PATH to exceed the maximum allowable length that this operating system allows. - Action: Ensure that the sum of the lengths of your current PATH environment variable and that of "%ORACLE_HOME%/bin;" does not exceed the operating system limit. Restart the installer after correcting the setting for environment variable
Is anyone could help me as I don't understand what is PATH and how to reinstall it ?
THank youI found the answer by reading other user question.
-
How to access _global variables in different domain
hi
i am loading a swf in local and this has to be communicate the swf which was in the server(different domain). using the system.security.allowdomail i can access the variables, but i can't able to access _global variable.
Pls tell how to access _global variable in different domain
Thanks in advance
@flashGanesh,
It should work the way you mentioned it. I don't see why it
didn't unless there is a spelling mistake or something. If there
is you should have a got an error message. :-)
I actually don't recommend using globals at all, I would rather
use a PL\SQL Package Specification to define Global Variable.
These variables are valid for the duration of the Session and
they are restricted to Char(255) limit. It reduces the number of
mistakes when converting dates and Such. It also forces the
developers to place all the globals in one place instead of
multiple places. Read Feurstein's book on PL\SQL Programming for
more details.
Sunil
MS Ganesh (guest) wrote:
: Hi Steve,
: I know how to assign values to global variables.
: I did the following
: Form Name : FIRST_FORM
: :global.group_id := 'SUPERVISOR'
: call_form('SECOND_FORM');
: In Second Form
: When New Form Instance
: Message(:global.group_id);
: No message is displayed.
: Please explain to me the steps in detail.
: Thanks in advance.
: Bye
: MS GANESH
: Steve (guest) wrote:
: : Just assign value to global variable i.e.
: : :global.foo := 'anything'; or
: : COPY('anything', 'global.foo');
: : to remove global variable
: : ERASE('global.foo');
: : Note: global variables are always VARCHAR2(255);
: : MS Ganesh (guest) wrote:
: : : Dear OTN Members,
: : : I would like to pass values between forms,
: : : I know it is possible to do it by using Parameters.
: : : But I would like to know how to use global variables to
: : : accomplish the same task.
: : : Thanks in Advance.
: : : Bye
: : : MS Ganesh
null -
_global variable lost outside of function?
Vexing riddle: why are my global variables undefined outside
of the functions that use them?
Loading XML file and creating arrays from the child nodes.
Like this:
var modules:Array = this.firstChild.childNodes;
_global.moduleContents = new Array();
for (var i = 0; i<modules.length; i++) {
_global.moduleContents.push(modules
.attributes.contents);
then I have another function that recursively extracts each
index from _global.moduleContents array and pushes them into a
_global. pageContents array. (see attached code)
I made sure to use _global. in front of all global variables.
The code workd flawlessly in itself. I am able to trace the whole
array or single array indices from within the functions.
But they are undefined outside of the functions! I checked to
make sure there is no local variable of the same names - in every
case I use _global before the variable name.
The crazy part of it is I tried testing some simple functions
with global variables in a new movie to understand the scope issues
and they worked fine!
function messages() {
_global.greetings = ["hello", "hi", "how are you?"];
function sayHi() {
_global.greetings.push("how goes it?");
sayHi();
messages();
trace("this is outside: "+_global.greetings);
Why not in this:Gotcha, what is happening is that you call a loading script
that basically works in the background of other scripting
operations, you can call multiple load actions and they will all
execute at the same time, because you have your trace call after
the load action and you are not waiting for that file to be loaded
you are getting an 'undefined' var.
You may want to put something in at the end of all of your if
(success) statements like
_global.docstructureLoaded = true;
checkLoadStatus();
then say this on your next load function;
_global.pageContentsLoaded =true;
checkLoadStatus();
then in your root area
checkLoadStatus(){
if(_global.pageContentsLoaded==true && .... ){
//when all your loads are done do this ...
Just to make sure that you arn't calling any other functions,
or moving your timeline ahead before your data gets to the right
place. -
Alternative to Substitution Variables
I'm attempting to loop though some logic X number of times based on a user-defined (defined using substitution variable) parameter. Within the loop I need to have user-definable parameter as well. Since substitution variables cannot be used in a loop I'll need an alternative.
Here an example:
accept L_num_recs NUMBER PROMPT 'Enter Number of Records (0-9);
BEGIN
FOR i in 1..&L_num_recs LOOP
parameter1 := &m1
parameter2 := &m2
END LOOP
END;
Because &m1 and &m2 are substitution variables they are bound each time through the loop.
Any thoughts? Thanks!Just assign those subs to local variables and then use the local variables in the loop:
sql>accept l_num_recs number prompt 'Enter Number of Records (0-9): '
Enter Number of Records (0-9): 3
sql>declare
2 v_text1 number := &m1;
3 v_text2 number := &m2;
4 begin
5 for i in 1..&l_num_recs loop
6 dbms_output.put_line( v_text1 );
7 dbms_output.put_line( v_text2 );
8 end loop;
9 end;
10 /
Enter value for m1: 55
old 2: v_text1 number := &m1;
new 2: v_text1 number := 55;
Enter value for m2: 77
old 3: v_text2 number := &m2;
new 3: v_text2 number := 77;
old 5: for i in 1..&l_num_recs loop
new 5: for i in 1.. 3 loop
55
77
55
77
55
77
PL/SQL procedure successfully completed. -
Alternative for session variable in OBIEE Translation
Hi all,
I am working on translating OBIEE reports to various languages. I am using specific xmls for particular language which has entries for translated text.
Now in few of the reports I have case statements/BINs defined in column formula. This 'column formula' content is not a part of xml and hence not getting translated.
One of the solution that i found was use of language specific session variable defined in rpd. When user logins with specific language, corresponding translated text is provided by session variable. This approach was correct and is working fine.
But the problem is in few of my reports there are about hundreds of such case statements and hence thousands of texts to be translated for each particular language. hence it is a cumbersome task to define session variable for each of these column formula. Plus I am not sure about the performance issue that will be there after defining thousands of such session variables.
Is there any alternative available for use session variable in OBIEE translation? Please reply.Hi,
Check if this helps-
http://obiee10grevisited.blogspot.in/2012/05/changing-language-in-obiee-on-fly.html -
[AS3] Crear múltiples variables con un for
A los buenos días!
Llevo tiempo dándole mil vueltas al tema, y no consigo
dar con la
solución....
var foto1:Sprite;
var foto2:Sprite;
var foto3:Sprite;
var foto4:Sprite;
var foto5:Sprite;
var foto6:Sprite;
asi hasta 24, 100 o másss Sprites...
¿Como podría hacer esto mismo con un for en solo
tres líneas?.
Un saludete...
J.R. LeónYa tengo palabras Juan jejeje.
Ya me he caido del olivo, y todo con una sencilla frase de un
compi: que mas
te da tener 100 líneas que 10000 líneas.., mientras
funcione vas bien jeje.
Mi problema es el de siempre soy autodidácta en este
mundo de los 0 y 1, y
en los últimos 6 años, me ha tocado pasar mas horas
discutiendo con el
cliente con que si tal o tal foto, lo que ha llevado a que la
programación
la había dejado un poco aparcada..., pero bueno ahora ya
estoy
recuperándome, y tengo ganas de subir a la red el
proyecto en el que ando,
para que entiendas el porque de tanta "ansina" por ahorrar
líneas jeje.
Un saludete,
J.R. León
"Jose Ramon Leon" <[email protected]>
escribió en el mensaje
news:[email protected]...
> Me has dejado, simplemente sin palabras...
>
>
> "Juan Muro" <[email protected]> escribió en
el mensaje
> news:[email protected]...
>> Hola Hóze: ¿Qué tráeh de
güeno hermano?
>> Pa creal lah múrtipre variableh pues usal un
bucle for in tal que ansina
>> (es que a los extremeños nos han dado una
wikipedia, con dos cohone, la
>> de tonterías que hay que ver. Bueno ya lo
dejo):
>>
>> var i:Number;
>> var mifoto:Sprite=newSprite("foto"+i);
>> for(i=0; i<100; i++){
>> trace("foto"+i);
>> }
>> Ya ves que si cortas y pegas este código en el
primer fotograma y
>> publicas la peli te salen los 100 primeros nombres
de tus variables,
>> ahora bien, una cosa es que estén creadas las
variables y otra diferente
>> es que el hijollasbrón del compilador sepa de
qué tipo son (a pesar de
>> que en la segunda linea le decimos que son sprites y
de que su nombre
>> indica que van contener fotos, ya sabes lo estricto
que se pone), porque
>> el pobre a veces se lía, sobre todo cuando
tenemos varias clases
>> vinculadas o referenciadas, así que es muy
posible, aunque no siempre
>> necesario, que en tu clase personalizada, para
aclararle el tema, debas
>> poner una linea de código más:
>> var mifoto:Class = getDefinitionByName("foto"+i) as
Class;
>> que significa: Oye, mamón, cuando te encuentres
una variable cuyo nombre
>> sea "foto"+i ¡¡¡ES UN SPRITE
VINCULADO COMO CLASE EN LA BIBLIOTECA DEL
>> ARCHIVO FLA, coño ya!!!
>>
>> Salu3 (de AS3)
>> `8¬]
>> Juan Aversitelimpiaslalengua Muro
>>
>> "Jose Ramon Leon" <[email protected]>
escribió en el mensaje de
>> noticias news:[email protected]...
>>>A los buenos días!
>>>
>>> Llevo tiempo dándole mil vueltas al tema, y
no consigo dar con la
>>> solución....
>>>
>>> var foto1:Sprite;
>>> var foto2:Sprite;
>>> var foto3:Sprite;
>>> var foto4:Sprite;
>>> var foto5:Sprite;
>>> var foto6:Sprite;
>>>
>>> ....
>>> asi hasta 24, 100 o másss Sprites...
>>>
>>> ¿Como podría hacer esto mismo con un
for en solo tres líneas?.
>>>
>>> Un saludete...
>>>
>>> J.R. León
>>>
>>>
>>>
>>
>
> -
Environment variable PATH and Sql*Plus
Hi all,
i have a problem with sqlplus.
It might seem not to be able to read the path environment variable.
I need to launch some sqls without typing their path (to put the path i should modify morre than 300 shell scripts), e.g.: @script.sql.
My shell scripts are invoked by the database using java.
Inside the shell scripts we have commands like "sqlplus -silent <login> @script.sql [parameters]"
So if sqlplus is not able to read the PATH environment variable, the command hangs waiting for something to do without the chance to close it.(it is silent).
I run RDBMS v8.1.7 on compaq tru64 Unix.
Can someone help me??
Thanks in advance.
Marco - Milan, ItalyWhere do I set SQL*Plus SQLPATH variable??As every other unix environment variable - either in your profile or in your current shell whatever you like
Is this the PATH where SQL*Plus searches for .sql
files??SQL*Plus searches for your files in your current directory, and then the directories you specify with the SQLPATH environment variable.
SQL*Plus searches this colon-separated list of directories in the order they are listed. -
Hello
i'm using tomcat 5.x -> 5.5.12
and editor: Textpad
when compiling: these are the errors:
C:\Documents and Settings\Michelle & Bastiaan\Bureaublad\261139bl\Controller.java:3: package javax.servlet does not exist
import javax.servlet.*;
^
C:\Documents and Settings\Michelle & Bastiaan\Bureaublad\261139bl\Controller.java:4: package javax.servlet.http does not exist
import javax.servlet.http.*;
^
C:\Documents and Settings\Michelle & Bastiaan\Bureaublad\261139bl\Controller.java:11: cannot find symbol
symbol: class HttpServlet
public class Controller extends HttpServlet
^
C:\Documents and Settings\Michelle & Bastiaan\Bureaublad\261139bl\Controller.java:13: cannot find symbol
symbol : class HttpServletRequest
location: class Controller
public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
^
C:\Documents and Settings\Michelle & Bastiaan\Bureaublad\261139bl\Controller.java:13: cannot find symbol
symbol : class HttpServletResponse
location: class Controller
public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
^
C:\Documents and Settings\Michelle & Bastiaan\Bureaublad\261139bl\Controller.java:13: cannot find symbol
symbol : class ServletException
location: class Controller
public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
^
C:\Documents and Settings\Michelle & Bastiaan\Bureaublad\261139bl\Controller.java:64: cannot find symbol
symbol : class HttpServletResponse
location: class Controller
private void sendPage(HttpServletResponse reply, String s_Resultaat) throws IOException
^
C:\Documents and Settings\Michelle & Bastiaan\Bureaublad\261139bl\Controller.java:16: cannot find symbol
symbol : class HttpSession
location: class Controller
HttpSession session = request.getSession();
^
.\DBConnection.java:10: package javax.servlet does not exist
import javax.servlet.*;
^
.\DBConnection.java:11: package javax.servlet.http does not exist
import javax.servlet.http.*;
^
10 errors
these are my user variables:
JAVA_HOME C:\Program Files\Java\jdk1.5.0_12
TEMP %USERPROFILE%\Local Settings\Temp
TMP %USERPROFILE%\Local Settings\Temp
these are my system variables:
CLASSPATH .;C:\Program Files\Java\jdk1.5.0_12\lib\tools.jar;apache-tomcat-5.5.23/common/lib/servlet_api.jar
ComSpec %SystemRoot%\system32\cmd.exe
FP_NO_HOST_CHECK NO
NUMBER_OF_PROCESSORS 1
OS Windows_NT
Path C:\Program Files\Java\jdk1.5.0_12\bin;apache-tomcat-5.5.23/bin
PATHTEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE x86
PROCESSOR_IDENTIFIER x86 Family 15 Model 2 Stepping 4, GenuineIntel
PROCESSOR_LEVEL 15
PROCESSOR_REVISION 0204
TEMP C:\WINDOWS\TEMP
TMP C:\WINDOWS\TEMP
windir C:\WINDOWS
can somebody help me?
gr. Bastiaan
The NetherlandsCLASSPATH .;C:\Program Files\Java\jdk1.5.0_12\lib\tools.jar;apache-tomcat-5.5.23/common/lib/servlet_api.jarThe second part of that is unlikely to be correct unless you are in a specific directory.
-
[AS3] reference to stage variable from MC
Hi!
At the begining I'm sory for my English ;)
I've been coding in AS2 for a while, but now I decided to try
AS3. The situation is like:
- I've got one Movie Clip on a stage
- I have a code in the 1st frame of the Main Timeline:
var somevar:String = "somevalue"
- I have a code in the 1st frame of the Movie Clip's
timeline:
trace(root.somevar) // error
trace(parent.somevar) // error
How to trace that variable?? The same is with stopping the
Main Timeline's playback.
parent.stop() and root.stop() don't work :(
HEEELLLP MEEE! ;)(use the attach code option to display code in this forum):
Maybe you are looking for
-
In windows 8 how do I print a pdf file I got in an e-mail
In windows 8 how do I print a pdf file I got in an e-mail?
-
Setting Page Size as a Percentage vs. pixels for optimal viewing
Is there a way to set the size of my web pages as percentages so that when viewer open my site, the pages will automatically resize itself to fit the computer on which it is being viewed? Thanks in advance! :)L
-
Verify option on Time Machine Greyed Out
If I hold the option key and click on the Time Machine icon on the top of screen I notice that the Verify option is greyed out. Any ideas?
-
EPM WebAnalysis - bug in color selection dialog
Hello, In WA, color selection dialog does not work (11.1.1.2 and 11.1.1.3 versions). Steps to reproduce bug: 1) Open and login to WebAnalysis 2) Select File -> Preferences 3) Select "SpreadSheet" 4) Click Background color (or any other color selectio
-
Cisco Prime Network 4.0
Hi, Has someone installed Cisco Prime Network on another distribution than Redhat ? I want to install a local demo and I have only RedHat trial. What is the optimal mode of installation Prime Network ? Unit + GW and DB on the same machine?