Trying to get this code working

    So, I'm trying to make some smoke and I really like the way one looks I found online; however, I guess it was made in a previous version and some of the code is no longer support with the version I'm using with is CS3.
Hopefully this is the right forum for this.  If not, please redirect me.  Any help getting this thing woring would be much appreciated.  The code comes from this site:
http://www.pixelhivedesign.com/tutorials/Realistic+Flash+Smoke+Effect/
He creates a movieclip called aPuff and then gives the movieclip an identifier of aPuff as well.  It seems identifiers are no longer used in CS3.
// Realistic Smoke Effect - www.pixelhivedesign.com
fadeSpeed = 1;    // Smoke fade speed.
floatUpSpeed = 2; // Smoke float up speed.
// Every frame attach a puff of smoke.
this.onEnterFrame = function(){
  // Get next available depth.
  d = this.getNextHighestDepth();
  // Attach a puff of smoke.
  aPuff = attachMovie('aPuff','aPuff'+d,d);
  // Set initial scale to 10%.
  aPuff._xscale = aPuff._yscale = 10;
  // Put puff where the mouse is. (add small random)
  aPuff._x = Math.random() * 5;
  // Randomizes the starting animation for realism.
  aPuff.gotoAndPlay(Math.round(Math.random()*20));
  // Smoke will animate each frame.
  aPuff.onEnterFrame = function(){
    // Scale smoke up.
    this._xscale = this._yscale += fadeSpeed;
    // Fade smoke.
    this._alpha -= fadeSpeed;
    // Smoke floating up.
    this._y  -= floatUpSpeed;
    // When smoke is 100% scale, remove it.
    if(this._xscale >= 100){
      this.removeMovieClip();
When I run this in CS3 I get a whole list of errors.  I’m super new to actionscript.
Thanks again.

Wrong forum.  That is AS2 code, not AS3 (CS3 can work with either).  Since you say you are getting a bunch of errors, you probably have the file's Publish Settings set up for AS3.  If you change them to AS2 that code might work.

Similar Messages

  • Please please help. I need to get this code working ASAp

    hi! right, I am a java dunce. I am doing a web design degree at uni and annoyingly have to take a programming module. I just don't get it one bit and the lecturer is a sadist and won't help. I have tried countless books and what not but it all goes over my head.... to the problem
    We were given some code for a "guess the number" game. it generates a random number between 1 and 1000. You then have to guess the number. If you guess higher it should output "you ned to guess higher" and visa versa. Also if you enter 0 it should exit the program (which it does)
    The code had logical and syntax erros in it most of which I think I have managed to find but it still does not work and I have been at this for hours now (even my headache has a headache)
    It compiles now but when you enter a number the program just spits out the line "Enter your guess, from 1 to 1000 inclusive (0 to quit):" again but doesn't tell you if you should go higher or lower.
    I can only get it to spit out the "you need to guess lower" line if you enter a number above 1000 which is wrong.
    please please help me. Just point me in the right direction or something but please use novice language or I think I might have to go jump of the nearest peir.
    The code I have so far is:
    import java.util.*;
    public class guessgame2
    public static void main(String[] args)
    // Declare variables, setup keyboard input and the
    // random number generator
    int game_number, user_number;
    String continue_pref;
    Scanner data_input = new Scanner(System.in);
    Random generate = new Random();
    do
    // Generate game number
    game_number = generate.nextInt(999) + 1;
    // The following line is a debug line, comment out
    // for real game.
    // System.out.printf("Game number:%d%n", game_number);
    // Get users first guess
    System.out.print("The computer has generated a number.");
    do
    System.out.printf("%nEnter your guess, from 1 to 1000 inclusive (0 to quit):");
    user_number = data_input.nextInt();
    } while ((user_number >= 1) && (user_number <= 1000));
    // While user has not guessed right and does not want to quit
    while ((user_number == game_number) || (user_number != 0))
    if (user_number > game_number)
    System.out.printf("You need to guess lower%n");
    else
    System.out.printf("You need to guess higher%n");
    // Get users next guess
    do
    System.out.printf("%nEnter your guess, from 1 to 1000 inclusive (0 to quit):");
    user_number = data_input.nextInt();
    } while ((user_number >= 1) && (user_number <= 1000));
    if (user_number == game_number);
    // User has guessed right
    System.out.printf("%nYou guessed correctly, well done.%nDo you want to play again (y/Y)=Yes: ");
    continue_pref = new String(data_input.next());
    if (user_number == 0)
    // User wants to quit
    continue_pref = new String("No");
    } while (continue_pref.equalsIgnoreCase("N"));
    } (thankyou)

    Is this posted in two different sections of the forum? Oh well... here you
    are, would be a good idea to do as WIlfred_Death suggested and write
    out what you need your program to do, then put them in the order for
    them to work, and then convert your notes to code, and then you get
    like so....
    import java.util.*;
    import java.io.*;
    public class guessgame2{
         public static void main(String[] args) throws IOException{
              BufferedReader userIn = new BufferedReader(new InputStreamReader(System.in));
              Scanner data_input = new Scanner(System.in);
              Random generate = new Random();
              int game_number, user_number;
              String continue_pref = "Y";
              Boolean done = false;
              int max = 1000;
              int min = 1;
              System.out.println("Would you like to play my guessing game?(y/n) ");
              continue_pref = userIn.readLine();
              continue_pref = continue_pref.trim();
              game_number = generate.nextInt(999) + 1;
              //System.out.println(game_number);//--->UNCOMMENT THIS IF YOU WANT TO DISPLAY game_number<---
              /*-----Run program while user agrees to-----*/
              while(continue_pref.equalsIgnoreCase("Y")){
                   /*-----Let user guess until they win or choose to quit-----*/
                   while(!done){
                        System.out.println("Enter your guess, from 1 to 1000 inclusive(0 to quit):");
                        user_number = data_input.nextInt();
                        /*-----check if user wants to quit-----*/
                        if(user_number==0){
                             continue_pref = "n";
                             done=true;
                        else{
                             /*-----Check if user won-----*/
                             if(user_number==game_number){
                                  System.out.println("Congradulations you've won! Would you like to continue(y/n)?");
                                  continue_pref = userIn.readLine();
                                  continue_pref = continue_pref.trim();
                                  /*-----If user wants to play again,
                                            regenerate game_number-----*/
                                  if(continue_pref.equalsIgnoreCase("n")){
                                       done=true;
                                  else{
                                       game_number = generate.nextInt(999)+1;
                                       //System.out.println(game_number);//--->UNCOMMENT THIS IF YOU WANT TO DISPLAY game_number<---
                             }/*-----Check if user number is lower-----*/
                             else if(user_number<game_number){
                                  System.out.println("You need to guess higher!\n");
                             else{/*-----Number must be higher-----*/
                                  System.out.println("You need to guess lower!\n");
    }

  • Hello, how can i get this code working?

    public class TrivialApplication
    public static void main(String args[]){
    class HelloObject
    String greeting="String Test";
    void speak()
    System.out.println(greeting);
    ?

    At a guess I'd say it wouldn't like that because you've defined the class HelloObject inside main.
    Try like so (formatting is done with [ code ] and [ /code ] tags):
    public class TrivialApplication
        private String greeting;
        public static void main(String[] args)
            TrivialApplication ta = new TrivialApplication();
            ta.speak();
        public TrivialApplication()
            greeting = "String Test";
        public void speak()
            System.out.println(greeting);
    }This is a bit of overkill, I certainly could have done it with less code, but it shows the standard format. How you declare variables, and initialise them in the constructor. How to create an object and call methods of the object.
    Or, if you really wanted the HelloObject class...
    public class TrivialApplication
        public static void main(String[] args)
            HelloObject ho = new HelloObject();
            ho.speak();
        class HelloObject()
            private String greeting;
            public HelloObject()
                greeting = "String Test";
            public void speak()
                System.out.println(greeting);
    }HTH,
    Radish21

  • Need help getting this code to work

    I am trying to get this code to work using "if else statment" but it will only do the first part and not do the second part in the else statement. Can anyone help me out? Here is the code:
    var R1 = this.getField("Registration Fees1");
    var R2 = this.getField("Registration Fees2");
    var R3 = this.getField("Registration Fees3");
    var R4 = this.getField("Registration Fees4");
    var R0 = 0
    if (R0 == 0)
      event.value = Math.floor(R1.value);
    else
      event.value = Math.floor(R2.value + R3.value + R4.value);
    I did notice that if I fiddled around this this part:
    if (R0 == 0)
    sometimes I can get the second part to work but not the first. I need it to do either or and this is getting frustrating.
    I might also not even need "var R0 = 0". I put that there for the condition part. If that is what is causing the problem, I can take it out. But then what would the condition be? For this form, the default is 0 and then the calculation follows by user clicking on different prices. The first part is if they want to pay for the full conference and the second part is if they want to pay for either Monday, Tuesday or Wednesday or 2 of the 3 days. Is it possible to get this to work with both parts together? I am still stuck on getting just one or the other working. Any help would be greatly appreciated. Thanks in advance.

    I have posted this on another message board and a user by the name of gkaiseril offered this solution but it hasn't worked either.
    // all four days
    var R1 = this.getField("Registration Fees1").value;
    // Monday
    var R2 = this.getField("Registration Fees2").value;
    // Tuesday
    var R3 = this.getField("Registration Fees3").value;
    // Wednesday
    var R4 = this.getField("Registration Fees4").value;
    var Fee = 0
    event.value = ''; // default value
    if (R1 != 'Off') {
      Fee = Number(R1) + Fee;
    } else {
      if(R2 != 'Off') {
         Fee = Number(Fee) + R2;
      if(R3 != 'Off') {
         Fee += Number(R3);
      if(R4 != 'Off') {
         Fee = Number(R4) + Fee;
    event.value = Fee;

  • Outlook 2007 - Can anyone get this to work?

    Just wondering if anyone had success with this, it's really frustrating that the Oracle connector doesn't work with Outlook 2007.

    I've tried to get this to work on several machine configurations (Office 2007 with and with out Office 2003) using the latest Connector for Outlook on Windows XP and Windows Vista and was still unable to get it to work. I'm 100% convinced that Oracle needs to work on this ASAP and I'm even more astonished and perplexed that Oracle have not provided a solution for their customers. This has pushed me to the point where MSExchange, even Novell are being consider as a permanent alternative. Let's face it, Exchange does seem that they finally got their act together and offers a lot of flexibility for Mobility.
    I've spent about 80+ hours on this and have permanently given up until I hear back from the Oracle developers, who doesn't seem to have a solution readily available to give provide. I'm interested in anyone's comments about their conversations with Oracle.

  • HT1203 iTunes: How to share music between different accounts on a single computer - I tried to use the instructions to configure 2 different windows users sharing the same iTunes library.  I could not get this to work per the instructions.

    I tried to configure 2 windows users accounts using a single library per the instructions in HT1203.  My iTunes library is on an external drive.  I cannot get this to work.  Any suggestions?

    To give other users read-only access to your iTunes library, use the Sharing features of iTunes. Sharing works over the local network as well as on the same computer. See the built-in help for details.
    If you want to give full read/write access to more than one user, see the support article linked below.
    iTunes: How to share music between different accounts on a single computer
    There is a way to share the library without moving it to a secondary volume. If you really need to do that, ask for instructions.

  • How to view mjpeg on Iphone?? Trying to get this url to work...

    Need some help. I've been reading that I can download an app to view mjpeg camera feed. I've tried a few free apps, and can't get it to work. I'm trying to load this page on the iphone:
    http://209.50.173.119:1000/
    Username: guest
    Pass: guest
    I can view this fine in IE, etc. Maybe you can can help me to get this to work on the iphone???
    Message Edited by Jason B on 01-25-2010 12:42 PM

    What is the Model no of the Camera...?
    You can view the video on I-Phone.It can work provided your camera is communicating wirelessly with iphone. You also need applications like adobe flash player to be able to view the images on your iphone. 
    Try this link.

  • Facebook like button is not working, I have used the muse widget and created code from facebook. Does anyone know how to get this to work?

    Facebook like button is not working, I have used the muse widget and created code from facebook. Does anyone know how to get this to work?

    Hi connally25,
    Below is a link to a video tutorial on how to add a Facebook Log button, please check if you have followed the same steps to add the video.
    http://tv.adobe.com/watch/learn-adobe-muse-cc/adding-a-facebook-like-button/
    If you have followed the steps correctly and the button still does not work; here is a link to a forum thread which might help solving the issue:
    Facebook Follow Widget not working
    Regards
    Sonam

  • I have adobe acrobat pro for windows and it is freezing up when I try to convert a word file to pdf... I have tried to get this done six ways from Sunday but it is just not working... help!  Chris.

    I have adobe acrobat pro for windows and it is freezing up when I try to convert a word file to pdf... I have tried to get this done six ways from Sunday but it is just not working... help!  Chris.

    It would be helpful to know what version of Acrobat, WORD, and operating system.
    Without that info, I would suggest at this point to open your WORD file and then go to the print menu and print to file using the Adobe PDF printer. Open the created file in Distiller and see if you get a PDF. If so, check to see if AcroTray is running in the background.
    You say you tried many ways. It would help to know what you tried and what worked or did not work, and at what point the failure occurs.

  • Trying to get home shaing working on apple tv using Cisco Access points and a Cisco WLC 5508 with 7.2.110 code.  I can get devices working individually but they never see each other.  I can ping the apple tv from my laptop and ipad.

    Trying to get home sharing working on a corporate wireless network.  Cisco wireless.
    WLC5508 controller
    Cisco 3502 access points
    All apple devices on same WLAN - security WPA2-PSK
    ITunes account up to date
    All devices laterst software.
    Can ping apll tv from laptop
    can ping apple tv from ipad
    Can ping ipad from laptop
    can ping laptop from ipad.
    Apple tv never sees any other device.
    Any ideas?

    Fascinating just reading about your setup. I have a WRT350N and have noticed that it will drop its speed, sometimes down to 1Mbps. It seems to do so at about the same time every day, but usually comes back to speed in about 5 minutes. In my experience, the Apple TV will disconnect if the speed falls this low. Try monitoring the Linksys with Netstumbler, Vistumbler, or just in the Windows Network utility.
    Check the "lease obtained" and "lease expired" times for your router to see if that is when the network fails. I've just finished reading an angry thread over at the Linksys forum about the WRT330N where someone mentioned that the router wasn't renewing its lease.
    "I cannot set it run off automatic DHCP from the WRT330N, the router will not assign it an IP every time the lease expires, causing me to have to manually set an IP on the Print server. That's annoying. Having the router drop IP's to individual machines after 12-48 hours...very annoying."
    http://forums.linksys.com/linksys/board/message?board.id=Wireless_Routers&thread .id=67412
    If that is the problem, then I would consider setting up a Static IP address for your Apple TV. You can do that through the user interface -> Settings -> Network -> Configure ... (Quite intuitive as you only have change IP address and the subsequent details remain the same.)
    My router assigns IP Addresses in the ranges of 192.168.1.100 ->149. The idea here is to choose an address outside of that range but is not greater than 192.168.1.253 (and should not end in the number 1). You shouldn't have to change the linksys router as long as 50 clients are assigned in that range. You'll have to figure that out by accessing your router webpage at browser address 192.168.1.1 -> the default password is "admin" (without the quotes).
    Good luck.

  • Acrobat Pro for Mac bought on Amazon;how can I register it?. registration code they give me, it doesn't work. (It has letters and the registration boxes won't accept letters.)  How do I get this to work?

    I purchased Acrobat Pro for Mac on Amazon. When I try to register with the registration code they give me, it doesn't work. (It has letters and the registration boxes won't accept letters.) How do I get this to work?

    If you don't have original install disks for your Mac, you can order replacements disks directly from Apple at a nominal cost. The original install DVDs are required to reset the password.
    If you have no data on your drive that you want to keep, you can boot up from the OSX Snow Leopard disk and install OSX SL.
    Insert the Snow Leopard DVD and hold the C key during startup. The Mac should boot from the CD/DVD drive into the installer.
    Follow the prompts, erase the disk and install OSX Snow Leopard.

  • Log error "Could not load file or assembly 'BarcodeConversion' or one of its dependencies. Access is denied. This code work fine in server 2008 but get this error in server 2012

    This code work fine in server 2008, but get this error in server 2012.  Do yo have any idea?

    Need some more info as to where this is installed and how.
    First thing to try would be to uninstall the solution and reinstall.
    Check the GAC for your assembly as well as web.config.
    If you don't see it in one of those places, something went wrong with the install and you'll need to start over.
    Brandon James SharePoint Developer/Administrator

  • Hello ive been trying to get this matter token care of for the past 24 hrs and still no help im getting very upset now I paid 100 plus $$ to have this program that isn't even working I would like to speak to someone about on the phone I got a 1800 number

    hello ive been trying to get this matter token care of for the past 24 hrs and still no help im getting very upset now I paid 100 plus $$ to have this program that isn't even working I would like to speak to someone about on the phone I got a 1800 number for tech but everytime I call it hangs up and says to chat........ ive been doing that all day yesterday its kinda getting old telling the same thing over n over again so I would like some real live help a number I can call or someone can call me 402 802 1211 everytime I try to do something on this it ask for my serial num I put it in and it says invalid number and when I do my pics it has trail across them

    Hi,
    I'm sorry to hear that you are having problems but this is a user to user forum and only occasionally visited by Adobe staff. Depending on your version of Photoshop elements, you may be able to get help through the chat sessions starting here
    https://helpx.adobe.com/uk/contact.html?promoid=KLXNA
    If you give us details like your operating system, Photoshop elements version and the problem you ae having, someone may well be able to help you.
    Brian

  • HT200160 This solution does not seem to work when I upgraded from OS X 10.6 to OS X 10.8 (Mountain Lion).  I've tried all versions of this.  Any suggestions specific to getting this to work with Mountain Lion?

    Any suggestions for making this work with Mountain Lion?  I've tried all similar solutions on web.  I've been able to get this to work with Lion, and after upgrading to Mountain Lion it seems to hold true (doesn't make me implement again).  But when I went from OSX 10.6 to Mountain Lion and have to implement it on 10.8 - it isn't working. Thanks.

    Any suggestions for making this work with Mountain Lion?  I've tried all similar solutions on web.  I've been able to get this to work with Lion, and after upgrading to Mountain Lion it seems to hold true (doesn't make me implement again).  But when I went from OSX 10.6 to Mountain Lion and have to implement it on 10.8 - it isn't working. Thanks.

  • I want to install WhatsApp on my iphone 16gb, but I need a code of 3 figures! Where can I get this code? i tried looking at my messages folder, but i havent got any 3 digit code. plz help

    I want to install WhatsApp on my iphone 16gb, but I need a code of 3 figures! Where can I get this code? i tried looking at my messages folder, but i havent got any 3 digit code. plz help

    post in the iPhone forum : https://discussions.apple.com/community/iphone/using_iphone

Maybe you are looking for

  • MacBook Pro 17" Early 2011 Model: Auto Shutdown/Restart Problem

    Hey guys! This is my first time to sign in, join the community, and ask a question or create a discussion. FYI, I really have little knowledge on tech stuff so please bear with me. Here's my problem, and I hope you can give out your suggestions: I ha

  • Regarding Page in adobe

    Dear all I hav developed one adobe forms . In that form from the first page i bind my internal table . If interanl table contains 500 records means its dynamically get the pages.. Because i used  object ---> Flowed concepts..  If internal table is em

  • How to remove a dynamic offset from an integrated signal?

    Hello everyone, I need a big help from you. First of all I dont know whether it is the right forums' section, in the case I am sorry. I acquire a signal from a laser vibrometer (velocity) and, in order to obtain the displacement, I integrate the sign

  • I cannot access my iphoto library on my external Hard drive

    Hello, I backed up my iphoto library to an external hard drive. Now when I try to access it, all I get are dotted outlines where the pictures should be and then when I click on a the dotted outline it gives me an exclamation mark in a triangle. Help!

  • Looking for education materials of developing C++ application with Eclipse

    Hello everyone, I am looking for education materials of developing C++ application with Eclipse. Could anyone recommend some good education materials? Thanks in advance, George