Ask a Question related to Macromedia Flash Actionscript, Design and Development.
-
sharetop #1
How can I save static data on custom component?
Hello.
Did Flash ActionScript support static variable?
At Frame1, I create a instance of S_List ( Me created custom component),
named "lstOne", user select the 2nd item, (saved at a variable "idxSelected")
, then gotoAndPlay(5), jump to Frame5, do something... then, jump back the
Frame1, the selected value is lost, because the "idxSelected" is a variable of
S_List component. so it be init again when the Frame1 be showed.
So. I move the "idxSelected" var to #initclip...#endinitclip, as a global
variable, IT RUN OK. the selected item is right.
BUT, If I create another instance of S_List, named "lstTwo", at Frame5, and
selected the 3th item of "lstTwo", then back to Frame1, the "lstOne" 's
selected item is changed by Frame5's "lstTwo". because the "idxSelected" is a
global variable.
How can I save the "idxSelected" value to a static field, It don't be init
again and don't be changed by another instance.
sharetop Guest
-
custom component and custom data
what I would like to have: I would like to build a custon component, that is display N times in the application, because there are N tags in an XML... -
Static Data for Localization
I am trying to create a file of localized text values (that are static) to be used in both an ActionScript class and a MXML component. By putting... -
SQL: Inserting data from table1 with static data into table 2
Hi, I'm trying to create an SP in SQL Server 2000 that will read in a load of row values and insert them, along with two static values, into... -
Custom Component and Custom Textbox binding
Hi, I am trying to accomplish the following. Here is what I want to do: 1. Drop a custom business object component onto the design surface... -
Binding to a Custom Component from a Custom Control
I have been experimenting with attaching a component to a custom control as a property. The property grid correctly lists the available... -
PierreAlain #2
Re: How can I save static data on custom component?
look at SharedObject.getLocal(..)
it put the values on the user hard drive.
Z = SharedObject.getLocal("myappname");
if ( Z = !inited ){
Z.data.firstvar = 1;
...
}
--
Pierre Alain
com
"sharetop" <com> a écrit dans le message de
news:c29ekd$1lc$macromedia.com...
"idxSelected")
the
variable of
global
and
is a
init
PierreAlain Guest



Reply With Quote

