I have a problem in the attached files. I've had a fiddle around with the animation of my navigation bar. Now i can't get the buttons to work! Also, you may see what I'm trying to do with the navigation, and do you know a cleaner, better coded way?! i've even posted it! There would be a second movie that gets loaded in, but I can't seem to load that. So, if you know how to trace a button to see if it works, that would be great!
I have the below code which attaches a movieclip "btn1" to another movie clip within this loop I wish to setup up different functions for each different button but it only lets me set them up for the last one in the line of buttons. How to I target each button seperatly by using a string and then the value of miniLoop? i.e
I'm working on a small project right now, and it consists of three toggle buttons that control various displayed data. I'm trying to make another toggle button, that once selected, will set the three existing toggle buttons to their "on" state. I'm pulling my hair out trying to target these individually through a loop. I'm currently working in the "//Begin Turn All On" section.
Code: //New Button Collection Embedded in Movie Clip mc"buttonCollection" var myBtns:Array = [buttonCollection.button1,buttonCollection.button2,buttonCollection.button3]; //Put all your buttons here
I am having trouble trying to get a button to target a frame label. Right now I have the button inside a movie clip and my idea was to have the click event target a frame label that is outside of the button movie clip. The frame label actually lives within the parent movie clip of the movie clip holding the button. I am using Action Script 3.0 so I am not sure what to do. And not sure if I should have the actionscript inside the nested movie clip or in the parent. Here is what I have so far...
/* The parent movie clip is called "services_mc" The nested movie clip holding the button is called "brandID_mc" The button is called "goback_btn"
I attached some movieclips dynamically from the library, and the MC contains a button symbol called "myBtn", I would like to let it load another swf on _level3...below is part of my Actionscript.
I used as usual: this.menu_buttons_mc.menu_01_mc.menu_01_btn.onRele ase = function () { trace ("this.menu_buttons_mc.menu_01_mc.menu_01_btn.onRe lease CALLED");}; But problem ist : it works only for one btn. Why? Try click the second flake from above and see AS layer please. I think it would be easy for you but diffic. for me.
Trying to target a button inside a mc in order to trigger a swf. The swf has the same name as the listener in order to repeat the function with multiple swfs. my problem is, i'm getting an error of an Access of undefined property with my mc I geting an error:"
I made a button that navigates to a URL with a _self target. Well, in the script, i have it like this:
Code: clickhere2Btn.addEventListener(MouseEvent.MOUSE_DOWN, myHandler); function myHandler(event:MouseEvent):void { navigateToURL(new URLRequest("https://app.playmakercrm.com/register/eNortjK0UjJWsgZcMAkeAcs!"), "_self"); }
the "_self" isn't working on the page, but when i take out the target, it works just find, it opens in a new page which i don't want.You can check it out here
Code: dev.myhomecaresalescoach.com
and watch that flash header for about 30 seconds, theres a button at the end that reads "Click Here" try clicking on that and it wont take you to the URL.
I have some submenu buttons in a movieclip on the mainline. My first level of navigation in on main timeline. The submenus are grouped in movieclips on the main timeline. I basically used the same code on the main navigation for the sub navigation except the code for the submenus is in that movie clip. My trace statement reads the button is clicked (which was a quantum leap for me) but I know I need some kind of _parent code in there so it knows to go to label back on main timeline. I feel like I am so close.
Also is this an ok way to set this up? I couldn't figure out how to do it in one frame. I didn't realize this basic framework was going to be so difficult.
I want the user to be able to drag 3 items onto a target area, which will then activate a button.All i'm after is the code rather than a complete guide
I'm trying to figure out how to use AS to access frames of a movie clip within a button symbol (using Flash MX 2004), and I seem to be stuck. I drafted a small test version of the FLA I'm working on, and it is attached to this message.
Specifically, my intention is to have a two-state button that goes into "selected mode" after the first mouse click, and then goes back to normal after a 2nd click. I can already handle the functional aspect of this using a global boolean like the one in the attached file. The problem is that I want to represent the current status of the button with a visual change; in the attached example FLA, the intention was to change the color of the text label on this button from grey to red when the button is in its "selected" state.
In this forum I found a similar question where someone had provided a "menu.fla" that had a row of buttons that acted more or less like a radio set, which is somewhat similar to my need. I've been trying to use the same sort of method, having converted the "up" state of the button text into a movie clip symbol with two frames (one for each state), and then trying to use AS to do a "gotoAndStop()" on the desired frame of the up label animation. The problem is that I cannot figure out how to actually make this work ... no matter what sort of path I try to use to get to the movie clip animation within the button, I cannot seem to set the text animation to jump to the "selected" frame (2).
I think my problem is that I've been unable to glean any understanding from the Flash MX docs about the differences between an object name and a symbol name and an identifier and an instance name and a blah blah blah, or about which of them (if any) actually is an ID that can be accessed via ActionScript. Also, MX 2004 seems to provide almost no compile-time error checking on the validity of a target path either, so I've been reduced to just throwing every combination at it that I can think of. None have worked, so I'm at a loss.
If anyone can explain to me why the attached FLA doesn't cause the text to stay red after a mouse click, no matter which of the commented out lines I try, it would undoubtedly be a big help to me.
(Please note that the button in this FLA uses a basic flashing animation for mouseovers ... it was just something quick to implement to emulate the mouseover animation in my full file, so please don't be distracted by it. Also note that I haven't tried to implement any code to return the button to a non-selected status yet. One thing at a time.)
RESOLVED: It was apparently the nesting of a movieclip inside of a button that prevented the original target path from working (and one of the tutorials at this website seems to support that). Once I knew what the proper path syntax was and didn't have to worry about that part anymore, eventually the rest fell into place pretty easily once I started using a movieclip for the button rather than an actual button.
Just started using MX and learning ActionScript. How to make a button rollover/rollout target another movieclip using AS. (Before I was just putting an instance of my _mc on the OVER frame of the button. The problem is, whe I went to the AS menu, I couldn't find tellTarget anywhere. Later I found out its depreciated since v.5. What can I use in MX to substitute for this wonderful function???
I started working actionscript 2 yesterday for a uni project. I was wondering if I can target a movie clip on a different frame from the scripted button. For instance would:
I'm trying to figure out how to use AS to access frames of a movie clip within a button symbol (using Flash MX 2004), and I seem to be stuck. I drafted a small test version of the FLA I'm working on, and it is attached to this message. Specifically, my intention is to have a two-state button that goes into "selected mode" after the first mouse click, and then goes back to normal after a 2nd click. I can already handle the functional aspect of this using a global boolean like the one in the attached file. The problem is that I want to represent the current status of the button with a visual change; in the attached example FLA, the intention was to change the color of the text label on this button from grey to red when the button is in its "selected" state.
In this forum I found a similar question where someone had provided a "menu.fla" that had a row of buttons that acted more or less like a radio set, which is somewhat similar to my need. I've been trying to use the same sort of method, having converted the "up" state of the button text into a movie clip symbol with two frames (one for each state), and then trying to use AS to do a "gotoAndStop()" on the desired frame of the up label animation. The problem is that I cannot figure out how to actually make this work ... no matter what sort of path I try to use to get to the movie clip animation within the button, I cannot seem to set the text animation to jump to the "selected" frame (2).
In my animation I have a button utilizing the tellTarget command to activate another movieclip (which contains an effect for the button). The button and the "effect movieclip" (each on their own layer) are inside a movieclip called MC_mm_buttons which again is inside the main .swf
When I test my .swf the output window gives me this error message: Target not found: Target="/test" Base="_level0.mc_mm_buttons"
I isolated the button and its effect movieclip simply by making them again, from scratch, in a new document.. everything works fine, so I've got the tellTarget command and the interaction between the button and its movieclip nailed down. Now, I'm pretty sure that it has something to do with me needing to specify that the effect movieclip (in my real .swf) is inside another movie clip and on a different layer.. My button and movieclip are in the same movieclip but each on a layer of their own, the movieclip has an instance name of "test" and the button has a script like this:
on (rollOver) { tellTarget ("/test") { gotoAndPlay ("in") }} on (rollOut) { tellTarget ("/test") { gotoAndPlay ("out") }}
When I roll the mouse over the button, the output window gives me this: Target not found: Target="/test" Base="_level0.mc_mm_buttons"
I have some submenu buttons in a movieclip on the mainline. My first level of navigation in on main timeline. The submenus are grouped in movieclips on the main timeline. I basically used the same code on the main navigation for the sub navigation except the code for the submenus is in that movie clip. My trace statement reads the button is clicked (which was a quantum leap for me) but I know I need some kind of _parent code in there so it knows to go to label back on main timeline.[code]...
I have an image of a target on stage, that moves left and right. In the center of the image is an invisible button, occupying the centre circle of the target. The idea is you click the invisible button on the moving target and this starts another movie playing. Seems to me the action script should reside in the button, and be something like this:
I have a movieclip playing and when I click a certain button I want the movieclip to first play an "outro" animation (which is also inside the movieclip) then go to the real target of the button. For example, I am at the Homepage of my website then I click on the Contact button. The homepage will first go to Homepage's outro animation then go to the Contact page. I need the button to recognize the page/clip being played and the page it will go to.
What is the difference between target and currenttarget in flex?What is the difference between Target and Current Target in Flex especially in mouse events.
var profileholder:profileHolder=new profileHolder ;
inside of profileholder is another movieclip(infoBtn) that acts as a button.when the mouse is over profileholder i want to do something with infoBtn like:
//profOver is the over state of profileholder function profOver(e:Event) { e.target.infoBtn.alpha=1; }
this doesn't work and brings up this error:ReferenceError: Error #1069: Property infoBtn not found on flash.display.Loader and there is no default value. at main_fla::MainTimeline/profOver()
i also tried: function profOver(e:Event) { var item:profileHolder=e.target as profileHolder; item.infoBtn.alpha=1; }
and get this error:TypeError: Error #1009: Cannot access a property or method of a null object reference.
Basically, I want a speaker (movie clip) to turn off if an answer is correct. I have several text boxes and don't want to write a separate function for each one.Here's what I have so far:
ActionScript Code: function textHandler(event:KeyboardEvent):void{ var myTargetName = "txt" + event.target.text; if(event.keyCode == 13) {//check if enter is pressed
[code]....
obviously it doesn't work. It sees speakerName as a string value.