RollOver Movieclip help
Hi guys.
I have got a movieclip and inside is one shape tween. (instanceName = myMovie)
I have also got a button, (instanceName = myBtn)
when i rollover the button i want the movieclip to play the shapetween. Im using this code:
myBtn.onRollover = function(){
myMovie.play();
All the code, buttons, and movieclip are on the smae layer and the same key frame.
However i keep getting this error:
Description: 1119: Access of possibly undefined property onRollover through a reference with static type flash.display:SimpleButton.
Source: myBtn.onRollover = function(){
What am i doing wrong? Thanks for any help, its much appreciated =)
well not sure the logic train on that...unless i see the file....but what i was saying was put a stop action on the timeline of the movie clip.....when i coded in as2 i use to make a top layer named actions and put my actions there......
then in the code that triggers the animation to play.....would go something like
myBtn.onRollover = function(){
myMovie.gotoAndPlay(1);
i havent used as2 in forever ever so i'm kinda losing it......may do a test project and see
Similar Messages
-
How do I create a rollover movieclip button?
I'm very new to Flash and would like to know firstly how I create a movieclip, and then how to make the movieclip into a rollover button (having the animation play when the cursor is over the button, and it pausing/restarting when taken off). Preferably in a step by step guide, thanks for any help!
click insert>new symbol>movieclip.
on the timeline create your movieclip animation.
add a layer to frame 1 and add the following code:
stop();
open your library and drag your movieclip from the library to the main timeline/stage. in the properties panel assign an instance name, eg mc
open the actions panel and add:
mc.addEventListener(MouseEvent.MOUSE_OVER,overF);
mc.addEventListener(MouseEvent.MOUSE_OUT,outF);
function overF(e:MouseEvent):void{
MovieClip(e.currentTarget).play();
function outF(e:MouseEvent):void{
MovieClip(e.currentTarget).gotoAndStop(1); -
Simple button rollover effect help needed - please help!
Hi everyone,
I was hoping someone could tell me how was this rollover
effect done - can be seen on the small map on the right:
http://www.refinery29.com/
What I want to do is to be able to have the same effect on
rollover and rollout just reversed (fade in - fade out).
Please help!!
THANKSquote:
Originally posted by:
NedWebs
That naming at both ends is something I consider a fluke in
Flash's design, but only because I don't know why it won't work the
way you probably had it.
There's probably some logical explanation, but I haven't
found it, just the solution for when it happens
It's such a minor little detail. I suspected it would be
something this small, as that's usually the case, but I just
couldn't put my finger on it. Not one of the places I researched
made any reference to that when they said to name the instance of
the button. How stupid.
Anyway, thank you again. I can finally move forward. This was
driving me mad. -
RollOver movieClip to display dynamic text
I have no ides how to do this.
It must be easy but I can't seem to get it. I have a movie
clip called A_mc and a dynamic text field called instance name
"Names", when the mouse rolls over the A_mc I want a name assigned
to the A_mc to show up in the Names text field.
It seemed simple enough, I have seen it used in educational
SWF when the mouse rolls over the A_mc the name of that part or
area shows us in the text field.
But I need help HHEELLLPThanks Gibbah
For your help, I don't think I thgink the right way for
Flash, I know it takes time but this seems to be driving me mad.
The code you gave me, that is attached to the A_m (Movie
Clip).
The Dynamic Text called names appears on the swf along with
the A_m symbol but no action
I get and error
The class or interface 'Event' could not be loaded.
CODE
on(rollOver){
A_mc.addEventListener(MouseEvent.MOUSE_OVER,showName);
function showName(e:Event):void {
A_mc.Names.text= "Rob Beckett";
I must be doing something else wrong
Rob -
Active Content W/ Rollover Buttons Help
I'm pretty new to web design, and I've been using dreamweaver
to create webpages. My problem is I have some rollover buttons I
made in fireworks and imported to dreamweaver as fireworks html,
and in IE7 I get the "activate active content" error. I installed
the dreamweaver 8.2 update, thinking that would fix it, but
although I can see that the extension to automatically change the
code so it'll work in IE in my preferences, the option to do so
never comes up. I read somewhere that it doesn't support image
tags, which I think mine are. So my question is: is there an easy
fix for this other than the update, or at least a fix for a
beginner who doesn't know javascript? I've googled to my heart's
content, and everything I've come across has been over my head.
Please someone help me with this. I can also post the code if
that'll help, just let me know. Thanks in advance!
HiramI'm not quite sure what the actual issue is here but several
things seem to
be confused.
My problem is I have some rollover buttons I made in
fireworks and
> imported to dreamweaver as fireworks html, and in IE7 I
get the "activate
> active content" error.
Buttons made in Fireworks and activated with Javascript are
not related to
the "activate active content" issue.
Do you have some Flash or other active content on your page
which is
triggering the "click to activate" which you're confusing
with your
Fireworks buttons?
I installed the dreamweaver 8.2 update, thinking that
> would fix it, but although I can see that the extension
to automatically
> change
> the code so it'll work in IE in my preferences, the
option to do so never
> comes
> up. I read somewhere that it doesn't support image tags,
which I think
> mine
> are.
I don't quite follow this part.
So my question is: is there an easy fix for this other than
the update, or
> at least a fix for a beginner who doesn't know
javascript?
Web content driven by Javascript is not active content so I'm
not sure what
the issue is or what needs fixing.
Can you post a link to your page?
Regards
John Waller -
Hello guys I am wondering if you help me. I'm a beginner at Flash and not sure if this can be done.
Basically. On my stage in have two MovieClips. MC_1 and MC_2. When i put the mouse over MC_1 I want it to play a 'label'
that is inside the MC_2 AND a label that is in MC_1. We can call the label name for MC_2 "lidopen" and the label name for MC_1 "stars."
Also if I take the mouse off, I want it to go back to normal, and if i click down I want it to play a new .swf file called "123.swf"
I hope you understand me, and thanks for your help in advanced =)Here is some code that will go in the timeline that contains the two movieclips...
MC_1.onRollover = function(){
MC_1.gotoAndPlay("stars");
MC_2.gotoAndPlay("lidopen");
MC_1.onRollout = function(){
MC_1.gotoAndStop(1); // I assumed 1, so change if needed
MC_2.gotoAndStop(1);
MC_1.onPress = function(){
// do something with 123.swf
I am not clear on your intentions as far as playing 123.swf, so I haven't attempted to code that. IF you are loading it into the same file, then you might use MovieClipLoader.loadClip or loadMovie, or if you are opening a new web page you would use getURL. -
Can't see rollover images - help!
Hello---
I'm creating a website for a business, and when I add
rollover images exactly the way they show in the tutorial, I'm not
seeing the rollover image in the browser preview. Why would this be
happening?> I'm not seeing the rollover image in the
> browser preview. Why would this be happening?
as a guess- you computer doesn't execute javascript for local
pages.
http://projectseven.com/support/answers.asp?id=153
Alan
Adobe Community Expert, dreamweaver
http://www.adobe.com/communities/experts/ -
Rollover 101 help needed for CS3
I've done this many times in previous versions of DW, but
it's not working in CS3. Just want to do a simple image rollover.
http://www.slubdesign.com/projects/mosaic/dump.html
Is an example. Not showing up in any browser I have. Tried with
both <a> onMouseOver and onMouseOver. I started with a fresh
new HTML page. Seems so basic, I can't see it.
Thanks,
SLVoteForTheSmartOne wrote:
> I've done this many times in previous versions of DW,
but it's not working in
> CS3. Just want to do a simple image rollover.
>
http://www.slubdesign.com/projects/mosaic/dump.html
Is an example. Not showing
> up in any browser I have. Tried with both <a>
onMouseOver and onMouseOver. I
> started with a fresh new HTML page. Seems so basic, I
can't see it.
>
> Thanks,
> SL
>
>
Grab Firefox and then grab the web developer's tool box. Load
the page,
check the error on the right toolbar - and you'll see that
you've named
an image with a ' in it which breaks the DW code. (rename the
image -
Haley's-jump-lowrez_05.jpg)
Paul Davis
http://www.kaosweaver.com/
Visit us for dozens of useful Dreamweaver Extensions.
http://www.communitymx.com/
Partner at Community MX - Extend your knowledge -
I have many movieclips nested inside a movieclip. Is there a
way to "stop()" and "play()" everything at once besides writing out
the code for each nested movie.replace the 'mc' in the code with 'movie1', but you will have
to do this where you want it to happen in your file.
OR you can write a function to call to do so, but I don't
know enough about the structure of your document to tell you where
to write this, but let's try this ... on the main timeline in frame
1, place the following code, then you can 'call' to the function
using the last line below (don't put them on the first frame, they
will go 'where' you want this to happen) and passing a series of
parameters to the function:
btw - this is AS2 code. Also, do you have 'instance names' on
all of your clips? -
StageWebViewBridge from inside MovieClip [HELP]
I'm trying to implement stageWebViewBridge from inside of a movieclip .. It's generating this issue because stage is null. Does anyone know how to implement this inside a movieclip ?
Error: StageWebViewDisk.initialize( stage ) :: You must provide a valid stage instance
// this is our main view
var view:StageWebViewBridge;
//**** STAGE WEBVIEW BRIDGE
/* init the disk filesystem */
StageWebViewDisk.addEventListener(StageWebviewDiskEvent.END_DISK_PARSING, onInit );
StageWebViewDisk.setDebugMode( true );
StageWebViewDisk.initialize(stage);well your a smart *** now arnt you Haha..
I missed 1 painful word in that line of code thanks heeps.. -
Howdy all - I need a hand! I have two buttons (that are
actually two pieces of the same button) - What I want is when I
rollover 1 of them, both of them to be affected by the rollover
event (ex. I roll over button 1 I want it's overSkin to display
along with the overSkin for button 2)Disregard this - this issue was resolved
-
AS2 - How can I make a movieclip rollover
Hey sorry this has probably been asked but I'm new to AS2 and threads...
I have just started learning coding and I am aware how to make a cursour rollover movieclip to change frame but is it possible to make it so when a movieclip touches another movieclip it goes to another frame.
I've played games and seen it done so i know it can be work.... somehow
Thanks for your helpYou can use the hitTest method to detect if an object is colliding with another object. Usually you need to continually check using something like an onEnetrFrame event handler, such as in...
movieclip1.onEnterFrame = function(){
if(this.hitTest(movieclip2)){ // "this" is movieclip1
this.gotoAndStop(someotherframe); -
I'm a bit new to the whole rollover menu concept but I think
I'm getting the hang of it. Now, on a website I'm designing for my
own personal use, i have the main menu system in one movie clip. In
that movie clip there are four other movie clips which contain the
animation and scripting for the rollover parts. The rollover part
works fine, when i roll my mouse over the movie clips they play an
animation, and when i roll off they reverse the animation, but I'm
having some difficulty linking the rollover buttons to play a
certain frame in the timeline. for the first button that happened
to be the "contact us" button, i used
on(release){
_root.play();
I used "_root." because when i just put "play()" it would
just play the interior timeline (i couldn't think of anything else
to call it) of the movie clip. **Remember that i'm adding
actionscript to movieclips inside one big movie clip**. And
"_root.play()" worked fine. It played the set of "contact us"
frames and i added another script to the end frame so it would
redirect me back to the main menu. the second rollover movieclip
("games") however, is giving me much more trouble. i added the
actionscript
on(release){
_root.gotoAndPlay(284);
because theoretically, if the first one worked this one
should work too. Except this is were it begins to get
perplexing...whenever i publish or preview the movie to test the
buttons, the first "contact us" button works fine, but when i get
to the "games" button, instead of directing me to the 284th frame,
it directed me to the 284th frame of a completely different scene.
the scene where the intro to my site plays.
So forgive me for the long message but help would be much
appreciated. I've been working with flash in my spare time for a
little under a year now I can't help to shake the feeling that the
problem is something obvious.If you mean rollover rollvers (via layered menus) it could be the player itself, they are not supported acrosss all players.
Layer menus are here Layered Menus
Did you assign navigation to the buttons (or are yyou only going back and foorth between two buttons?) -
I have a movieClip btn with a rollOver and rollOut animations
(motion-tweens) . It work fine until I move the mouse too fast over
the btn than it gets stuck in the 'over' position. Does anyone know
why this happens?
here's the code I'm using -
on (rollOver) {
//Movieclip GotoAndStop Behavior
this.gotoAndPlay("over");
//End Behavior
on (rollOut) {
//Movieclip GotoAndStop Behavior
this.gotoAndPlay("out");
//End Behavior
Thanks for any help,
Daveif you construct a MC button that has labels of '_up',
'_over', and '_down' and then apply a single handler like onRelease
or onPress - Flash will recognize that you are using the MC as a
button and respond to the mouse events without have to declare the
other handlers.
Then, in your onRelease handler, tell the button to
gotoAndStop('_down) (or over in your case) and then use the
'enabled' prop to disable the button. Now however you will need a
method to 're-enable' any other button that was previously disabled
- best thing to do is to store the buttons in an array and then
iterate through the array a 'enable' all of them with the exception
of the one currently navigated to. -
Hey, I will try to explain my problem as best as I can
without it being too complicated... here goes.
Me and a friend have created a new flash website. Now, on the
top navigational bar... if you press on one of the buttons to go to
a differen't "page" on the site, you can see that the "doors" close
then open. When the doors open, you are at a new page. The only
problem is that we want it so that the page that you are leaving
doesn't disapear until the doors are closed, then once they open,
the new site is there. It will be very complicated to fix this and
we don't want to redo some of the code. So my suggestion is that we
put some sort of delay in front of the code that tells the site to
"delete" the previous page and move on.
We need a Delay function in front of the script because it
doesnt use frames to tell it what to do (so we can't just add
frames to slow down the process).
So my question is... can you use a delay function in front
of a code? For example, something like this (no this is not the
real code, I know)
Delay(20);
[Code]
asdf
asdf
asdf
[/Code]
Or w/e...
Anyways, can someone tell me if this is possible? And if so,
how would we go about doing it? We are not very advanced in Flash
and if there is a simple code that will do it, that would be
awesome.
Thx in advance,
KillerHurdz.Sry, newb... here is what my code looks like after I added
the code you supplied...
codeToExecuteI=setInterval(codeToExecuteF,timeDelayInMilliseconds);
function codeToExecuteF(){
clearInterval(codeToExecuteI);
// put the code that you want to execute after
timeDelayInMilliseconds here
on (release) {
if(this.clips == Number(this.clips)){
loadMovieNum("home.swf",this.clips);
} else {
this.clips.loadMovie("home.swf");
//Movieclip GotoAndPlay Behavior
this.rollin.gotoAndPlay("1");
//End Behavior
on (rollOver) {
//Movieclip GotoAndPlay Behavior
this.bu1.gotoAndPlay("2");
//End Behavior
I am getting some errors. If it matters, this code is on the
button that when you press it, goes to the "Home" page. Sry, never
used this code before and have no idea how it works... I'm probably
doing something that is easily fixable but because I don't really
"get" the code, could somebody help me out a bit?
Thx again for the trouble,
KillerHurdz.
Maybe you are looking for
-
ITunes 10 on Window 7 64 bit copys CD quickly then freezes for 1-2 minutes
I have new and well specified Windows 7 64 bit machine with iTunes 10 installed. When I copy a CD, it copies very quickly compared to my old XP machine, but when it finshes copying teh last track, iTunes always freezes for 1-2 minutees and then retur
-
How can I change security question when I don't have a rescue email address
Can anybody help me with this I don't know The answers and I don't have a rescue address is there anyway Ivan edit this with out starting a new one
-
Setting the page size of a report to 5.5height and 8.5 width(size-inches)
Hi, I want to set the report's page size on a dot matrix printer(for PAYSLIP) to 5.5 inches height * 8.5 inches width. But i'm not able to define my own size through the printer(custom size or user defined size). Some how i cannot see the custom size
-
X230 design flaw or poor assembly?
Hi, I'm the proud owner of an x230 and have been very happy with it so far but I have become concerned about the the constrution. I noticed that across the front of the palm rest there are indentations caused by the 8 lumps at the top edge of the scr
-
Issue related to "Document Set Version History" option for Video uploaded in Asset library
Hi, When user clicks on 'Document Set Version History' option from context menu (ellipsis) of a particular video, 'Sorry, something went wrong' message is shown. The error message also says, versions are currently disabled for this document library.