Make an object act like a string & a movieClip

Hi,
The scenario is as follows:
I have a movieClip on the stage called "home_btn" and another called "home".
When moving over the home_btn movieClip I want the timeline inside of home to play. I used the slice command to get rid of the _btn which works fine, which is proven by the trace command, but it doesn't seem to be able to enter the timeline of home.
home_btn.addEventListener(MouseEvent.MOUSE_OVER, onOver);      
function onOver(event:MouseEvent)
        var selectedButton:Object;
        var currentTarget:String = event.target.name;
        selectedButton = currentTarget.slice(0, currentTarget.indexOf("_"));
        trace(selectedButton);
        selectedButton.gotoAndPlay("over");     
The error message I get is this:
TypeError:  Error #1006: value is not a function.
     at Version1_fla::MainTimeline/onOver()
PS: I know the obvious way to make this work, but I want it to be mass-usable. Hence the complications.
Thank you for you help,
Virinao

Solved!
With the help of associative Arrays. It works like a mediator between a string and the movieClips which you have on your stage!
var tempButton:Object = new Object;
var mySlice:String;
tempButton["home"] = home;
home_btn.addEventListener(MouseEvent.MOUSE_OVER, onOver);
function onOver(event:MouseEvent)
        var currentTarget:String = event.target.name;
        mySlice = currentTarget.slice(0, currentTarget.indexOf("_"));
        trace(mySlice);
        tempButton[mySlice].gotoAndPlay("over");       

