473,748 Members | 9,596 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem: Can't access movieclip in a button

113 New Member
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 3572
Markus
6,050 Recognized Expert Expert
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
9289
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 reads "Invalid use of null". The remainder of the options in the Command Button Wizard are then unavailable and the button wil not work. The only solution is to log on to a different workstation. Any ideas?
2
1357
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 instead. Hi everyone, I've got quite a specific query that I'm trying to resolve with Microsoft Access and I'm hopeful someone out there can offer a solution to my problem. I have records that I'm displaying on a web page from an Access...
1
4432
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 movieclip. (rect_mc) Now what i want, is that the area of the stage_mc that the rect_mc is drawn on, should be made into another movieclip. So that portion of the stage_mc which had been selected by the rect_mc, becomes a new movieclip newMC_mc. ...
1
9377
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 attachMovie like this: mc.attachMovie("imagename"); where imagename is the Linkage identifier, but this doesn't work, so I wonder what I am doing wrong?
7
28738
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 clip called "Near End". i want my button to make the playhead goto that labeled frame within the movie clip but it does not. the button has the following actionscript 2.0: on (release) { _root.MovieClip1.gotoAndPlay("Near End"); }
1
3248
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 images that r placed on this movie clip( "my_mc"+i,i) ...there r 16 images and have to get 16 different link.1link for each image.
1
3760
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 key is pressed. Right now the movieclip only plays while the key is being held. How do I get it to continue to play even if the key is released? I am not sure if I need to add something to my action script or change it entirely. Here is my script: ...
0
2260
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 the mc plays and when you rollOver another it cancels the previous and displays the last mc that was rolled over. NOW The last clip rolled over is always visible on the stage and I cannot use an onRollOut function for these mc's so I need to use...
3
3514
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, pops up a movie clip. Then when you move you mouse off it, it disappears after about 3 seconds. What I'd like it to do is fade out after 3 seconds rather than disappearing. For some reason this seems to be pretty much impossible with my existing code....
0
9541
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9370
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9321
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9247
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8242
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4602
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3312
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2782
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.