Referring to instance names with variables
I have the following problem. I have two movie clips with the
instance
names inst01 and inst02.
I have the code :
_root.inst01._alpha += 10;
Now sometimes I would like it to be for "inst01" and others
"inst02".
Is there a way that I can just say set a variable like :
currentinst = "inst01"
or
currentinst = "inst02"
And then write the code as:
_root.currentinst._alpha += 10;
Would this work, how would Flash know whether "currentinst"
was an
instance name or a variable name?
THANK!
Tim
Thanks!
I had actually just figured it out, I have to use the array
brackets,
thanks so much!
In article <ess33h$d73$[email protected]>, "David
Stiller"
<[email protected]> wrote:
> Tim,
>
> > Is there a way that I can just say set a variable
like :
> >
> > currentinst = "inst01"
> > or
> > currentinst = "inst02"
>
> There is.
>
> > And then write the code as:
> > _root.currentinst._alpha += 10;
>
> The problem with that, as is, is that the variable
currentint currently
> refers to a string, and the String class has no such
property as _alpha.
> You need to "translate" that string into an actual
object reference, and
> there are two ways I know of to do that, both described
here.
>
>
http://www.quip.net/blog/2006/flash/actionscript-20/reference-objects-dynamically
>
>
> David Stiller
> Adobe Community Expert
> Dev blog,
http://www.quip.net/blog/
> "Luck is the residue of good design."
Similar Messages
-
Get current SQL instance name with PowerShell
Hi all,
I'm preparing SQL agent job that will backup all jobs on SQL server. Main step is PoswerShell script. I want that job to be universal for all servers. The first parameter that I need to send to script is instancename.
I want to use variable as InctanceName parameter. So, when I run this job on particular server this variable must get current SQL instance name.
I can use $env:computername for default instances but I cannot use it with named instances or with clustered instances. Some solutions like using 'HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL' keys won't work because of number of
instanses can be running on one machine.
How to get only current SQL instance name?Hi,
Thank you for your answers.
I found this solution:
$serverInstance = "$(ESCAPE_DQUOTE(SRVR))"
Working perfect. -
Pass symbol instance name to variable
Hi all,
I'm trying to figure out how to pass the instance name (ID) of a clicked object to a variable so I can navigate to a label on the timeline with the same name.
So far I've tried different variations of:
sym.getSymbol() //logs as "undefined"
sym.getSymbolTypeName // logs the symbol name in the library, not the instance
Any ideas?
Thanks
-DaveSweet!
That worked - Thanks! I ended up combining both your suggestions. on the button symbol i have
sym.getComposition().getStage().onClick(e.target.id);
and then after compositionReady I added a function to split out the second name and logged it to test;
sym.onClick = function(targetId){
var names = targetId.split("_");
console.log(names[1]);
Works perfectly! - Although it would be nice if the EA team could fix that functionality in future releases so e.target.id gives you just the id for the selected symbol. I would think if you can write something like getSymbol("mySymbol") it should be just as easy to get that name without all the extra (Stage...etc)
Thanks again!
-David -
AS 3:calling all instance names with similarities
As the title suggests I am looking to RegExp as a means to
find similiarities between diffferent movieclip instance names. I
have many clips that have an instance name that begins with "step"
that reside on the maintimeline. The logic written out should be:
If a movielcip exists on the timeline, whats its name, does
it have this string within its instance name, if so do this.
Unfortunately my code does not accomplish this quite
yet.I'd think this would be the same in 3, but in 2 you'd use
array access
notation like so:
var myIndex = 3;
this["step_" + myIndex].moveUp();
this would call moveUp within step_3. You can interate
myIndex in a loop, of
course, to call the function in a group all at one time.
Dave -
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/ -
Creating folder names with variables in applescript?
im trying to make folders and name them with structured names but im getting an error and im not sure what im doing wrong.
the error i get is:
Finder got an error: Can’t make "/Users/USERNAME/Desktop/Fake Server/Project Name" into type item.
----------------------these variables are just used for my example, the actual script asks for input and makes that into the variables -------------------
set the_folder to "Macintosh HD:Users:USERNAME:Desktop:Fake Server"
set theChosenOne to "Selected"
set Code to "ABCD"
set Number1 to "12345"
set projLocation to (POSIX path of the_folder & "/" & theChosenOne)
set folderTags to Code & " " & Number1
tell application "Finder"
make new folder at projLocation with properties {name:folderTags & " artfile"}
end tellThe following should work:
set the_folder to "/Users/USERNAME/Desktop/Fake Server"
set theChosenOne to "Selected"
set Code to "ABCD"
set Number1 to "12345"
set projLocation to POSIX file (the_folder & "/" & theChosenOne)
set folderTags to Code & " " & Number1
tell application "Finder"
make new folder at projLocation with properties {name:folderTags & " artfile"}
end tell
Message was edited by: Pierre L. -
Instance names with Oracle Parrallel Server (OPS)
Hi. I was "reviewing" an Oracle 8 OPS implementation and I noticed that the instances on both nodes have the same name. In another word, the instance on node 1 is named I1 and the instance on node 2 is named I1. While the system appears to work, during a failure of one instance, both instances fail. Does this make sense? Has anyone else had a similar experience? Does anyone know of the possible effect of having the same name.
The clients are weblogic applications using the thin-driver.
Any help you can give me would be appreciated.Hi,
While the system appears to work, during a failure of one instance, both instances fail. Does this make sense?As per OPS architecture point of view,both instance should be have different name.
and failure of one instance doesn't effect on other availability and other should be up and running ,that is the true menaing of high availabilty in OPS.
again check ur configuration,verify ur parameters in init.ora file is configure properly or not.
also check alert log files of both instance.and put different name of each instance.
**instance_number should be different on both instance
Kuljeet -
Adding a variable an instance name
i have a variable that is my flash movie is retreiving (well,
hopefully....i'm having troubles with the
loadVariables)....anyweezer, the variable is named "id". i would
like to add the value of this variable to then end of a text string
and then use it as reference to an instance name.
for example, i have movie clip with an instance name of
TTMO110333. if the ID variable had a value of 110333, how could i
use that in actionscript to allow me to refer to the latter part of
the instance name with the variable?
something to the effect of....
on(rollOver) {
this."TTMO"+id._visible = true;
}thanks for your help, but neither solution is working for me.
i think it may be because i'm using this in a function for a movie
clip, to make it act as a button. i am also having problems getting
getURL() to open a blank page inside a function for a movie clip
like this as well. is there something i need to do differently if
i'm trying to apply this to a movie clip? here's my AS....
this.loadVariables("linkCCdisplay.php","POST"); //this gets 3
variables: url1, title1, and id1
TTbutton1.onRelease = function() {
TTbutton1.getURL(url1, _blank);
}; //the "blank in this doesn't work, it goes to the url,
just not in a new window
TTMO110333._visible = false; //this refers to a movie clip
that is on the same stage with an instance name of TTMO110333
myInterval = setInterval (TTMO,15);
function TTMO () {
TTMO110333._x -= (TTMO110333._x - _xmouse)/10;
TTMO110333._y -= (TTMO110333._y - _ymouse)/10-2;
TTbutton1.onRollOver = function() {
this["TTMO"+id1]._visible = true;
} //this refers to a movie clip with an instance name of
TTbutton1, i would like to make the clip visible only while the
mouse is over the movie clip i'm trying to get to act as a button
any ideas on how to solve these problems? thanks again for
your time. -
Accessing a movieclip instance created with AS.
If I attach a new movie clip and give it a name by concatenating the instance name with a variable number (such as "myMovie + myVar" so that I get "myMovie1", "myMovie2", etc.), how do I then access the resulting instance in order to assign properties? MyMovie + myVar._x = 500 not surprisingly doesn't work. I presume I need to assign the value to a string variable, and then somehow assign that variable as the instance name of the movieclip?
Thanks.that's incorrect syntax and contains a typo. try:
var myVar:Number = 1;
this.attachMovie("Square_mc","Square_mc"+myVar,this.getNextHighestDepth()) ;
this["Square_mc"+myVar]._x = 300; -
Is it possible to use internal table field name as variable?
data : temp_string(10) type c.
data : result type string.
temp_string = 'field1'.
loop at itab1 into str1.
result = str1-temp_string. "error here"
endloop.
HI.
think this code not executable and actually fail to compile.
is it possible to put structure field name with variable?
anyone can help me ? please
thank you.
Regards
BaeYou may use of COMPONENT of your structure.
FIELD-SYMBOLS: <F>.
ASSIGN COMPONENT I OF STRUCTURE F TO <F>.
To find index of component you may use
DESCRIBE FIELD f INTO td.
(But SAP beware us)
Regards -
Using a variable in an instance name
Hey all,
Simple question:
I'm trying to use a variable to call on different instance names:
var picCaller:uint=2;
material_mc.addChild(pic_""+picCaller+"");
The code in red is the issue in question. In this example, I'm trying to add a child called "pic_2", with the number two called from the variable "picCaller"
Any assistance is greatly appreciated.
Thanks!Just for context, here is what I'm trying to do:
I have jpegs in my library and I want to add them to the stage when they're needed, so just to add one image, here is the code I have:
var pic_1=new pic1(0,0);
var image_1:Bitmap=new Bitmap(pic_1);
material_mc.addChild(image_1);
I want to put the above into a loop so that I dont have to repeat those three lines for every image in my library like so:
var pic_1=new pic1(0,0);
var image_1:Bitmap=new Bitmap(pic_1);
var pic_2=new pic2(0,0);
var image_2:Bitmap=new Bitmap(pic_2);
var pic_3=new pic3(0,0);
var image_3:Bitmap=new Bitmap(pic_3);
var pic_4=new pic4(0,0);
var image_4:Bitmap=new Bitmap(pic_4);
var pic_5=new pic5(0,0);
var image_5:Bitmap=new Bitmap(pic_5);
var pic_6=new pic6(0,0);
var image_6:Bitmap=new Bitmap(pic_6);
var pic_7=new pic7(0,0);
var image_7:Bitmap=new Bitmap(pic_7);
the variable "picNum" is the total amount of images that in the library, each one exported as "pic1", "pic2", "pic3" respectively.
var picNum:uint=7;
var picCaller:uint=1;
var picMC:MovieClip = new MovieClip();
picMC=this["pic_"+picCaller];
for (var i:int = 1; i <= picNum; i=i+1)
var "pic_"+i = new image_i(0, 0);
var image:Bitmap = new Bitmap("pic_"+i);
Thanks so much for your help. -
Hello there,
I was trying to install various "Atheros AR5007EG Wireless Network Adapter" drivers, with versions ranging from 2007 to 2010, both from the manufacturer and specifically for this computer (a Fujitsu Siemens Esprimo Mobile) and others from here:
http://www.atheros.cz/atheros-wireless-download.php?chipset=22&system=3
All of them are for Windows Vista 32bit.
The computer had previous drivers installed and working, but also had a network problem. In the process of figuring out what was causing it, I tried to install newer drivers to see if that was the problem. It turns out the network problem was due to a different
thing that is now fixed (some dependencies of the WLAN Configuration service were turned off), but I'm still stuck installing the new drivers.
TL;DR:
However, every time I install new drivers, after install, Windows says that
"The device instance name is invalid", regardless of what drivers I install. I even tried to install drivers for different hardware in that slot just to see what it told me and IT STILL gave me the same error. I also tried to uninstall the
current driver, checking the box to delete the driver's software, running CCleaner and then deleting
"athr.sys" from the Windows/Drivers folder and
"oem8.inf" from Windows/Inf as those files were referenced in the driver's properties. The install still gives me the same error.
The fact that it gives me this error with any driver leads me to believe it's Windows' fault and not the driver's.
Note: I am translating from the original in Portuguese. "The device instance name is invalid" is the closest/correct translation and seems about right with the info I find online regarding the english version of Vista and how it refers to devices.
This (https://groups.google.com/forum/#!topic/microsoft.public.development.device.drivers/yFa_XnlcLJQ) and this (http://finderr.net/windows/pt-PT/O-nome-da-inst%C3%A2ncia-do-dispositivo-%C3%A9-inv%C3%A1lido-/2082573452) also seems to confirm that, though it
doesn't help me. It may be that the text is actually different in english Vista but I also searched for driver instead of device or stuff like "The device instance name appears to be invalid" and can't find anything either.
I also did SFC /SCANNOW a while ago and it found no errors. I then repeated it again after this problem and this time, SFC found errors BUT it couldn't repair all of them. Here is the CBS log:
https://www.dropbox.com/s/bayum2rsezxpmre/CBS.log
Thank you for the help!
EDIT: The Notebook model is a Fujitsu-Siemens ESPRIMO Mobile V5535 and their support drivers can be found here (after specifying the OS and model):
http://support.ts.fujitsu.com/download/ShowFiles.asp
EDIT2:
The last SFC /scannow scan repaired everything left to repair. The system restore option can't be used because the earliest one still has the (suposedly faulty) drivers installed.
This computer has a Win Vista serial number, but no CD and the second partition doesn't have any kind of backup. The second partition is empty though. So, as a last resort, if I really don't have a choice, I'll try to do an upgrade install to see if that fixes
it and if that still doesn't fix it I'll have to move everything in the users folder to the second partition and format the first which is a bummer :/
EDIT: Here is the setup.api.log that was inside C:\Windows\Inf and details the instalation process of all the drivers:
https://www.dropbox.com/s/tyxs1e4r7rxofch/setupapi.dev.log
I'm still trying to read into that setup.api.log file.So, can I assume that the only way to fix this error is to download an iso of Windows Vista, unninstall my service packs, upgrade install Vista, run Vistalizator to change the language to Portuguese and then install Service Pack 1 & 2?
EDIT: Alright, so I formatted the thing since the driver bug wouldn't give me a break. The details on that can be found searching for the same thread title either on tomshardware or vistaforums if anyone happens to find this looking for the same error.
I have a real knack for bumping heads with errors that nobody else gets that somehow turn into unfixable bugs. At least if someone else searches for this problem they'll know what to do. -
Email subject line with Alert unique Identifier,host name, instance name
Is there any way that i can set the following information in the notification email subject line,
Alert Unique Category,
Host name,
instance name.
Please advise.
Thanks.Yes I did look under the email customization section. But i am unable to get how to place alert Unique ID with in the subject line as i don't see any variable to place under it.
Please advise.
Thanks. -
Simple math and a variable in an mc instance name
i have several movie clips with instance names in the format
of screened1, screened2, screened3, and so on. i am trying to
reference a movie clip as shown below, but it's not working. what
am i doing wrong? how do i fix it?
this.screened[numOfItems-8].transform.matrix = F1toP0;
the transform, matrix and all of that works fine. but when i
add the information between [ ] to make reference to the movie clip
instance name, no go. numOfItems is a number, and when run trace on
it.... it does return a value in the output.right on. my favorite flash genius. thanks again!
-
We supply our software package that also includes the unattended installation (with /QS and so on) of SQL Server R2 Express (with SP2).
The setup works good in about 99.9% cases, but one customer complained that after the "successful SQL Sever installation (at least, it looked so!) he could not open the supplied database getting some strange error messages...
After some months of trial-n-error attempts we are now able to reproduce the problems this custumer had. But we cannot find the reason of the problem.
So the test computer is a virtual machine with Windows 7 + sp1 32-bit.
Among the programs/tools installed on this machine there were (in the following order):
SQL Server 2008 Express - the default SQLEXPRESS instance
SSMS
VS 2010 Pro (German)
SQL Server 2008 Express R2 (with SP 1 or SP2 - ?) - the default SQLEXPRESS instance
Then some of them were uninstalled in the following order:
SQL Server 2008 Express
SSMS
SQL Server 2008 Express R2
Now we tried to install (in normal mode with UI) the SQL Server 2008 Express R2 with SP2.
When we chose the default SQLEXPRESS instance - it failed with the following info:
Configuration status: Failed: see details below
Configuration error code: 0x7FCCE689
Configuration error description: External component has thrown an exception.
and the Detail.txt file contained the following:
2015-01-20 10:44:09 Slp: External component has thrown an exception.
2015-01-20 10:44:09 Slp: The configuration failure category of current exception is ConfigurationValidationFailure
2015-01-20 10:44:09 Slp: Configuration action failed for feature SQL_Engine_Core_Inst during timing Validation and scenario Validation.
2015-01-20 10:44:09 Slp: System.Runtime.InteropServices.SEHException (0x80004005): External component has thrown an exception.
2015-01-20 10:44:09 Slp: at SSisDefaultInstance(UInt16* , Int32* )
2015-01-20 10:44:09 Slp: at Microsoft.SqlServer.Configuration.SniServer.NLRegSWrapper.NLregSNativeMethod Wrapper.SSIsDefaultInstanceName(String sInstanceName, Boolean& pfIsDefaultInstance)
2015-01-20 10:44:09 Slp: Exception: System.Runtime.InteropServices.SEHException.
2015-01-20 10:44:09 Slp: Source: Microsoft.SqlServer.Configuration.SniServerConfigExt.
2015-01-20 10:44:09 Slp: Message: External component has thrown an exception..
2015-01-20 10:44:09 Slp: Watson Bucket 1 Original Parameter Values
2015-01-20 10:44:09 Slp: Parameter 0 : SQL Server 2008 R2@RTM@
2015-01-20 10:44:09 Slp: Parameter 1 : SSisDefaultInstance
2015-01-20 10:44:09 Slp: Parameter 2 : SSisDefaultInstance
2015-01-20 10:44:09 Slp: Parameter 3 : System.Runtime.InteropServices.SEHException@-2147467259
2015-01-20 10:44:09 Slp: Parameter 4 : System.Runtime.InteropServices.SEHException@-2147467259
2015-01-20 10:44:09 Slp: Parameter 5 : SniServerConfigAction_Install_atValidation
2015-01-20 10:44:09 Slp: Parameter 6 : INSTALL@VALIDATION@SQL_ENGINE_CORE_INST
When we chose some other instance name then the installation has completed successfully.
So the questions are:
What could be the reason of the problem (and only for SQLEXPRESS instance that was earlier installed and then uninstalled)? I will provide the complete Detail.txt file if needed.
How could we check (if we could) the conditions so some name would be allowed as an instance name for SQL Server installer to success?
With the best regards,
Victor
Victor NijegorodovThank you Lydia!
Unfortunately the simple check the registry
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL does /did not work in our case since there is no any instance
name there,
However there seem to be some "rudiments" under
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall and/or HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services.
So I will now try to check the subkeys of these two keys as it was mentioned by Xiao-Min Tan.
Best regards,
Victor Nijegorodov
Victor Nijegorodov -
Problem with variable name in ZXRSRTOP include (virtual KF)
Hi all,
I am coding a routine to use a virtual key figure in the BEx.
I have just a little problem with the name of a variable:
as explained in the documentation, I created the variable with the prefix G_POS_, the name of the infocube and the name of the infoobject all together:
DATA: G_POS_BC_ST_003_C_DIV__C_COMPAR type i.
The problem is that this variable name is longer than 30 characters, so the system doesn't accept it.
Is there a workaround, other than changing the name of the infoobject (which is a navigational attribute)?
Any help would be appreciated.
LoïHello Marc,
I understand that I have to use a concatenate function and a dynamic call of the variable with (variable) instruction, but i do not understand how to implement it.
the infocube name is BC_ST_003
the characterisdtic name is C_DIV__COMPAR
So, in the include ZXRSRTOP the statement
DATA : G_POS_BC_ST_003_C_DIV__COMPAR
does not work due a length problem (see first post)
But in the same include the statement
+DATA: l_global_name type c.
concatenate 'GPOS' 'BC_ST_003' 'C_DIV__C_COMPAR' into l_global_name separated by '_'.+
drives to the following error : statement is not accessible.
Could u please provide me with an example of the code in the include ZXRSRTOP, and in the include ZXRSRZZZ for the use of this variable.
Thanks in advance.
Loï
Maybe you are looking for
-
Tabs created with CMFCTabCtrl::STYLE_3D style didn't display the whole tab labels
Hi, We use tab controls with multiple tabs created with CMFCTabCtrl::STYLE_3D style, but the tab labels are not displayed completely. For instance, the label should be "Process Control", but the tab header shows only part of it ""Process C...". How c
-
(Firefox 8) cannot display home page without explicitly typing into address bar (not at start-up and home button doesn't work either). Also, cannot see tabs at all (enabled or disabled). Any suggestions?????
-
Why is the web page not saving in bookmarks even though I am clicking the "star" icon?
I click the "star" to save to bookmarks. I then go to the icon to sort the book marks. Nothing is there. I have followed all instructions. This is very frustrating.
-
Error code not found in online documentation!
Hi, I just tried searching for error code ORA-39151 in Oracle 10g and 11g documentation and there were no hits. I was trying to find the meaning and actions for this error code which was posted in forums. http://www.oracle.com/pls/db102/search?remark
-
i've attached a picture similar to what i saw on my CLAD (I passed...yay!) and was curious what the answer was. Its a property node and asked what order does it execute in choices were along the lines top down bottom up they all happen at the same ti