ActionScript 3.0 :: Link Movie Clip Actions To Sound Events?
Sep 10, 2011
I'm trying to make a program for an e-commerce project I'm involved in that will allow our users to listen to sample clips from a given CD. I've listed all the tracks in an array called trackList. Here's the code to play a given track from that array:
function playTrack(event:MouseEvent):void{
switch(event.currentTarget.name){
case "track01":[code]....
The event target that I've bolded is the given movie clip button that the user has clicked; at frame two, the button turns yellow. When the clip is finished, the button should return to frame 1, but I can't get that to happen.
I suspect I need to put the event listener to make the button's color change back on the sound channel (sndChan), but I don't know how I could write that function so that it will apply to which ever button happens to be active.
View 2 Replies
Similar Posts:
May 15, 2009
I have a very simple problem but I can't find the very simple solution to it. I've create an animated menu with animated movie clips inside to work as buttons. All the main buttons work perfectely but I've got just on button with a sub-menu. On this sub-menu I've placed an invisible hitarea button in order to place some gotoAndStop action. The thing is, it seems to me like this submenu hitarea are underneath something else (even though is the seccond layers right about the actions layers). I've placed a simple trace action whenever the mouse rolls over this area but I get nothing... Am I doing something really wrong? I'm losing all my hair already.
View 2 Replies
Sep 14, 2010
I have a menu bar that has 2 Drop down menus. Each drop down is a separate movie clip, with 3 buttons inside that are separate movie clips. I have a class set to the buttons that are movie clips for a roll over effect. But when I mouse over it does not work. Also on the main time line I tried to add a like to a web page but it did not work. But I only have this problem with the movie clips that are inside the drop down movie clips.
Why is this? How do I add roll over actions and external links to movie clips that are inside of another movie clip? I really need some help this is a problem I have been having for about a month or more. I am still a AS3 newb and this is my first time using classes. The other classes I have work with everything else, Im just having trouble with the movie clips that are inside movie clips.
View 11 Replies
Jun 8, 2002
i've tried placing the code in the actions pnel of the mc; on the mc at the main time line and in various other unspeakable places... but i always get the same error warning me that this code can only be used in movieclip instances and that my stupidity levels are reaching dangerous levels. (error: 'Symbol=stage_mc, Layer=actions, Frame=1: Line 5: Clip events are permitted only for movie clip instances
onClipEvent(enterFrame){'
i fear somebody will reply to this with:'the code goes on the movieclip instance'...at which point i will take up a career in knitting (i knew i shouldn't have given up the course in the first place)
View 12 Replies
Sep 8, 2005
clip events are permitted only for movie clip instances onClipEvent(enterFrame) {
i keep getting this output message --- can't figure out what it means.
View 1 Replies
Sep 8, 2010
when I try to open the actions for a movie clip, it opens it in a tab a the top of the page, but will not restore, therefore i am unable to see or add to the actions. how can i fix this?
View 2 Replies
Apr 14, 2005
I want to have a background that has random movie clips playing. Originally I was going to have long timelines with blank frames. Is there a simple a frame action that I can use that stops the playhead and makes it wait for certain amount of time and then plays?
View 6 Replies
Oct 29, 2008
what bugs me that in EVERY tutorial on creating lets say, a menu they teach you how to animate things and everything but theres never an explanation on how to actually connect buttons or movie clips with a certain action.
I want to do the most basic thing.. to make a certain animation/movie clip appear in the document after a certain button is pressed.
View 3 Replies
Apr 30, 2011
I am making an interactive map of the US.When you hover over a state it zooms in and cities pop up.When you click the city it should a page, for now just google.I have the basics for the first state, California.The zoom works and the cities pop_up.However, when you click the city the link doesn't work. The cities are instances of a movie clip, city.I placed them inside the CA movie clip in their approx locations and named them SF_mc, LA_mc, SD_mc respectively.Here is the code.i added some comments.the FLA is attached in zip as well.It is CS5 file but I'm more familar with AS2 so yea.This is the first frame of the CA movie clip, actions layer
Code:
stop();
/this is all zoom stuff
this.onEnterFrame = function(){[code].......
In the first frame the cities are not on the stage yet. They are add later when the state is zoomed. SO i thought maybe that is why it not working so i tried duplicating the code on the frame after the zoom where i add the cities and it is still not working...
View 4 Replies
Sep 10, 2008
I am making an image gallery and have so far got buttons that display a group of movie clips inside another movie clip. onclick { _root.attachMovie ("group","group",1) } or something, from the top of my head.
I now need to make it so that each movie clip inside "group" displays another movie clip, "image". How do I do this, seeing as they are dynamically loaded?
View 1 Replies
Jul 16, 2009
I have a movie clip button which I have created to provide me with colour tween. An "up" label for the upstate, "over" for the over state (colour tween) and then an "out" label where I have the colour tween back to normal. This all works fine except if i place an action on that button in the timeline, e.g.-
myBtn_mc.onRelease = function(){loadMovieNum("swf/movie.swf", 99);}
explain why this behaviour on my movie clip button won't work if an action such as this is placed on it ? (no tween just the up state colour)
View 9 Replies
Sep 15, 2011
i have a movie clip with an actions layer can i call a function from an actionscript file from the actions panel?
View 6 Replies
Feb 23, 2011
i have a button (name: closeinfo) inside a moviclip (name: infopanel), im using this code to put actions to that button:
[Code]....
View 1 Replies
Sep 12, 2004
apply actions to an attached/created movie clip at runtime? I.E. You use attachMovieClip to attach a clip, and then you add a startDrag/stopDrag system to it dynamically.
View 3 Replies
Nov 19, 2004
I put a button in a movie clip to control actions in the main scene. Shouldn't that work? For some reason it doesn't.
View 11 Replies
Sep 12, 2004
Does anyone know a way to apply actions to an attached/created movie clip at runtime? I.E. You use attachMovieClip to attach a clip, and then you add a startDrag/stopDrag system to it dynamically. Is it possible?
View 3 Replies
Feb 27, 2005
I'm trying to get my movie clip to ease into position with the below AS and then delete the actions, but it's not working. What am I doing wrong?
[Code]...
View 4 Replies
Apr 22, 2009
I've got a basic little slide show player which is timeline-based, rolling through 5 images with alpha transitions, and on the topmost layer, I have 5 invisible movie clips which have actions applied to them as follows:
on (press) { gotoAndPlay(21);}
This action should allow for the on click button to navigate to that specific frame, or image, but for some reason it is not working.
View 2 Replies
Aug 17, 2010
I got four buttons that pull up images in a slide show. I want the fourth button to first pull the image in place and THEN shut down the movie clip. I thought this would be easy, but no. Unfortunately I canīt attach the fla-file on this forum. You could take a look at this:
[Code]...
It works in a sense. The movie falls into place when I click the button and the movie quits when I move the cursor. But it also means you might shut down the slide show involuntary when you move the cursor going for any of the other buttons. What can I do? I could point out that I'm not working with any frames here.
View 2 Replies
Nov 5, 2010
There is a bad gap in my knowledge with Event Dispatch and Event architecture, and this problem proves it.
[URL]
Click on "Flash Banners"
The two thumbnails represent two different classes. Each class is identical. Both are "extends Movie Clip" classes. Tweeners of various types control the hover and click methods. URL Loaders load the thumnails which I then wrap in MC's and make them buttonMode = true, etc. Hover and click to load the Banners on the thumbnails.
The problem is this: - I can't send an event from the Eagle movie clip or the T2D movie clip to tell the other to fade out. Both Banner classes are instantiated through a separate Base class. I'm sure this has to be an Event Dispatch from one MC to another and that it can't be done by the Base class. how I can send an Event or Event Dispatch and what the code structure is so one movie clip can in one class can tell the other movie clip in the other class to disappear while it's neighbour is playing.
View 3 Replies
Dec 28, 2010
I have 10 movie clips, one is draggable movie clip and others are target. How can i find the draggable movie clip is now on stage or anyone of target movie clips.
View 0 Replies
Apr 28, 2009
[URL]
look at the 5th image, that is the script, when i do the publish it gives me this error "Clip events are permitted only for movie clip instances"
View 9 Replies
Mar 3, 2010
I have some sprites in a scene and i need to run an animation (movieclip). While this movieclip is running all events must be discarted... I mean, if user try to push a sprite to some place, if the animation is running this event must not be done. if he click in sprite nothing must happen.
View 1 Replies
Mar 25, 2011
I am not much aware of AS 2.0 and i am stuck at getting custom events from Child SWF to Parent SWF file [code]...
View 1 Replies
Feb 13, 2009
I'm trying to do something that seems simple, but I've been looking all over for the right information and I can't seem to find it.I've got an input text field and various movieclips. On the click of a button or hitting "enter", i am able to trace what is typed into the input text field.I want certain inputted numbers to trigger movie clip events (gotoAndStop, etc).
View 2 Replies
Feb 2, 2010
I have function on my main timeline, triggered by a tween event. I need to call this function WITH the triggering tween event from inside a movieclip. Is this possible and if yes, how do I do this?
ActionScript Code:
TriggerTween.addEventListener(TweenEvent.MOTION_FINISH, function)
Is my code on the main timeline. TriggerTween is a simple Y-tween that triggers an alpha tween inside my target movieclip. I need to have the option to trigger the alpha tween with the Y tween from inside my target movieclip.
View 0 Replies
Mar 25, 2011
I am not very much aware of as2. I am trying to load one as2.swf inside another. The child movieclip dispatches some events but the parent swf is not able to get it.. Also find my code and SWF files attached
Sample Parent Code
System.security.allowDomain("*");
import mx.utils.Delegate;
var addEventListener:Function;
[Code]...
View 2 Replies
Nov 9, 2009
At the moment I have a project where I have a map with different buttons for different sections. When I rollover the buttons, I want brief information for that section to appear in another movie clip.
So the way I have it set up is as follows:
Movie clip one: map_mc is placed on main time line
Button: button_btn placed on map_mc timeline
Movie clip two: textbox_mc is placed on main time line
map_mc has a button named button1_btn placed on its time line.
Upon rollover, I want button1_btn to change the content in textbox_mc by going to frame 1 of text_box mc's time line.
At the moment I have this code on the map_mc timeline for the button. I brake the map when I preview it so I'm pretty sure I'm going about it the wrong way.[code]...
View 6 Replies
Nov 5, 2009
I want to link from a movie clip to a url but I want to make it load the url in the same window...The code I have already opens a new indow every time. It is as follows:
var link:URLRequest = new URLRequest("/index.php");
thingy.addEventListener(MouseEvent.MOUSE_DOWN, homeboy);
function homeboy(e:MouseEvent):void
{
navigateToURL(link)
}
View 2 Replies
Jan 4, 2011
if I attach two movie clips MC1 and MC2 on the stage.MC1 has a simple button also. MC2 is transparent.First I attach the MC1 and then I attach MC2. Both on the stage. So obviously, MC2 is added over the MC1. In this situation, I cannot click the button which is place in the MC1.If Im not wrong, in AS2, if the MC2 is transparent, the button in the MC1 can still respond to the mouse events.
View 1 Replies