Help make this work in as 3.0

why am i getting this error? how do i fix it? im following a flash 8 tutorial and im using cs3 this is the only main problem I have come across so far please help me convert this so it works in as 3.0
Warning: 1090: Migration issue: The onRollOver event handler is not triggered automatically by Flash Player at run time in ActionScript 3.0.  You must first register this handler for the event using addEventListener ( 'mouseOver', callback_handler).
b1.link_mc.myText_txt.text = "Home";
b2.link_mc.myText_txt.text = "About";
b3.link_mc.myText_txt.text = "Service";
b4.link_mc.myText_txt.text = "Portfolio";
b5.link_mc.myText_txt.text = "Contact";
import flash.events.MouseEvent;
b1.onRollOver=function()
    gotoAndPlay(2);
b1.onRollOut=function()
    gotoAndPlay(14);
b2.onRollOver=function()
    gotoAndPlay(2);
b2.onRollOut=function()
    gotoAndPlay(14);
b3.onRollOver=function()
    gotoAndPlay(2);
b3.onRollOut=function()
    gotoAndPlay(14);
b4.onRollOver=function()
    gotoAndPlay(2);
b4.onRollOut=function()
    gotoAndPlay(14);
b5.onRollOver=function()
    gotoAndPlay(2);
b5.onRollOut=function()
    gotoAndPlay(14);

