[CS4 or CS5] How to change frame of movieclip depending on relation to mouse

I have a movie clip that follows the mouse..
Its not done yet but its gonna be a dog chasing a/the mouse...
I want to have it where the if the mouse is left or right of the following movie clip it shows it walking toward the mouse... so something like
if mouse positions is less the the cursor + 10 (pixels) goto and play frame with dog walking left
and one for right
up
down
(I want this to walk till its directly under or over mouse and then laydown or jump only when over or under mouse.. IS THAT POSSIBLE?? )
(say its a 20 pixel wide object and 10 on each side will cover the whole thing and not just the exact center pixel, thats what the 10 + movie clip position is for, but Is there a way to tell it to goto and play whatever_frame when mouse is left of any graphic on the sitting dog section???
like the equivalent of onRollLeft or whatever.)
this is the code i have..
its the top statement that doesn't work the bottom 2 do..
Code
if (_xmouse < detail.x+10) {detail.gotoAndPlay(61);
detail.onRollOver = function() {
detail.gotoAndPlay(31);
detail.onRollOut =function(){
detail.gotoAndPlay(1);
I dont have all the animations made so if you know how to do this just do it with a shape like i did in frame 61 of the instance "detail" of the movieclip "dog"
if i cover all directions i shouldn't need the last one- onRollOut.
really what im asking for if you havent figured it out by now is to help me with the actionscript that will do what i did with the rollover and rollout, but put
1 (a shape of a different color in a frame in the clip dog) when mouse is any left of dog
2 (a shape of a different color in a frame in the clip dog) a shape of a different color when mouse is any right of dog
3 (a shape of a different color in a frame in the clip dog) a shape of a different color when mouse is directly under dog
4 (a shape of a different color in a frame in the clip dog) a shape of a different color when mouse is directly above dog
I already created the shapes and placed them in the appropriate frames..
you should only need to mess with the actions on the instance "detail" (the dog face in frame 1 of scene 1 in layer "follower"
my fla is to big to upload to this form so im placing it on my website
here

Hello utcpunk201,
I have edited your FLA but can't send you the file in this forum as there is no such option to upload FLA files here. I am giving you a brief detail what I have done with your file.
1. Just remove your frame script
2. Edit your script what you wrote on your MovieClip (instance name: detail). Use the script I am sending you below:
Script :
onClipEvent (load) {
    _x = 0;
    speed = 15;
    ymov = false;
onClipEvent (enterFrame) {
    endX = _root._xmouse;
    endY = _root._ymouse;
    _x += (endX - _x) / speed;
    _y += (endY - _y) / speed;
    if (_root._xmouse > this._x + 20)
        this.gotoAndStop(90);
    else if (_root._xmouse < this._x - 20)
        this.gotoAndStop(61);
    }else{
        ymov = true;
    if (_root._ymouse > this._y && ymov == true)
        this.gotoAndStop(120);
    else if (_root._ymouse < this._y && ymov == true)
        this.gotoAndStop(150);
3. Change the dog movieclip name with detailmc
4. Use a small line in your dog movieclip's frame number 61, 90, 120 and 150. Write down this line : _root.detailmc.ymov = false;
Now export your Flash file. It will work. I can send you the edited file if you can give me your email ID.
Thanks
Amitava D

Similar Messages

  • How to change the image dynamically depend upon the input parameter

    Hi All
    I have one report running depend upon the Organization specific, I have 15 operating unit and 15 different logo for each operating unit.
    How to change the Logo dynamically depend upon the input passed by the user.
    If I have three or four logo i can add in my layout using if else statement and its works fine but i have more that 10 logos so its no possible to keep these in My RTF Template.
    Is it possible to change the logo according to the input without keeping this in Template.
    I have seen this link but its not working fine
    http://erpschools.com/articles/display-and-change-images-dynamically-in-xml-publisher
    Regards
    Srikkanth.M

    Hi,
    I have not completed fully,so sorry i cant able to share the files, could you please give me some tips and steps to do.
    Without having the logo in RTF if it possible to bring the logo depends on the user input (Ie Operating unit).
    Regards
    Srikkanth

  • Photoshop CS4  "Save" default, how to change?

    I have been unable to find out how to change the "save" default in PS cs4.  If I open a photo, do adjustments using various layers then execute  "save" it saves it as a Tiff file.  I can choose "save as" and make a selection to what ever format, but the "save" defaults to a Tiff format on the initial"save".  At one point I was saving by default to a psd file and one day it changed on me...I don't know if I inadvertently did something or not but I would sure like to change it back.  If it makes any difference, I open most of my photos from LR2.  I've looked through the help section and threads here but can't find an answer.  Note: If I do a "save as" first, do more work on the photo then execute the "save" command it will then save it to whatever format that was chosen in the initial "save as" action.  Thanks.

    That setting should be sticky, meaning it will be set to whatever you used the last time.  If you change file format, it will be set to the newer file format next time you use it.  That's how it works on my setup*.
    * Re my setup:  Please note that I am not a Lightroom user.  I have no idea whether it interferes or not.

  • How to change the attribute name for a relation

    When the Data Modeler engineers a logical model into a relational model it create table columns for the relations. The names of the generated columns are listed in the attributes list in the properties dialog of the relation. The actual name of the attribute gets calculated by the attribute name of the entity which is part of the relation. This is okay, if there is only one relation between two entities. But when there are two relations between two entities the second attribute gets a stupid number suffix. This makes it impossible to give the attribute a useful semantic meaning.
    When I engineer the model into a relational model I can change the column name in the relational model. Changing the column name in the relational model is not perfect but it would be okay for me, if it would not be overwritten during the next engineering run.
    So I have two questions:
    How can I change the attribute name in the attributes section of the properties dialog of a relation? See here for screen shot:
    http://public.ceving.de/2012050300/relationattribute.png
    And if it is not possible:
    How can I preserve any changes on column names in the relational model during a re-engineering run?
    Edited by: 931739 on 03.05.2012 08:07

    Hi,
    I've logged an Enhancement request on this.
    I don't believe it's possible to change it from the Entity or Relationship dialog, as it's not updatable in these dialogs.
    What you can do is change it in the Relational Model, and then reverse engineer the change back to the Logical Model.
    David

  • How to change the Org Data depending on the Person Responsible?

    Hi Group,
    I have a requirement relating to Org data changing as :
    while creating the activities in CRM, by default I was getting the <b>Org data</b> for the person responsible ( whoever has created the <b>Activity</b> ).
    there is a provision that, we can change the <b>Person Responsible</b> for the Activity.
    and when the <b>Person Resp</b> is changed, the <b>Org data</b> also to be changed accordingly....
    But, this was not happening due to some technical reasons....
    So please give me some inputs as how to change the <b>Org data</b> according to the changes to the <b>Person Resp</b>.
    Thanks in advance.
    Regards,
    Vishnu.

    for this u have to maintain the rules profiles and attach this to transaction type for header or item category
    documentaion is there
    spro ->MD->org managment ->org data deter -->change rules and profiles

  • How to Change Frame Size in FCE 2

    Hi,
    I'm very new to this video stuff. Is there a way to change the frame size in FCE 2? When creating a new project there are different options for the type of video but there does not appear to be a way to change the frame size from 720 x 480. I would like to use a different frame size.
    Thanks!!
    john

    Tom Wolsky wrote:
    FCP can. What size is the material and where is it coming from?
    The material is 360 x 243, it is a .mov file from a SVHS transfer. Is 360 x 243 a standard size for an SVHS transfer? I expected the frame to be 640x480.

  • How to change frame rate on JPEGS

    I have some downloaded JPEGS from stock photgraphy. I realized that they are all at a frame rate of 29.97.
    My footage and timeline in FCP Studio is 59.94.
    Should I use Compressor for JPEGS? Is it necessary at atl?
    I noticed that there is an orange line when I insert a JPEG and thought matcing the frame rate would elminate that and
    avoid other problems.
    Thanks!

    Stills don't have a frame rate. They are stills. FCP will SAY they have a frame rate in the bin...for some odd reason. The stills inherit the frame rate of your EASY SETUP. So even if you have a 59.94 sequence and media, if the project Easy Setup is 23.98, the JPEG will say 23.98. But since every frame is exactly the same, as stills aren't moving footage...they are stills...you won't have any issue with them. 
    You will always have to render stills. But the larger in pixel size and data size, it can go from a green render to an orange one. But stills will always have to be rendered. Because they aren't media...moving QT footage...until you create a render file for them.

  • How to change bit in U32 depending on state

    Hello,
    how can this be done:
    For example:
    U32_In is: 00000000000000000000000000000000 (32x 0)
    I32_Number: 4
    Bool_State. True
    Then U32_out should be 00000000000000000000000000010000
    Thanks for help
    Attachments:
    temp1.vi ‏6 KB

    That kind of operation is best done with using the Logical Shift. Connect a constant 1 to the x input, the I32 numer of bits to shift to y and you get your bit pattern output. Then if you want to change the bit in an incoming integer you have to use different boolean logic depending if you want to set or clear that bit.
    To set it you simply OR your input number with the bit pattern, to clear it you AND it with the inverse (Invert node on the Boolean Palette) of the bit pattern.
    If the shift (your number 4) is constant and does not need to be parametrized you can also replace the Logical Shift through a fixed numeric constant of in this case hexadecimal 0x10 or decimal 16.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How to change the screen order depending on a answer to a question?

    Hi All
    I am new to this forum and OPA....
    I am using OPM 10.1 and created few screens and need to show particular screens only if some attributes from the earlier screen is set to true.
    For example:
    I got 4 screens
    <li>Basic details
    <li>Marraige details
    <li>Spouse details
    <li>education details
    "Basic Details" screen has 2 questions
    1 What is your name? (Text)
    2 What is your age? (Numeric)
    3 Are you married ? (boolean)
    all these attributes are defined in the properties file.
    <b>only if the third question is answered as "Yes"</b> I want to display the "Marraige Details" screen
    <b>else</b> the <b>education details </b> screen will be displayed.
    I want to do this <b>without creating a screen order</b> in the screens file. Is this achievable using goals?
    Can any one please help?
    Edited by: rukbat on Oct 15, 2011 11:20 AM
    Moderator Action and Advice:
    Your gaudy rainbow-colored signature has been removed from this post.
    Try to be professional, so that you are not percieved as a clown.

    Well you could use a screen-flow. However this seems like a pretty clear use for a screen order, and I'm curious why you particularly want to avoid using a screen-order?
    Whether you use a screen order or not, the key is to ensure that your goal is defined such that the attributes on those other screens are not needed if the "are you married" question is answered false. For example a goal such as:
    the person is eligible for something if
    ___ the person has a valid marriage certificate
    In this case that attribute is going to be asked no matter what. So instead you guard it:
    the person is eligible for something if
    ___ the person is married AND
    ___ the person has a valid marriage certificate
    Now if they're not married, they're automatically excluded and the second question will be irrelevant and won't be asked. This is true whether or not you're using a screen order, if you're driving an interview via a goal. However a screen flow allows you to implement this logic more explicitly, albeit in a less-intelligent way.

  • Changing frames within a symbol

    Can anyone tell me how to change frames within a symbol, by using a button in the actuall stage. Every time I try searching for it, I get lost in half compleated answers, action script 2, and things that throw a ton of code and words and stuff at me, but never explain the parts of it. (Often also has losts of additional code that I probally don't need)
    I've got the button, but I need the function.

    I can see from your other posts you are familiar with coding a button, so... In your button event handler function you would use something like...
    symbolName.gotoAndStop(someFrame);
    where symbolName is whatever instance name you assign to the movieclip symbol and someFrame is either a number or a label for the frame you want to change to.

  • How to change the position of a window created in the script?

    Hello to all
    A window called from another window are the same size. How can change the position of the window relative to the caller call window?

    That is worked, but for abs.coord. How make releative coord.?
    When I include that in my script, window show without elements ! See attachments №2

  • How to change in External Editing from Edit in CS4 to CS5?

    In LR 3.2 (was also in 3.0) Preferences/External Editing it says in the top position "Edit in Adobe Photoshop CS4" even after reinstalling LR 3.2.
    Originally I had installed CS4 and LR 2.7, then I installed CS5 and LR 3.0 but the top position remained with edit in PS CS4. Then I added CS5 as an additional external editor in the Preferences/External Editor, so far ok.
    The problem: If I want to "Merge to HDR in PS" it goes to CS4 and not to CS5. I assume that it would go to CS5 if CS5 would be in the top position but I can't find out how I could change the top position from CS4 to CS5. Any hint would be appreciated as long as it does not say to reinstall CS5 and LR3.

    It's a common problem. You'll need to reinstall CS5 as the Lr is getting the wrong key.

  • How to change Preset settings (CS4)

    Hello everyone,
    I'm going to make a video with Adobe Premiere CS4 and I need to know how to change Preset settings or however it is called, because I think none of the Presets match with my videos (tried some and my videos were bigger or smaller).
    My videos are .mov, 800x600, made and rendered in Autodesk 3ds Studio Max 2010 (3D Program).
    Could someone please help me? I don't know if there's a preset for me or if I have to change settings or something like that (and where). Yes, I'm new! I'm from Spain if you need it.
    Feel free to ask anything you need, of course.
    Thanks in advance,
    Marta

    Marta,
    Welcome to the forum.
    In CS4 and CS5, one can set the Preset at the Sequence level. Before, it was more global, at the Project level.
    In Sequence New, you will choose the Desktop Preset, and then you can alter almost every displayed attribute, such as Frame Size, or Frame Rate, etc. you want to match your Sequence to your source footage 100%. After editing with those attributes matching, you can then Export to a desired output setting with AME (Adobe Media Encoder). You choice of Desktop, allows you to customize the settings to match. I wish that Adobe had named it "Custom," as the term "Desktop" is a bit abstract, though it has been around for a very long time.
    Good luck, and do match your Sequence settings (Desktop) to your source footage.
    Hunt

  • How can I open raw files from my Nikon D7100 in CS4 or CS5?

    How can I open raw files from my Nikon D7100 in CS4 or CS5?

    Andy,
    In the simple and short form, what happens with the ACR (Adobe Camera RAW) module is that it gets updated with regularity, to accommodate the camera mfgr's. changes for their newer models. That ACR works within the host program, such as Ps, PsElements, Lightroom, etc.. At a point, Adobe ceases to support older host program versions. When that happens, the user has a few options:
    Upgrade the host program version
    Use another host program, such as PsElements or Lightroom
    Use the free DNG converter, per Curt's suggestion. That is not host program dependent
    Glad that the DNG Converter works for you.
    Good luck,
    Hunt

  • CS4: how to change cmd+H function?

    Hi, I have recently got CS4 and one thing really bugs me, the cmd+H function has changed to ctrl+cmd+H.  It used to be used to show/hide frame edges but now cmd+H appears to have been taken over by the Mac system, to hide any and all applications. I'd like to change it back but I can't find how to change the keyboard setting - in either Indesign or Mac preferences. Which should I use?
    Any help would be greatly appreciated, it's a little thing but I used cmd+H ALL the time and am finding it a hard habit to break! Indesign constantly *disappearing* on me is proving frustrating to say the least!

    Tha's funny: googling for a solution I found these pages instead: Cmd-H Now the Mac InDesign Shortcut for "Hallelujah, It Hides" and Doing the right thing with Cmd-H (be sure to read the comments).
    So it seems enough people complained to Adobe to make them change their initial choice. Perhaps they'll change their mind again.

Maybe you are looking for

  • Image not appearing in  XML report in peoplesoft

    Hi, I am trying to have the photo of the employee in the report. Req is that...i need to have the photo of the employee basing on the employee id. I have inserted a dummy photo in the template and had given the webpath to it. My problem is that how c

  • A Printer and a USB hard drive at the same time

    Hi all, I currently have an airport extreme (g) but I'm thinking of upgrading to the newer version Airport Extreme mainly because it allows sharing a hard drive. However I noticed that there is only one USB port. I would ideally like to use it to sha

  • Assignment Field Get Cleared(blank) During Automatic Payment Run(F110)

    Hi all, We have a senario that during the creation of AP invoice, the Profit Center is entered in Assignment field ( BSEG-ZUONR) in FB01.In the invoice document the assignment field value correctly copied into Profit center (BSEG-PRCTR) based on a su

  • And a partition in a pear tree...format question

    Well, I've spent almost an hour of my life I won't get back. Trying to archive an iDVD project (33gb) from internal hard drive to new Lacie 160g external. Keep getting "Error in archiving project" message. Even though I was able to copy some large fo

  • How do I get new Genius Mixes?

    I click Genius Mixes and it's always the same old mixes. How do I create/get new Genius Mixes?