A question about action script 2

hi all , i do a game with as2 (its an escape game) i have stuck somewhere in as 2. if u help me i will be glad.İ am begginer at flash yet pls help
i use this code for i take the item to my inv:
its object code in my inv:
onClipEvent (load) {
            this.tabEnabled = false;
            this._visible = false;
            orig_x = this._x;
            orig_y = this._y;
on (press) {
            this.startDrag();
on (release) {
            this.stopDrag();
            this._x = orig_x;
            this._y = orig_y;
if (eval(this._droptarget) == _level0.yuk) { 
                        _global.lantern = 1;
                        this._visible = false;
  _level0.gotoAndStop(5);
its normal object code:
onClipEvent (load) {
            this.tabEnabled = false;
            if (_global.lantern == 1) {
                        this._visible = false;
on (release) {
            _global.lantern = 1;
            this._visible = false;
            _level0.lantern_inv._visible = true;
problem is that my objects doesnt show everyframe in my inventory.
e.t.c. in frame 1:i take object to my inventory but in second frame:it doesnt show in inventory i wanna player can take object his inv and use it other rooms in my game  didnt able to solve the prob. with layers if u help me i will be glad.
(sorry for eng)

i solved problem with that:
i used variables and after that i dont see two times to my objects at any frame.Coz variable was work.i did keyframes my all frames at layers.Last time i deleted my objects from other frames
finally:i take one object from 1st frame , use it at 3th frame.Works for now thanx for help
if i paste my codes to timeline it says:this codes only work for movie clips e.t.c. problem solved for now i hope.
i like you all ! alwayz need your help

Similar Messages

  • Question about calculation script 'Fix'

    Hi Guys,
    I have a question about calculation script 'Fix'. Below is the sample for my question:
    Dimension 'Period' has members '2009','2010','2011'. We want to Fix the data which 'Period' is not '2009'.
    From Database Administrator's Guide we could use @NOTEQUAL, but version 11.1.1.3.0 seems not support @NOTEQUAL.
    Actually, the dimension is dynamic so we cannot use the way fixing other memebers. What should I do for this requirement?
    Edited by: 842270 on Apr 24, 2011 7:29 PM

    842270 wrote:
    Hi Guys,
    I have a question about calculation script 'Fix'. Below is the sample for my question:
    Dimension 'Period' has members '2009','2010','2011'. We want to Fix the data which 'Period' is not '2009'.
    From Database Administrator's Guide we could use @NOTEQUAL, but version 11.1.1.3.0 seems not support @NOTEQUAL.
    Actually, the dimension is dynamic so we cannot use the way fixing other memebers. What should I do for this requirement?
    Edited by: 842270 on Apr 24, 2011 7:29 PMYou can use @Remove command to avoid 2009.
    @REMOVE
    Removes values or members in one list from another list.
    Syntax
    +@REMOVE (list1, list2)+
    Parameter     Description
    list1
    +     A list of member specifications, from which the members specified in list2 are removed.+
    list2
    A list of member specifications to be removed from list1.

  • Question about multiple Script declarations

    I'm reading Flash Builder 4 and Flex 4 Bible.
    On page 121 it states:
    "Any particular <fx:Script> element can contain nested ActionScript or use the source property to link to an external Actionscript file, but it cannot do both at the same time. You can, however, have as many <Script> declarations in a single MXML file as you need>"
    My questions are about the last sentence.
    1)  They specifically used <fx:Script> and <Script>. Are these two different entities?
    2)  I've never seen examples of using multiple <fx:Script> declarations in a project. How would this work?
    3)  Are they promoting bad practices by making this claim?
    Thank you
    Kristin

    Although multiple script tags are allowed, I'd guess that they're not commonly used.
    Gordon Smith
    Adobe Flex SDK Team

  • Question about simple script?

    Hello,
    I would like to write a small program/script and am looking for advice on how to do so. I do not have a preference about which method or language to use, hopefully looking for the simplest way to do this (if it works with Windows or DOS command line this is
    preferable).
    I have a program that runs on text files e.g. "program file1.txt file2.txt"
    I have 20 folders that each have 5-10 text files. I want to automatically get the name of the largest size text file from each of the 20 folders, and then run the program on these 20 files as described above.
    Ideally I could point my script to a folder, and it will automatically find the largest .txt file in each of the subdirectories and run "program file1.txt file2.txt file3.txt ..."
    Any ideas on how to most efficiently accomplish this? Ideas or links to tutorials if applicable are helpful.
    Thank you

    Yes this is very helpful, thank you so much. I have a couple of questions:
    What I am doing is actually running a perl wrapper that calls a java program, so my command looks something like this and it works fine if I enter multiple full path file names without quotes:
    perl Program C:\Folder1\Subfolder1\file1.txt C:\Folder1\Subfolder2\file2.txt C:\Folder1\Subfolder3\file3.txt
    The script as you described above does exactly what I am hoping for. For the $Path variable, I would like to either
    1) have this script begin from the directory that is it run from so if I copied it to C:\Folder1\ then it would run the command as shown above, or
    2) allow for a parameter to be passed to it with the path of the directory to begin from e.g. "powershellscript.ps C:\Folder1"
    How would I go about doing this?
    So I believe the last line of this script would be:
    perl Program ($Results -join " ")
    Does this make sense? If so I will give it a try. Thanks again.

  • Question about unix script

    Hi all,
    I know this is not the question for this forum but in case :)) if somebody knows.
    I have a shell script to run this completely I need to enter two times if I run it mannually. Now I want to automate that script and want to call that script from another script. Will anybody tell me how to automate 2nd carriage RETURN.
    Thanks in Advance
    Aqil

    > It doesnot give me any error but it doesnt work.
    When I asked "Does that work?" I meant does that approach work in general? i.e. can you ever have a background command as the subject of a here-document construction? I don't see how that could work, because once the command is kicked off in background in a separate process, how can you feed the rest of the input to it? It would make more sense to write
    needcarriagereturn.sh <<END
    END
    ) &or
    function runmyscript
              needcarriagereturn.sh<<-END
              END
    runmyscript &or perhaps
    echo | needcarriagereturn.sh &Message was edited by:
    William Robertson
    Ignore the ">" character in the middle example. The forum software adds it for some reason.

  • Question about using script library

    Dear Mavens,
    I am writing a script that has lots of predefined text items because it deals with reprocessing certain javascript files.
    Here is an example from the beginning of the script (with the actual javascript code mangled because it seems to mess up the display):
    set sdinTXTcf_imgsrc to "<i_mg src=dfaasfaf"<P>
    set sdinTXTcf_onload to " onLoad="p_arent.frames[1].readystate(sfsafasfads"
    set sdinTXTcf_inBetween to "</d_iv>');
    } else {
    parent.frames[0].document.write('<div align="c_enter"><img src=\""
    this section is now getting quite long and I thought of putting it into an external file. What I was hoping to do is to load all these "set this to that" commands into my script then use them as if they had been defined in it.
    The following is a toy script to demonstrate my problem.
    I wrote a mini library which ilooks thusly:
    set var1 to "VAR1"
    set var22 to "VAR22"
    set var333 to "VAR333"
    Then a mini script that calls the mini library:
    load script file "whatever:toylib.scpt"
    get var1
    The result is
    tell current application
    load script file "whatever:toyscript.scpt"
    set var1 to "VAR1"
    set var22 to "VAR22"
    set var333 to "VAR333"
    "The variable var1 is not defined."
    setting up var1 as global does not help either, either in the scrip or in the library
    Now, I can set up the mini library script as a subroutine to be called, such as
    on toy()
    set var1 to "VAR1"
    set var22 to "VAR22"
    set var333 to "VAR333"
    return {v1:var1, v22:var22, v333:var333}
    end toy
    and in the main scipt I can do a
    set loaded to load script file "whatever:toylib.scpt"
    tell loaded
    set var1 to v1 of toy()
    end tell
    get var1
    which works but it is actually more cumbersome than simply having to scroll down dozens of lines of code on the top of the script.
    I'm sure I'm missing somethig here, your help will be appreaciated
      Mac OS X (10.4.8)  

    Hi Asu,
    There are several ways to do this. The easiest is to
    use properties. Your script library might look like
    this:
    property var1 : "VAR1"
    property var22 : "VAR22"
    property var333 : "VAR333"
    You might load it and get values like this as an
    example:
    set f to choose file -- the script to load
    set s_lib to load script f
    var22 of s_lib
    Note that this is not the only syntax.
    When you do things like 'set' in the script library,
    you need to run the loaded script or subroutines
    within it.
    gl,
    It worked. THANKS!

  • The Problem About Action Script..

    When i published the fla document on adobe flash cs5 , flash cs5 doesn't publishing actionscript files.. I'm looking my swf file from any decompiler but i can't see actionscript files.. Please Help Me , Thank You.

    I'm opening my swf file with swf decompiler and i can see the ''.as'' files in the Action folder.. Then i'm changing any text on any .as file with adobe flash cs5 and i'm publishing..When i opened my published swf file there are many problems and i'm looking my swf file with swf decompiler and my .as files has gone..There aren't any .as file and there isn't action folder.. Please help me, this is too important for me.. Sorry for my bad english , thanks..

  • I have a question about Actions in Adobe Pro XI

    When I run an Action in Adobe Pro XI, the document does not close and I also have to click on each and every document.  I thought Actions, like I recall Batch Processing, was supposed to automatically move to the next document in the list, and not leave documents open after the Action is run on it.
    Well, that's what is happening.
    can you tell me how to fix this?
    Thanks
    Anita Evans
    [email protected]

    Hi Anita,
    What action are you using?
    Can you please elaborate and provide more details so that I can check at my end.
    Regards,
    Rave

  • Question about action maps

    I have an action that applies to both a jTextField and a jButton
        public class ActionOnFormat extends AbstractAction implements FocusListener {
            public String[] formatNames = {"fixed","sci","eng","float"};
            protected int formatSpec;
            protected JTextField jText;
            public ActionOnFormat(int theFormatSpec, JTextField precisionText, String toolTipText) {
                super();
                jText = precisionText;
                formatSpec = theFormatSpec;
                int f = (formatSpec >> 4) & 3;
                int p = formatSpec & 0xF;
                NamedDouble.FMT = (f << 4) + p;
                this.putValue(NAME,formatNames[f]);
                this.putValue(SHORT_DESCRIPTION,toolTipText);
                jText.addFocusListener(this);
                InputMap im = jText.getInputMap();
                ActionMap am = jText.getActionMap();
                im.put(KeyStroke.getKeyStroke(KeyEvent.VK_UP,0),"up");
                im.put(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN,0),"down");
                im.put(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT,0),"left");
                im.put(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT,0),"right");
                am.put("left",this);
                am.put("right",this);
                am.put("up",this);
                am.put("down",this);
            public void actionPerformed (ActionEvent e) {
                //see what the cat dragged in
                Object src = e.getSource();
                String cmd = e.getActionCommand();
                int modifiers = e.getModifiers();
    What I was expecting is that a keystroke such as up arrow would put "up" into the action command.
    However, when I got to the actionPerformed cmd was null and nothing worked. What am I missing ?

    Hi,
    what I did was :
    in my class extending a component:
        int condition;
        condition = JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT;
        super.getInputMap(condition).put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), "escape");
        super.getActionMap().put("escape", new KeyAction("escape"));and, in inner class of that component :
      private class KeyAction extends AbstractAction {
        private String _myName;
        private KeyAction() {
          super();
        protected KeyAction(String name) {
          super(name);
          _myName = name;
        public void actionPerformed(ActionEvent e) {
          if(_myName.equals("escape")) {
          //blah blah blah
          if(_myName.equals("anotherMappingKey")) {
          //blah blah blah
        }but it is pretty ugly.
    on the other hand you could use the registerKeyboardAction
      KeyStroke escape = KeyStroke.getKeyStroke(KeyEvent.VK_C,
                                                ActionEvent.CTRL_MASK, false);
      super.registerKeyboardAction(this, "Escape", escape ,
                                       JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
      public void actionPerformed(ActionEvent e) {
      if (e.getActionCommand().compareTo("Escape") == 0) {

  • Question about PHP scripting

    i just did a PHP script for a web form, it works fine that
    when i press submit, it displays the page said "thanks for
    submitting," but the problem is i never receive the email of the
    data, any idea?

    I agree with GarryCT that you should try a simple test (no
    HTML) to see
    if you can send mail at all. If that succeeds, then try
    building it up
    to the point you're hoping for.
    When sending HTML mail, you /might/ want to consider
    including a plain
    text version and sending multi-part email.
    Anyway, here are some comments I have for the code posted
    here:
    Try
    temporarily turning on display errors.
    > <?php
    ini_set('error_reporting', E_ALL);
    ini_set('display_errors', 1);
    > /*subject and email variables*/
    > $subject = 'php scripting';
    > $me = 'my email';
    > /*gathering data variables*/
    > $name1 = $_POST ['name1'];
    > $name2 = $_POST ['name2'];
    > $email = $_POST ['email'];
    > $company = $_POST ['company'];
    > $brief = $_POST ['brief'];
    >
    > $body = <<<EOD
    > <br><HR><br>
    > First Name: $name1 <br>
    > Last Name: $name2 <br>
    > E-mail Address: $email <br>
    > Company: $company <br>
    > Brief: $brief <br>
    > EOD;
    Hopefully, that indent was caused by the Web forum.
    Otherwise, EOD;
    should be at the very start of the line - no white space[1].
    EOD;
    > $headers = "From: $mail\r\n";
    You have not assigned a value to $mail. Some hosts require
    this to be
    an address in your domain. Try using your $me variable here
    (assuming
    it is a valid email address from this domain).
    > $headers .= "Content-type: text /html\r\n";
    Try removing that extra space. You might also need to add
    mime
    version[2]. Does order make a difference? Try this for the
    $headers
    variable:
    $headers = 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' .
    "\r\n";
    $headers .= "From: $me\r\n";
    > $success = mail($me, $subject, $body, $headers);
    You are not acting on the TRUE/FALSE result stored in
    $success.
    Everything after this point assumes mail was accepted for
    delivery. Of
    course, TRUE does not necessarily mean the mail actually got
    to its
    intended destination[2], FALSE does indicate that it was not
    delivered
    at all.
    > /*results rendered as HTML*/
    > $theResults = <<<EOD
    > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN"
    > "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    > <html xmlns="
    http://www.w3.org/1999/xhtml">
    > <head>
    > <meta http-equiv="Content-Type" content="text/html;
    charset=utf-8" />
    > <title>Untitled Document</title>
    > </head>
    > <body>Thanks for your time, we'll get back to you
    within a day.
    > </body>
    > </html>
    > EOD;
    Hopefully, that indent was caused by the Web forum.
    Otherwise, EOD;
    should be at the very start of the line - no white space[1].
    EOD;
    > echo "$theResults";
    > ?>
    [1]
    http://php.net/echo (see "here
    document" in examples.)
    [2]
    http://php.net/function.mail
    Mark A. Boyd
    Keep-On-Learnin' :)

  • Question about fx:Script

    Hi,
    I have a form using many functions of calculations in fx:Script.
    Can I create a separate file with part of my fx:script? it is getting to long.
    If I can separate this file, can I use this in a different form?
    Thanks!

    You can use the source property:
    <fx:Script source="scripts.as"/>

  • Upgraded to CS4 from 3 - Question about Actions

    PS CS3 had a slew of actions--including many textures and frames.  I just installed CS4 and the actions are pretty sparse.  I am kind of a novice and would appreciate any advice offered.  How do bring in the actions I had in CS3 to version 4?
    Thanks!

    Thank you all for the replies--I found it!  When you open Actions, there is a small arrow in the upper right corner, clicked it and whoo hoo!  A drop-down with all of my "missing" selections.  I love it when simple mysteries are solved, LOL!
    Regards,
    Lynne

  • [SOLVED]A simple question about bash scripting

    Just for fun, I thought I'd try making Arch as "parent friendly" as possible (i.e., easy to use once set up).  I've already made a nifty little "system maintenance" script that presents you with a "select" bash menu, with options being "Install, Remove, Update [Without AUR, with AUR, abs, exit], Search, Install and Search (using Yaourt), and exit"
    That works wonderfully, and it only requires typing "sm" into the terminal.
    But just to make it yet *more* "parent friendly", I thought I'd make a .desktop file.
    This is the problem.
    I want the shortcut to essentially open up the script in a terminal.  So it would have to execute, say, "xterm" and then open the "sm" script within the called terminal.
    I believe this would mean I need to either add something to my "sm" script or make a new script that opens terminal and calls sm.
    I'm sure this has an easy solution, but I'm a total amateur just having some fun.
    Any suggestions?
    Last edited by hwkiller (2010-07-13 00:32:48)

    I am not a 100% on .desktop files since I never use them.
    but if your command in the desktop file is something like
    xterm -e /path/to/your/sm/file
    that should work.
    EDIT: Bah too late !
    Last edited by Inxsible (2010-07-12 19:27:11)

  • Question on actions script

    Having a problem in Actionscript. I am trying to accomplish to have 4 different movies play.  Basically it is a gallery. I have the script as follows it tests with no errors but when I click the 4 different buttons the "Test Movie" the movie it disapears/does not play. The script is as follows:
    import fl.video.FLVPlayback;
    group_btn.addEventListener(MouseEvent.CLICK, choosegroupready);
    circle_btn.addEventListener(MouseEvent.CLICK, choosecirclegroup);
    together_btn.addEventListener(MouseEvent.CLICK, choosealtogether);
    oneout_btn.addEventListener(MouseEvent.CLICK, chooseoneout);
    function choosegroupready(e:Event) {
                   myvideo.source="groupready.flv";
    function choosecirclegroup(e:Event) {
                   myvideo.source="circlegroup.f4v";
    function choosealtogether(e:Event) {
                   myvideo.source="altogether.f4v";
    function chooseoneout(e:Event) {
                   myvideo.source="oneout.f4v";
    Any ideas on the how to fix the problem.

    Kglad,
            I have (4) instances of My video on the stage. (Each video ) how do I i do the test/what steps are required?
    T

  • Does anyone know a good book or tutorial about Action Script?

    if you know something .... please tell it to me

    Here's a list of resources though they are not necessarily for beginners.  You might try going thru some of the tutorials at lynda.com also... they can start you off with basics on up to advanced topics for a reasonable monthly cost.
    AS3 - References
    Essential ActionScript 3.0 by Colin Moock, Adobe Dev Library; 1 edition (June 22, 2007), ISBN-10: 0596526946
    Learning ActionScript 3.0 - A Beginner's Guide by Rich Shupe and Zevan Rosser
    The Adobe TV website - video based learning material: http://tv.adobe.com/product/flash/
    Lee Brimelow's site http://www.gotoandlearn.com/ is great for video tutorials

Maybe you are looking for

  • Inserting to a new table from a remote connection

    I am having difficulties with selecting records from a remote database and inserting them into a current table. The following statement is what I am using: insert into sme_lc (WTN, BTN, BTNNAME, PICCODE, PICDATE, CRDDDST) select a.wtn_cd as WTN, a.ol

  • List Export Format for Prospects

    Hi, I am looking for a list export format for Prospects in Siebel Marketing. An example load format was provided and I am able to load prospects successfully but I need the list export format for Prospects to be able to launch. The OBI version used i

  • After editing in photoshop cs6 my photoshop edited image does not appear in Lightroom 4

    after editing in photoshop cs6 my photoshop edited image does not appear in Lightroom 4 can anyone help?

  • Large number of sequences on Oracle 8i

    One possible solution to an issue I am facing is to create a very large number(~20,000) of sequences in the database. I was wondering if anybody has any experience with this, whether it is a good idea or I should find another solution. Thanks.

  • Get photos problems in cs5

    When I go to get photos from my card reader in adobe bridge, the window opens fine, but when I hit choose file, it freezes up and I have to force quit it. I am using MAC. Anyone got any suggestions. All other aspects work just fine.