Is it possible to change fps during runtime? in Flash CS4 (AS3)
hi,
I was wondering if there is a way to change fps(Frames Per Second) during run time using AS3.
is there? if so is it recommended? or is there a way to slow down the execution of the code(like adding a pause?)
Thank you for attributing anything related!
You can use the stage.frameRate property to eadr or set the fps rate during run time. The only way to really pause code from executing is to build the paused code into a function and delay calling that function using some form of a timer (like setTimeout).
Similar Messages
-
Change titles during runtime?
Hi there,
Suppose I have a table in the Field Explorer and all columns have name and HeadingText. Is it possible to change the heading text at runtime in the JRC SDK? How?
Thanks,
PascalIn the designer, create parameter fields of type String, one for each heading that you have.
Remove the heading that you have, and replace with the parameter field.
It's not a pretty solution.
Sincerely,
Ted Ueda -
Changing color of an object on stage during runtime? in Flash CS4 (AS3)
Hi,
I was wondering if there is a way to change the color of an object during runtime. any ideas?
Thank you for helping.you can use the colortransform property of your objects transform property. so, if you have a displayobject mc, you can use:
var t:Transform = mc.transform
var ct:ColorTransform = t.colorTransform;
ct.color = 0xff0000;
mc.transform.colorTransform = ct; -
Can't change string variable values in Flash CS4 Debugger
I'm using the Flash CS4 debugger, and while I can change numeric variable values in the Variables panel, I can't change string variable values. The only characters the fields accept are the numbers 1-9 and the characters "d" and "j".
I can paste strings into the value fields, but that's a bit of a pain. I've tried this on a couple of different Flash CS4 installations and get the same results.
Does anyone know if it's possible to change string values in the Variables panel of the Flash CS4 Debugger?See:
http://forum.java.sun.com/thread.jspa?threadID=591012&tstart=15 -
Right Click Arrange at runtime in code? in Flash CS4 (AS3)
Hi,
I was wondering if and how I can arrange movie clips in AS3 code. I want it to have the same effect as "Right Click > Arrange > Bring To Front" in the project, only during runtime and through code.
Thank you for help and advice!What you can do if you want right click is create a new ContextMenu and ContextMenuItem. You'll have to add a mouse click listener to each of your stage items though so you can track the last one clicked;
import flash.events.ContextMenuEvent;
import flash.ui.ContextMenu;
import flash.ui.ContextMenuItem;
var lastItem:MovieClip;
var i:int;
for(i = 0; i < stage.numChildren; ++i){
stage.getChildAt(i).addEventListener(MouseEvent.MOUSE_DOWN, itemClicked);
function itemClicked(e:MouseEvent):void
lastItem = e.currentTarget as MovieClip;
var rightClickMenu:ContextMenu = new ContextMenu();
rightClickMenu.hideBuiltInItems();
rightClickMenu.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, rightClickMenuClicked);
var bringToFront:ContextMenuItem = new ContextMenuItem("Bring To Front");
rightClickMenu.customItems = [bringToFront];
stage.showDefaultContextMenu = false;
stage.contextMenu = rightClickMenu;
function rightClickMenuClicked(e:ContextMenuEvent):void
switch (e.mouseTarget.label)
case "Bring To Front":
if(lastItem != null){
lastItem.parent.addChild(lastItem);
break;
NOTE: You do not need to first remove the child to add it again. By adding an existing child you're simply resetting it to the top depth. -
Probleme pour changer la langue dynamiquement avec flash cs4
Actuellement , je cherche un moyen simple de changer de langue dans mon swf
je travaille avec flash cs4
bien sur j ai Mylocale.as:
import mx.lang.Locale;
class MyLocale extends mx.lang.Locale {
static function start():Void {
var langCode:String = xmlLang;
currentXMLMapIndex = 0;
xmlDoc.load(xmlMap[langCode][0]);
static function setXMLLang(langCode:String):Void {
xmlLang = langCode;
et les différents fichiers xml dans le répertoire du swf
dans chaînes , j ai coché : "remplacer les chaînes automatiquement lors de l'exécution"
avec donc une langue par défaut ( d'ailleurs je me demande , si le problème ne vient pas de là)
si je coche dans les paramètres de chaînes : "remplacer les chaînes manuellement en utilisant la langue de la scene" ou "remplacer les chaînes via actionscript lors de l'exécution"
mon code ne fonctionne pas.
donc j ai gardé : "remplacer les chaînes automatiquement lors de l exécution"
dans mon animation j ai plusieurs scènes (pages)
p1, p2, p3, p4
dans p1
j intègre une barre de langue
puis 2 calques
Calque--action:
langListener = new Object();
langListener.change = function(eventObj) {
var target = eventObj.target;
var newLang = target.selectedItem.data;
MyLocale.setXMLLang(newLang);
MyLocale.start();
lang_cb.addEventListener("change", langListener);
// Force Japanese
lang_cb.selectedIndex = 1;
lang_cb.dispatchEvent({type:"change"});
Calque--langue ex Fr:
// Forces combobox to have the correct value
on (release) {
var component = _parent.lang_cb;
for (var i=0; i< component.length; i++) {
var item = component.getItemAt(i);
if (item.data == "fr") {
component.setSelectedIndex(i);
component.dispatchEvent({type:"change"});
break;
ex Ja :
// Forces combobox to have the correct value
on (release) {
var component = _parent.lang_cb;
for (var i=0; i< component.length; i++) {
var item = component.getItemAt(i);
if (item.data == "ja") {
component.setSelectedIndex(i);
component.dispatchEvent({type:"change"});
break;
quand je change la langue dans p1 , la langue est modifié pour p2, p3 et p4
cependant , après une navigation dans p2, p3 et p4 ,dès que je reviens sur p1 , la langue par défaut se remet automatiquement , alors que je le l'ai pas changé manuellement.
je ne sait quoi faire pour résoudre le problème
à mon avis , le script ce reinitialise quand je reviens sur p1
y a t'il un moyen de conserver les changements de langues effectués , jusqu'au changement manuelle de la langue ??
mercipour la langue je crois qu'il faut désintaller et ré-installer, c'est long et pénible mais je ne vois pas d'autre solution. pour ré-installer en français, je crois qu'il est possible de télécharger un installeur depuis le site NI, sinon il faut contacter NI et leur demander d'envoyer un CD, à conditions bien entendu d'avoir une license valide.
pour le type de fichier, je ne sais pas, je n'utilise pas ce logiciel.
When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!" -
How can i change the lenguage in adobe flash cs4
i instal the sofware today and i try to do in sapnish but in the end is in english,,,i deleted the sofware from my computer beacouse not space in there,,so now i need to change the lenguage to spanish,,,some one can help me???
thanks
he instalado el programa de adobe flash cs4 por lo visto en ingles,,,sabe alguien como cambiarlo a espanol,,,,he borrado el programa bajado de adobe asi que no lo tengo para poder desinstalar y volver a instalar en espanol,,,me puede ayudar alguien..
graciasThe old-is-gold method: Uninstall the older version, reinstall the newer version.
Alternatively (quicker and happy version),
1. Go to Preferences.
2. Select Language from the left side.
3. Look for "Application Language" dropdown.
4. Select "Choose at application startup".
5. Restart Reader. -
Is it possible to change data during a selection
Hi,
is this possible??
E.g. I've a table with a column "first name" and I want to change each appearance of "xy" with some other value.
I tried it with an update order at the end of the select statement but didn't work.
Anybody some suggestions??
so longWhy are you restricted to select?
You can do this easly using an update.
update mytable
set first_name = replace(first_name,'xy','other_string');
Which would change ALL occurances of xy in every record to 'other_value' -
Dear Friends,
I have procedure to retrieve data from tables, this procedure uses cursor to fetch the records into the required data block.
i need to change the where clause of the query which used to build the cursor during run time based on data will be gathered from another data block. how can i achieve that??
is there any suggestions???
thanks in advance
MohammadHello,
Check Re: Control Block
for changing the WHERE attribute of a block.
In your case, you want to set the WHERE condition for the cursor and this depends on a value or values you get from another block. In this case, it is best to give the user a way to either enter that condition or store the result you get from the other block in a variable and use that variable in your cursor.
You can use a parameter to store that condition and this will be local to the current form. If however you need to get that from another module, then you might need to use a parameter list and you can pass the WHERE condition in there to the module that has your cursor.
Hope this helps. -
Change language during Runtime
Hey,
i have following problem: I use Resourcebundles to internationalize my Java Applet. Now i want to add two Buttons where the user can change the language.
I changed my i18n class to the following code:
public class Messages
private static final String BUNDLE_NAME = "de.mypackage.core.messages"; //$NON-NLS-1$
private static ResourceBundle resBundle = null;
static
try
resBundle = ResourceBundle.getBundle(BUNDLE_NAME);
} catch (MissingResourceException exc)
System.out.println("Can not find the ressource bundle for i18n.");
static void setLocale(Locale locale)
resBundle = ResourceBundle.getBundle(BUNDLE_NAME, locale);
public static String getString(String key)
try
return resBundle.getString(key);
} catch (MissingResourceException e)
return '!' + key + '!';
}When pressing the "english" button following code is executed:
Messages.setLocale(Locale.ENGLISH);
applet.repaint();
applet.validate();But the language doesn�t change :-( What can i do?
Thanks alotBut the language doesn�t change :-( What can i do?I once did it this way: the problem is that all your Components already
had their text set (e.g. JButton.setText(...)) and all those components are
not aware of the fact that you changed your Locale so they don't do
anything.
Therefore I extended all these Swing classes and added an interface:
LanguageListener which gets invoked when a Locale has changed.
The Language listener just extends the PropertyChangeListener.
When the method is invoked the Component sets its text again according
to the now current Locale. It's a bit of work but it pays off ;-)
kind regards,
Jos -
Changing fieldcatalog during runtime in an ALV
Hi All,
I have a requirement like : On selection-screen I have 2 input parameters and 2 pushbuttons namely. After input, if press one of these pushbuttons a pop up will come which is having 2 radio buttons. Based on the selection of the radiobutton, I need to make some of the fields editable in a fieldcatalog. But what my problem is .... whatever I select[Radio Button] the first time only that fieldcatalog is getting displayed. Hope I am clear in explaining my problem.
-SatyaPriyaHi Sathish,
I have used the methods <b>get_frontend_fieldcatalog</b> and <b>set_frontend_fieldcatalog</b> of class cl_gui_alv_grid..
-SatyaPriya -
Hi
I am trying to figure out how to execute code once a button_btn is hit on stage at runtime.
Thank you for help and tips!You can also try to create an event listener for the button itself. (In as2.0 it was onClick or onPress or something to that effect, now I'm not sure what they are syntaxed as but there are event listeners for buttons which "listen" to see if the button has been pressed. Mouse Events are good because it makes sure that the mouse is actually performing the action. Don't know about accessibility with Mouse Events though since you can use a Tab key to direct input of buttons so try the Button event listeners.
-
Change to the runtime the logon language with ABAP
Hello,
I have a question.
Is it possible to change to the runtime the logon language?
With the URL-parameter example it worked.
http://www.****bsp/sap/z_page/default.htm?sap-language=en
But I need this in the event handler with ABAP coding.
thanks Erenyou can either use
CL_HTTP_UTILITY->IF_HTTP_UTILITY~SET_REQUEST_URI
uri = sap-language=FR
or
CL_HTTP_REQUEST->IF_HTTP_ENTITY~SET_FORM_FIELD
name = sap-client
value = FR
or
use
SET LOCALE LANGUAGE 'S'. within your abap coding
Regards
Raja -
Extending enums during runtime
Hey folks,
i have a question concerning enums. Is it possible to extend enums during runtime? For example i have following enum:
public enum MyValues
VALUE1, VALUE2, VALUE3
}is it possible that i have a method for example which adds VALUE4 and VALUE5 to this enum???
Thanks alot.
OhnoNo, it wouldn't make sense.
The point of enums is that the possible values are known at compile time so that you can, for example, use them as switch cases.
If extra values are being added at run time you probably want some kind of Map. -
Switch databases during runtime
Hi
We work with JDeveloper 10g Build 1929 and Oracle 10g as database.
We use JDBC Datasources as Connection Type, which obviously means that the database connection parameters are set via data-sources.xml.
DataSources.xml:
<?xml version = '1.0' encoding = 'windows-1252'?>
<!DOCTYPE data-sources PUBLIC "Orion data-sources" "http://xmlns.oracle.com/ias/dtds/data-sources.dtd">
<data-sources>
<data-source
name="jdev-connection-DB1" username="test1" password="test1" url="jdbc:oracle:thin:@test1:1521:test1" inactivity-timeout="30"/>
<data-source
name="jdev-connection-DB2" username="test2" password="test2" url="jdbc:oracle:thin:@test2:1521:test2" inactivity-timeout="30"/
</data-sources>
In my application I have an applicaiton module named "TestAM". During runtime, I want the TestAM to be connected to "jdev-connection-DB1" for some time and I want to switch to "jdev-connection-DB2" for some time.
Is it possible to switch databases during runtime?
Thanks
ShobaHi
I used dynamic JDBC credentials in my application (i.e.) user enters the username and password for the database before entering into the application.
I was using "JDBC data source" as Connection Type. But dynamic database credentials did not work. But it worked for the Connection Type "JDBC url".
But if I have the connection type as "JDBC URL" and if I use
Configuration.createRootApplicationModule
in my code I get the following error:
oracle.jbo.JboException: JBO-29000: DB Connection Failure
at oracle.jbo.JboException.<init>(JboException.java:343)
at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:1772)
at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:2611)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:441)
at oracle.jbo.http.HttpSessionCookieImpl.useApplicationModule(HttpSessionCookieImpl.java:230)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:411)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:406)
at oracle.jbo.client.Configuration.getApplicationModule(Configuration.java:1505)
at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1463)
at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1435)
07/09/20 12:54:19 JBO-30003: DB Connection Failure
at com.dags.view.controller.PageAction.changeApplicationUserContext(PageAction.java:429)
at com.dags.view.controller.PageAction.processComponentEvents(PageAction.java:192)
at oracle.adf.controller.struts.actions.DataAction.processComponentEvents(DataAction.java:430)
at oracle.adf.controller.lifecycle.PageLifecycle.handleLifecycle(PageLifecycle.java:126)
at oracle.adf.controller.struts.actions.StrutsUixLifecycle.handleLifecycle(StrutsUixLifecycle.java:70)
at oracle.adf.controller.struts.actions.DataAction.handleLifecycle(DataAction.java:222)
at oracle.adf.controller.struts.actions.DataAction.execute(DataAction.java:153)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:239)
at com.dags.view.admin.DynamicJDBCBindingFilter.doFilter(DynamicJDBCBindingFilter.java:31)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:669)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:340)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
at java.lang.Thread.run(Thread.java:534)
So, if I have the connection type as "JDBC url", then dynamic database credentials works, but "Configuration.createRootApplicationModule" doesn't work.
if JDBC data source, then dynamic database credentials doesn't work, but "Configuration.createRootApplicationModule" works.
Has any one faced the same issue?
Please help....
Thanks
Shoba
Maybe you are looking for
-
Hello I need to rute a message from my mainframe system to SAP via XI. The message has already got the right format so no mapping is needed. How can I do this, the smartest way? Thank You /Thomas
-
Exporting a doc as word document
when i save a file as a word document i get this error : what can i do?
-
I have a locked simm and it wants the puk code where do you find that at
See this for possible help... http://www.att.com/esupport/article.jsp?sid=33534&cv=820
-
How to install new font on safari for windows??
i have problem when i go to certain international sites.. for eg: http://www.deepika.com/ in the help section the site provides the required font mlkr0ntt_TTF.ttf no luck just wont work..
-
Error using migration assistant and time machine
Daughter dropped water on our old macbook pro. Got a new one and trying to restore using backups to our time capsule, but we are receiving this error using the migration assistant: "Make sure that all of your network devices are connected and turned