Events work a bit differently in AS3 than in AS2.  Essentially, you register an event listener with each object, and then have a function that the listener fires.
So, to revise your code:
:: CODE ::
b1.link_mc.myText_txt.text = "Home";
b2.link_mc.myText_txt.text = "About";
b3.link_mc.myText_txt.text = "Service";
b4.link_mc.myText_txt.text = "Portfolio";
b5.link_mc.myText_txt.text = "Contact";
b1.addEventListener(MouseEvent.ROLL_OVER,doOver);
b2.addEventListener(MouseEvent.ROLL_OVER,doOver);
b3.addEventListener(MouseEvent.ROLL_OVER,doOver);
b4.addEventListener(MouseEvent.ROLL_OVER,doOver);
b5.addEventListener(MouseEvent.ROLL_OVER,doOver);
b1.addEventListener(MouseEvent.ROLL_OUT,doOut);
b2.addEventListener(MouseEvent.ROLL_OUT,doOut);
b3.addEventListener(MouseEvent.ROLL_OUT,doOut);
b4.addEventListener(MouseEvent.ROLL_OUT,doOut);
b5.addEventListener(MouseEvent.ROLL_OUT,doOut);
function doOver(evt:MouseEvent):void {
     evt.currentTarget.gotoAndPlay(2);   
function doOut(evt:MouseEvent):void {
     evt.currentTarget.gotoAndPlay(14);
:: END CODE ::
So, to recap.
First you register an event listener for the ROLL_OVER and ROLL_OUT events.  I set them all to go to one function for each type, since I noted that all of the codes were doing the same thing.
Then, the two functions.  An event listener passes an event object into the function, thus the (evt:MouseEvent)
Then, I use the event object to find out which object triggered the event (evt.currentTarget) and I tell it to do the gotoAndPlay action related to the event.

Similar Messages

  • How to make this work with Firefox, HELP!

    Downloading for Real-player, after watching the full movie, I click download and it has to reread the movie from the internet. When using explorer, after downloading the movie, it reads it from memory, which makes it a fast download. How to make this work with Firefox, I like not to use Microsoft products, and I really like Firefox 7.0.1!!!! HELP!

    -> click '''Firefox''' button and click '''Options''' (OR File Menu -> Options)
    * Advanced panel -> Network tab
    * place Checkmark on '''Override Automatic Cache Management''' -> under '''Limit Cache''' specify a large size of space
    * Remove Checkmark from '''Tell me when websites asks to store data for offline use'''
    * click OK on Options window
    * Restart Firefox
    Check and tell if ts working.

  • How to make this work with Firefox, I like not to use microsoft products! HELP!

    Downloading for Realplayer, after watching the full movie, I click download and it has to reread the movie from the internet. When using explorer, after downloading the movie, it reads it from memory, which makes it a fast download. Hoow to make this work with Firefox, I like not to use microsoft products, and I really like Firefox 7.0.1!!!! HELP!

    -> click '''Firefox''' button and click '''Options''' (OR File Menu -> Options)
    * Advanced panel -> Network tab
    * place Checkmark on '''Override Automatic Cache Management''' -> under '''Limit Cache''' specify a large size of space
    * Remove Checkmark from '''Tell me when websites asks to store data for offline use'''
    * click OK on Options window
    * Restart Firefox
    Check and tell if ts working.

  • Under PHOTOs on my iPat there is an option to send to email. I cannot make this work. Help

    Under PHOTOs on my iPat there is an option to send a picture  to an email address.
    . I cannot make this work. Help

    When viewing an image full screen you can tap on the icon, and then on Mail to send the image over Email.  Note that you must have an email account setup in Settings->Mail, Contacts, Calendars->Accounts
    Alternatively you can tap and hold anywhere on the body of an Email in the Mail App, and then choose the "Insert Photo or video" option to add one to the email. You may need to tap on the arrow on the left of the context menu options to bring the insert option into view.

  • I just bought my 10 year old autistic daughter an IPOD touch that she needs to take to school with just limited music on it but she also also has an IPAD mini for home that is fulllyloaded with apps .  How do I set up Itunes to make this work

    I just bought my 10 year old autistic daughter an IPOD touch that she needs to take to school with just the music (no apps) on it but she also also has an IPAD mini for home that is fullly loaded with apps.  The last time I tried to connect 2 devices to Itunes I ended up loosing my own music library so I am a bit hesitant to start setting up this new IPOD touch with outsome help. Anyone have any ideas on how I set up Itunes to make this work and not loose her IPAD apps and media?

    Open itunes, connect ipad, select what you want, sync.
    Connect ipod, select what you want, sync

  • Can i make this work with a number specified in the constructor?

    Hi everyone
    I posted a couple of days ago and i have managed to advance a bit since then.
    Here i have a class called "flower" and it draws a flower with two leaves and 12 petals using the classes "petal and "leaf".
    However, ideally i would like to be able to make this work with a number of petals specified in the constructor, not just 12.
    is this possible or do i need to rewrite the entire class?
    import java.awt.*;
    import java.awt.geom.*;
    public class flower {
        private Shape circle;
        private Shape stem;
        public flower()   {
            circle = new Ellipse2D.Double(-25, -25, 50, 50);
            stem = new Line2D.Double(0.0, 0.0, 0.0, -200.0);
        public void paint(Graphics g) {
        Graphics2D g2 = (Graphics2D)g;
        g2.setPaint(Color.green);
        g2.setStroke(new BasicStroke(5)); // Line width 8 pixels
        g2.draw(stem);
        // Add the petals
        petal P = new petal(Color.red);
        // Scale, translate and rotate the petal into place.
        AffineTransform orig  = g2.getTransform();
        AffineTransform T = AffineTransform.getTranslateInstance(0.0, -25);
        for (int k = 0; k < 12; k++) {
          double angle = k*Math.PI/6.0;
          AffineTransform A =  AffineTransform.getScaleInstance(1.0, 1.0);
          A.preConcatenate(T);     // Scale, then rotate
          AffineTransform R = AffineTransform.getRotateInstance(angle);
          A.preConcatenate(R);     // Scale, translate and then rotate
          g2.transform(A);
          P.paint(g);
          g2.setTransform(orig);     // Restore original transform
          g2.setPaint(Color.yellow);
          g2.fill(circle);
          leaf L = new leaf();
          AffineTransform B = AffineTransform.getTranslateInstance(0.0, 0.0);
          B.translate(340, 425);
          B.scale(1.0, 1.0);
          B.rotate (Math.PI/6);
          g2.setTransform(B);     
          L.paint(g);
          g2.setTransform(orig);     // Restore original
          leaf L1 = new leaf();
          AffineTransform C = AffineTransform.getTranslateInstance(0.0, 0.0);
          C.translate(285, 430);
          C.scale(1.0, 1.0);
          C.rotate (Math.PI/-6);
          g2.setTransform(C);     
          L1.paint(g);
          g2.setTransform(orig);     // Restore original
    }I am tempted to make "flower into a class that extends "petal" would this make it easier for me to achieve my goal?
    Any help would be great
    Thanks Carl

    Your NewFlower class extends petal. You NewFlower constructor calls super( color, petnum ), so the petal constructor is invoked. In the petal constructor, you ignore petNum. You do nothing else in the NewFlower constructor, so petNum is ignored there as well.
    What makes you think that in this orgy of ignoring petNum, that any petNum variable will magically get set, or that your flower will now magically have the right number of petals?
    � {�                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Is there someone at Verizon that still cares about their customers and will help make this right??

    I have spent hours on two phone calls and a chat session regarding a billing discrepancy that is THE FAULT OF VERIZON and still no final resolution.  My bill is due in 3 days and I want this resolved now because I don't want to not pay a bill on time because it won't be corrected in time and then my credit rating will fall due to THE FAULT OF VERIZON.  I have been working on this problem for OVER TWO WEEKS and TWICE have been told that it was all set and that billing was being told to credit my account, yet STILL NO CREDIT HAS HAPPENED.  One rep gave me his email address so that I could follow up with him in case something went wrong with the credit.  I have emailed him and GUESS WHAT?  NO RESPONSE.  I have been a loyal Verizon customer for over 15 years with all bills always PAID ON TIME and THIS IS HOW I GET TREATED??   NOT FAIR.  This is so unlike me to write something like this in a forum, but I have had it after receiving THE WORST CUSTOMER SERVICE EVER.  WHAT AM I SUPPOSED TO DO NOW TO GET HELP?  Is no one at Verizon support HELD ACCOUNTABLE FOR VERIZON MISTAKES??  A VERIZON representative listened to what I needed for business travel and they gave me the added feature that they assured me would be what I needed, and apparently it wasn't right. Is it my fault that a Verizon representative does not know the right answers to how their features work and now I am expected to pay OVER $300 EXTRA BECAUSE OF THEIR MISTAKE?  When I take the advice of a Verizon rep I expect they know what they are talking about and that the advice is accurate.  APPARENTLY THIS ISN'T TRUE.
    Is there someone at Verizon that still cares about their customers and will help make this right??

    After ANOTHER call I may be on track to resolving this.  But WHY did it have to take several calls and chats over a two week period?  WHY did I have to become a mean person to the representative on the phone to finally get this (partially) straightened out?  Why does it need to come to that?  I really don't want to have to get mean and get myself worked up just to get a billing problem straightened out that is VERIZON'S fault.
    Verizon, please consider looking into your lack of proper customer support and make corrections.  Even though this may be resolved, After 15 years of being a Verizon customer I will be considering another carrier when my contract runs out and all due to this horrible customer service experience. 

  • I updated SCCM 2012 R2 from CU3 to CU4. Where can I find good directions on what else I need to do to make this work?

    I updated SCCM 2012 R2 from CU3 to CU4. Where can I find good directions on what else I need to do to make this work? I'm assuming I have to deploy the new clients?
    Thanks,
    James
    James A+, Network+, MCP

    You have to create different collections (x64 vs x86 clients) because the .msp to be deployed is architecture specific.
    "Distribute content" just distributes binaries to distribution points. You can select a collection there, but that has nothing to do with clients. It just distributes content to DPs that are assigned to collections.
    Torsten Meringer | http://www.mssccmfaq.de
    Ok. That is helpful. I appreciate the response. I hate to ask another question, but I', still learning the product. In the Step-by-Step SCCM 2012 R2 CU4 Installation Guide from System Center Dudes, it says to create the collections by using their predefined
    queries. I tried to enter these as queries but I think I am doing so in the wrong area of the collection creation process. Could you break it down for me?
    Do you know of any good training (free) that is video based an breaks SCCM 2012 R2 down into smaller more detailed steps?
    Thanks,
    James
    James A+, Network+, MCP

  • I'm trying to watch a movie from my iPad on my tv with Hdmi  cable.  Do I need to do anything to the tv to make this work?

    I'm trying to watch a movie from my iPad on my tv with Hdmi  cable.  Do I need to do anything to the tv to make this work?

    Not really. Using the correct Digital Av adapter and connecting the iPad to the Tv through one of its HDMI ports is all it takes. Of course making sure the correct input is selected in the Video source selection on the TV.

  • TS2634 I bought a composite AV cable with 30 pin connector at a proper apple store for my ipad 2 which no longer works now i have updated to ios7 - please advise how to make this work ?

    I bought a composite AV cable with 30 pin connector at a proper apple store for my ipad 2 which no longer works now i have updated to ios7 - please advise how to make this work ?

    I have the same problem.
    Two similar discussions:
    https://discussions.apple.com/message/23081658#23081658
    https://discussions.apple.com/message/23281391#23281391
    I have not yet seen any official response to the question: "Is the Apple AV Composite cable fully supported with 30pin connector devices upgraded with iOS7 - specifically ? - eg. iPad 2, iPhone 4, iPhone 4s"
    If it is not currently supported is that then due to a bug / oversight and in that case is it something that will be fixed in the near future?
    Please let us know what feedback you got from asking Apple support.

  • I'm new to mac. Just started out. Have OS 10.8.3. I have an HP 1315 printer.  It prints and copies, wont scan.  I see old threads on this, nothing recent.  ?can i make this work, or do i need a new printer??

    I'm new to mac. Just started out. Have OS 10.8.3. I have an HP 1315 printer.  It prints and copies, wont scan.  I see old threads on this, nothing recent.  ?can i make this work, or do i need a new printer??

    Hi Newbie111
    I see that you are unable to scan with the Photosmart 1315.
    What driver are you using?
    The driver listed in the url below is a basic print driver that will allow you to print only.
    http://h10025.www1.hp.com/ewfrf/wc/softwareDownloadIndex?softwareitem=ps242muc&c c=us&dlc=en&lc=en&os=1006&product=61956&sw_lang=
    You can try using the apple drivers in the url below.
    http://support.apple.com/kb/DL907
    If you have any further issues please let me know.

  • I want to use my DVD from my WIndows 7 Computer to install Office 2011 for Mac.  How do I make this work?

    I want to install Mac Office from my DVD drive located on my Windows 7 computer.  How do I make this work?

    Well, it sounds as though you are trying to install Windows software on a Mac computer.
    If that's really what you want to do, you have another project to do first. You could use Apple's Boot Camp software or 3rd party software such as Parallels or VMWare. If so, you have some reading and research to do.
    Or maybe you are trying to use Remote Disc? Here is a link to using Remote Disc for Windows:
    http://support.apple.com/kb/HT1777
    I hope that this gets you started. Good luck.
    dick glendon

  • HT4356 I have an older HP connected to the usb port of my Time Machine, and have it shared.  I want to print from my iPhone on the network, but it can not be found in airport?  How do I make this work?

    I have an older HP connected to the usb port of my Time Machine, and have it shared.  I want to print from my iPhone on the network, but it can not be found in airport?  How do I make this work?

    AirPrint printers connected to the USB port of the Apple AirPort Base Station or Time Capsules are not supported with AirPrint.
    Read through this for information about Airprint printers and how to use them:
    http://support.apple.com/kb/ht4356

  • I upgraded to 10.9.2 and now my Canon MX870 won't print.  Their driver site only listed drivers for 10.6.  How do I make this work?

    I upgraded to 10.9.2 and now my Canon MX870 won't print.  Their driver site only listed drivers for 10.6.  How do I make this work?

    I just looked at the Canon site and it has Mavericks drivers.
    http://www.usa.canon.com/cusa/macosx_lion/multifunction_printers/pixma_mx_series /pixma_mx870?selectedName=DriversAndSoftware

  • TS2634 Ipad 3 cover fault - magnetic switch off doesn't work. Anyone found a way to make this work please?

    Ipad 3 cover fault - magnetic switch doesn't work to switch off ipad when cover is closed. Anyone found a way to make this work please?

    Has this problem just cropped up or has it been there all along.
    The iPad 3 requires a Smart Cover with magnet aligned only in a certain way. This was not the case for the previous models of iPads. So some older covers will work with the newer iPads because their magnets just happened to be aligned just right. Other covers will not.

Maybe you are looking for

  • Please help, iPhone 5 stuck in recovery mode and will not update.

    I tried to update my girlfriend's iPhone 5 (AT&T) from 6.1.2 to 7.0.4 last night and something went wrong so of course I had backed it up so I put the phone into recovery mode and attempted to completely restore it and then restore from back-up (or a

  • Container definition for Abstract Synchronus Interface

    I am trying the simple scenario where the bpm process consumes soap request message (opens S/A bridge). After it queries another web services and sends back synchronously soap response, closing S/A bridge. I've walked through different weblogs and fo

  • How to fix deleting issues in Mail program

    I have a MacBook Air (only a year old) and I like to use the mail program that came on the computer ( since it syncs with my phone ) However when I delelte messages they re-appear in the box I deleted them from. Does any one know how to fix this issu

  • Help with chapter/marker issue, please

    Using DVDSPRO 2.0.5. One track, 58 mins of movie. Have set five chapter markers and buttons, plus one 'Play Whole Movie' button. Playback via 'Play Whole Movie' button results in playback of Whole Movie track stopping at the end of each chapter and j

  • Contact added in iPhone 4 (not S) does not sync to Outlook 2010

    I have confirmed in iTunes that the Outlook address book is coreectly checked to sync (and confirmed it is the only one on the phone).  I have also checked the box (in iTunes) to "Add contacts created outside of groups on this iPhone to:" and chosen