Similar Messages

  • Does the apple tv make the computer act like a receiver from the tv?

    does the apple tv make the computer act like a receiver from the tv?

    When using home sharing, the computer is on and running iTunes and the content is sent over the local network to the Apple TV.

  • Is there a way to make the NAS200 act like a drive in my computer

    Not sure if this has been discussed here yet.
    I have a NAS200 connected to my router and I can access through my web browser no problem.
    I was wondering if there's a way to make it act like a drive that's in my computer. i.e give it a drive letter and have it show up in the "my computer" area.
    I am running win 8 pro desktop hard wired to the router with the nas200 connected. Is there a way to "mount" the nas200 as drive on the computer.
    Thanks,
    Bob
    Solved!
    Go to Solution.

    Yes, you just need to map the drive on your computer. You need to make sure first that the network drive is detected in the network. You can click on the following link to know how to map the drive:
    How to create a shortcut to map a network drive

  • Does iCloud Make Pop Mail Act like IMAP?

    I have basically 1 main question, but 2 different scenarios I'm dealing with - one personally for my mail and the other for my boss.
    Though a longtime Mac user, I am new to using Mountain Lion, iPhone, iPad and iCloud and historically I have always had numerous email accounts in Mac Mail set up as POP and countless elaborate folders that I file and keep all my old emails in for reference.
    When buying my new iMac with ML, the one thing I have not yet done is turn on iCloud for mail.
    If I am understanding how this works (before I do it and create a nightmare of duplication on my iPhone & iPad, etc), if I continue to create my email accounts as POP on my new ML iMac, with their various folders, etc., and turn on iCloud for mail, will it simply reflect on my other devices all the same email accounts and folders and in essence act like an IMAP account in that if you move or delete a piece of mail on one device it will do so on all the devices?
    I not only need to sort this on my computer, but my boss'.  She currently only uses gmail and has all these same devices but they are set up as IMAP and iCloud is turned on and she has mass duplication that is unbearable.
    I am thinking it would be best for me to make her gmail account set up as a POP account and keep iCloud turned on and it will basically eliminate the gmail replication but still allow her devices to all be in sync and have action on one device be seen on all the others.
    This would allow me to create folders for her on her computer in Mac Mail and not use the folder system in gmail at all.
    Am I understanding this correctly?  Hope I'm making sense!
    Thanks so much!

    Hi Glenn:
    Thanks for your response.  I do understand what IMAP does, and I do purposely want all my emails POP so they are downloaded as localized on my computer.
    But where the confusion is for me is iCloud.
    There is "iCloud mail" which I DO NOT WANT.  I don't need yet another mail account.
    I mean "turning on" iCloud for your existing mail.  The way you can turn it on for Calendar, Contacts etc. in Systme Preferences>iCloud> check Mail.  Right now I do not have this checked on my iMac and I actually set up only one of my email accounts on my iPhone as a POP.
    I was hoping that if I organize my email POP accounts the way I want on my iMac and file the various emails into whatever folders, that if I "turned on" iCloud, that it would reflect the same on my phone.  If not, I will not add these accounts to my phone, as I don't want all that on my phone. 
    I like being able to glance at an email on the phone if I'm in town and be able to delete it, but still know its waiting for me to actually deal with and/or file when I get back to my main computer.
    I monitor over 100 email accounts, some mine, but many for business clients and this is why I don't want my phone clogged with all this.  But if turning on iCloud would mimic my iMac mail, then I could just file the emails on the Mac and know they are there in the phone (and I wouldn't delete them on the phone, as it would delete them on the Imac).  Hope this is making sense!
    In my boss' case, she has the reverse issue.
    Someone in the UK set up her iPad, iPhone and laptop with Gmail - her only email account.
    It is IMAP.  They also turned on iCloud (not @icloud mail) and what she has is not only the duplicates caused by Gmail IMAP settings (which you have to remove in Gmail Settings so you don't have the dual Inbox and Gmail "All Mail" inbox on your devices, but to make things more complex for her, she has a Portuguese iPhone and a US iPhone (rather than just swapping SIM cards).
    What I hear all day long is "why do I have all these duplicate emails"  "where did everything go I was just looking at?"  yadda yadda yadda.
    She has her Inbox which has 2000 unread emails sitting in it and her "All Mail" with even more.  Its a mess I want to clean up but don't want to do the wrong thing without fully understanding here what would happen.
    I was hoping that "turning on" iCloud for your MacMail would actually reflect on your devices the same folders and accounts, in which case I could change her Gmail to a POP account and make folders for her and simply have them reflected on her devices once.
    But is turning on iCloud in Syst. Pref for Mail doesn't do that, it won't work.
    Thanks!!!!

  • How do I make an object look like it's rotating in 3D with multiple images?

    I have multiple angle images of an object and I want the result to be the same as the link here. http://www.apple.com/iphone/gallery/#gallery04. I don't know flash at all but it seems like there would be a simple program (even if I have to pay) that allows me to import the images, set the rotation speed and other settings and then hit export to .flv file or something. Does anyone know of a program to do this, or a simple method?
    Thanks,
    Caleb

    Thanks for the info. I know how to make a movie clip of the frames but I don't know JavaScript or much web programming. I don't necessarily need it to be web based..I just need a .flv file that let's me scrub my mouse to the left and right to rotate it. There is a program called photosimile that does this very well which I have used but you have to purchase their 3000 dollar machine and have it plugged in to use the software! I just want a standalone software for this.
    Sent from my iPhone

  • How to make an object explode like a bubble? HELP!

    Hello guys,
    I've got a problem again and I hope you can help me with it.
    I've got an object in my After Effects CS5 project and I wanna make it explode like a bubble.
    I find shatter effects and I can make it break like glass but I need this bubble effect.
    Where can I find it? Does anybody know?
    Best regards
    Mumpitz

    You might check out the AE 'Foam effect'.
    Beyond that, the eggheads on the AE Forum will likely offer the best advice.

  • How to make 3D object look like it's spinning?

    I am creating a logo and the client wants the cylindrical shape with tire treads on it look like it's spinning. I've created a 3D cylinder and mapped the tire tread artwork onto it, but can't seem to figure out a way to make it 'look' like it's spinning. I've tried a little bit of a shadow to the treads (slightly darker color) and also tried to copy/paste some additional treads just slightly off on the x value (making the additional treads darker as they 'step down'). Not sure if < that description makes sense, but I'm just not quite sure how to accomplish this. Any ideas? I'm currently working in Illustrator CS6.

    Since you're talking "3D", I assume you're not trying to make a black and white logo.
    I would suggest creating a blend between 2 instances of your tread symbol. Set one of the symbols to "0%" opaque (transparent). The resulting blend will give a blur effect (you can play with the number of steps in the blend).
    Now make this blend into a symbol and map it to your 3D cylinder.
    There are many other ways to approach a "motion" effect. Among them are:
    1. Creating a gradient from solid to transparent and filling some "swooshes" over the tire tread.
    2. Using a raster blur effect. AI does not have a motion blur, per se, but you can mimic it using the radial blur and offsetting the blur center to a corner.
    Someone else may have a better idea.
    Hope these help.
    Ok, I played around a bit. Here is one way to make a motion blur in AI (since there is not "motion blur" filter).
    Please note the single anchor point near the top. This is required, to force the Radial blur filter to work more like a motion blur.
    Here's another approach:
    The blur effect is created by building an art brush created by blending 2 rectangles together. The bottom rectangles is set to transparent, giving the brush more versatility.
    This is another Illustrator "work-around" because gradients cannot be used in a brush. I suggest keeping your original brush artwork in a "Symbol" so you can edit the brush using the original blends. If you simply drag the brush onto the artboard, you'll find the blend has been expanded into multiple rectangles.

  • Make Enter key act like Tab Key

    Is there any way to make pressing the Enter key change the focus to the next field in the tab order? In other words, make the Enter and Tab keys act the same way?
    Thanks!
    Nelson

    Hitting [Enter] key triggers "exit" event, so add the following code appropriately xfa.host.setFocus(TabTo); where 'TabTo' is the field name to set the focus. However you do need to match with the tabbing order in the form just to make sure [Enter] and [Tab] keys function similarly.
    SekharN

  • How do I make an object look like it is inside of a ring??

    I want to have an oval shaped picture hugged by a ring so that the ring goes around the back of the picture and over the front of it.

    To do this entirely in ID you'd need to draw the ring as a shape or path with the part behind the image missing and palce it in front of the image. Illustrator's patfinder tools are a little more sophiticated and might make it easier to isolate the part that goes behind, but you'd still need to to essentially the same thing.

  • I have Ver 12 installed & a website says I need Ver 8 or 9 for it to function properly. Is there a way to make ver 12 run like Ver 8 or 9?

    The "IowaCollegeAid.gov" web site for filling out an application for financial Aid comes up with a window stating their web site will not work properly with my Firefox Ver 12 and it only supports ver 8 or 9. I tried to use Version 12 anyway but it appears not to work. Is their an option to make Ver 12 act like Ver 8 or 9 in this case or what else could I do? Do I have to reinstall a version 9 or is that even possible?

    The first thing you need to do is to update to Firefox 20.0.1, with the latest security updates.
    You can use this extension to temporarily change the string that website is looking at. <br />
    https://addons.mozilla.org/en-US/firefox/addon/user-agent-switcher/
    Or you can use [http://sourceforge.net/projects/portableapps/files/Mozilla%20Firefox%2C%20Portable%20Ed./Mozilla%20Firefox%2C%20Portable%20Edition%209.0.1/ Firefox Portable 9.0.1] which will install all by itself without affecting your regular Firefox installation.

  • Make an object look transparent in photoshop, low opacity

    Hi. Using PS CS4 on Windows XP.
    Below I have an image on the left with apples showing 4 that are transparent (opacity set to 50%). I am wondering if there is a way to make the apple look transparent, but not transparent to the others so that the apples look more like they do on the right (not going through each other). I understand these  are completely solid, but I was wondering if there is a way to make an object look like it's transparent, but not be able to go through another object. This was really hard for me to explain so please let me know if you have any questions.
    Thank you.

    Of course I figure it out after I write this post even though I have been trying to figure it out for a couple days.
    What I did was put a Levels adjustment layer (dragged the middle slider) on those apples that were fading away after putting the opacity back to 100%.
    The below picture is what I was trying to achieve:
    If anyone else has another solution, I'd be glad to hear it.
    Thank you!

  • Can you make a composition widget act like an accordion widget?

    Is it possible to make a composition widget act like an accordion widget? The reason I ask is because the styling that I can do inside of a composition widget is much more than that of a accordion widget which is just a simple text frame, makes it impossible to add images/icons where I would like to. The only work around to this is to make a .psd file with my states already predefined in it, however If I have to resize the widget for any reason I then have to go and edit the psd file vs just simple moving the items in muse.

    Hi
    How exactly you are trying to style the text or image ?
    You can insert any object or widget in accordion , add image or draw a rectangle with different states defined. You can resize while placing the image etc.
    If this is not you are looking for , then please elaborate as what specific changes you are looking for the object in accordion.
    Composition and Accordion , both are different and works differently but you can use accordion itself and make the changes to text or image anything inserted in the container.
    Thanks,
    Sanjit

  • Textarea - create String that acts like a single character

    Hi guys,
    I am trying to create a string in a textarea that acts like a single character. By this, I mean that the user cannot edit the contents of that section of text. Here's an example:
    Textarea text:
    [Number of Iterations] * 35 / 200
    I want the [Number of Iterations] to be read-only. In addition, if the user tries to delete the beginning or end of [Number of Iterations], the whole thing is deleted. If possible, I would like cursor operations to treat it like a single character as well (i.e. to go from |[Number of Iterations] to [Number of Iterations]| takes a single right button press).
    Some commercial applications like Microsoft Word do this with Automatically created text in documents (like page numbers and date stamps) and I was wondering if I could do the same thing using a Textarea.
    Any help would be greatly appreciated.
    Thanks in advance,
    Steve

    A JTextPane allows you to add components to the text pane. So you might be able to create a JLabel with your desired text and insert the label into the text pane.

  • Eraser tool in Photoshop CS4 acts as if it is transparent when on brush or pencil mode. Block acts like its not transparent at all but there are no options for opacity, flow or brush size. Whats wrong and how to I make the brush and pencil eraser erase co

    Eraser tool in Photoshop CS4 acts as if it is transparent when on brush or pencil mode. Block acts like its not transparent at all but there are no options for opacity, flow or brush size. Whats wrong and how to I make the brush and pencil eraser erase completely without having to go over it multiple times?
    It started randomly about two weeks ago and I thought it was a glitch that would just go away. But now I am getting sick of using only the block eraser on one size. Help?

    The easiest thing to start with is to reset the Eraser Tool.
    Right click on the Eraser icon in the tool options bar and then click on Reset Tool.

  • HT5161 My Mac wont except dvds or cds. It doesnt even make any noise it acts like a dvd is already in there, but there isnt, please help?

    My Mac wont except dvds or cds. It doesnt even make any noise it acts like a dvd is already in there, but there isnt, please help?

    When you push one in, what happens? Whir and spit out? Can't put one in? Which machine? Details please. If the SuperDrive is empty, then Zap the PRAM and Reset the SMC and try inserting a disc again.

Maybe you are looking for