473,383 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Problem: Can't access movieclip in a button

113 100+
Hi,

This should be really simple to do and has really got me stumped. I have a movieclip inside a button, the button is called my_btn and the movieclip is called my_movie. What i want to happen is the movieclip goes to frame two when the button is rolled over, so i added this code to test the reference to the button:
Expand|Select|Wrap|Line Numbers
  1. my_button.onRollOver = function() {
  2.  
  3.     trace(this.my_movie);
  4.  
  5. }
  6.  
It comes back as undefined, even tho the movieclip instance is correctly named on all frames of the button.

I have decided to create a movieclip that behaves like a button instead, but would like to know why this happens?

Thanks,

Chromis
Feb 2 '09 #1
1 3534
Markus
6,050 Expert 4TB
Have you tried taking away the this reference? A movie clip inside a button doesn't sound right to me..

When you say this, it is trying to reference part of the my_button instance, and if it's returning undefined, the property, method or whatever isn't set.
Feb 14 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Chris Bolus | last post by:
I'm a teacher using MS Access on an RMConnect 2.4 network. On some workstations both I and my students sometimes get an error message when attempting to insert a command button on a form which...
2
by: Wayne | last post by:
This is a copy of a message I previously posted in a Microsoft Access Newsgroup, but it was suggested to me that my problem is ASP related and not Access, and hence I'm posting in this newsgroup now...
1
by: veenathi | last post by:
i am trying to write code for coping a certain portion of movieclip into another movieclip. for that i draw big stage movieclip. (stage_mc).Then i draw small rectangle movieclips on the stage...
1
by: molle | last post by:
Hi, this is perhaps a common question, but everywhere I just find how to load external images into a movieclip. I have images in my Library that I want to load into a movieclip, so I used...
7
chunk1978
by: chunk1978 | last post by:
ok... i've been trying to make this work for 2 days: i have a scene with a button and a movie clip. the movie clip is called "MovieClip1". within the movie clip i've labeled a frame late in the...
1
by: Aniket Khedkar | last post by:
Hi, I have dynamically created movieclips using actionscript in flash.That is using my_mc.createEmptyMovieClip("my_mc"+i,i); and i have to get link on movieclip which consists of...
1
by: ZenQuickZen | last post by:
This is a script for a character that walks in 4 directions. That works fine. I have also added other random movieclip animations for other keystrokes. I want a movie clip to play through when a...
0
by: ralphiedee | last post by:
I have a set of movieclips on stage in a navigation area when you rollOver each button an mc appears (with buttons inside) I used attachMovieclip on each button so when you RollOver one button...
3
toxicpaint
by: toxicpaint | last post by:
Hi Everyone, I've had a look around but couldn't find any answers so thought I'd ask you lot. :) I'm using actionscript 2.0. What I have on my stage is a button that when you mouse over it,...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.