Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > Flash General Questions > Flash 9 General Questions

Reply
 
Thread Tools Rate Thread Display Modes
Old 07-06-2007, 01:55 AM   #1
smarttart62
Registered User
 
Join Date: Jul 2007
Posts: 4
Default 1119: Access of possibly undefined property onRollOver...

I haven't touched Flash since MX 2004 and it's like a whole new learning expirience.

I'm about to stab someone in the eye, so i'd appreciate if someone could help me with the following error:
1119: Access of possibly undefined property onRollOver through a reference with static type flash.display:SimpleButton.

I have a button named btMail and made the code (in a frame):
Code:
btMail.onRollOver=function(){
	// btGlass.x-=100;
	gotoAndStop(5);
}
So that when it rolls over it should change the position of another button. I tried using the first commented code that in my book should have done the trick (also tried it with a root) and it didn't work. So i figured i'd just make a new frame and change the positions to my liking... Still doesn't work, and i get that damn error code... Aparently i can't just put that code in a button anymore? Well i thought i could apply actions to a button, but i guess not...

Anyways, can someone please help me find the error in my code?
Thanks,
-Steve
smarttart62 is offline   Reply With Quote
Old 07-06-2007, 01:16 PM   #2
smarttart62
Registered User
 
Join Date: Jul 2007
Posts: 4
Default

Any takers?
-Steve
smarttart62 is offline   Reply With Quote
Old 07-06-2007, 06:05 PM   #3
dr_zeus
Flash Adventurer
 
dr_zeus's Avatar
 
Join Date: Mar 2005
Location: Silicon Valley
Posts: 1,975
Default

You said you're using Flash MX 2004, but because you posted in the Flash 9 forum, I assume you mean Flash CS3. I'm also going to assume that you're trying to use ActionScript 3. I recommend checking your details before posting next time, and please correct me if I've assumed anything wrong.

The problem is that onRollOver no longer exists in ActionScript 3. You need to listen for the ROLL_OVER event and call a seperate function now.

ActionScript Code:
btMail.addEventListener(MouseEvent.ROLL_OVER, onRollOver); function onRollOver():void {     // btGlass.x-=100;     gotoAndStop(5); }
__________________
Josh Tynjala | JOSHBLOG | Bowler Hat Games
dr_zeus is offline   Reply With Quote
Old 07-06-2007, 06:56 PM   #4
smarttart62
Registered User
 
Join Date: Jul 2007
Posts: 4
Default

I said i haven't used it since 2004, and thanks so much for the code but i get this now:

Warning: 1090: Migration issue: The onRollOver event handler is not triggered automatically by Flash Player at run time in ActionScript 3.0. You must first register this handler for the event using addEventListener ( 'mouseOver', callback_handler).

I'll see if i can solve it myself, but i doubt it...
-Steve
smarttart62 is offline   Reply With Quote
Old 07-06-2007, 07:00 PM   #5
smarttart62
Registered User
 
Join Date: Jul 2007
Posts: 4
Default

Got it.

Thanks so much for the help, just had to rename the function ^_^.
-Steve
smarttart62 is offline   Reply With Quote
Old 07-06-2007, 08:50 PM   #6
dr_zeus
Flash Adventurer
 
dr_zeus's Avatar
 
Join Date: Mar 2005
Location: Silicon Valley
Posts: 1,975
Default

It was just a warning, not an error. The SWF should have run regardless, but yes, it's smart to rename it to avoid confusion.
__________________
Josh Tynjala | JOSHBLOG | Bowler Hat Games
dr_zeus is offline   Reply With Quote
Old 08-08-2007, 09:48 AM   #7
toFlash
Registered User
 
Join Date: Aug 2007
Location: Russia, Kaliningrad
Posts: 2
Default Hello

I've a problem too:

I have a class with following code:
Code:
private function onClick(evt:MouseEvent) {
		root.mc_list.gotoAndPlay(2);
	}
in StrictMode Flash CS3 compiler issues the following error:
Quote:
1119: Access of possibly undefined property mc_list through a reference with static type flash.displayisplayObject.
in timeline in root I puts movieclip with name "mc_list"
please help me find the error in my code?
Thanks
toFlash is offline   Reply With Quote
Old 08-08-2007, 06:19 PM   #8
dr_zeus
Flash Adventurer
 
dr_zeus's Avatar
 
Join Date: Mar 2005
Location: Silicon Valley
Posts: 1,975
Default

The compiler doesn't know that mc_list is a MovieClip on the root. Try this:

ActionScript Code:
(root as MovieClip).mc_list.gotoAndPlay(2);
__________________
Josh Tynjala | JOSHBLOG | Bowler Hat Games
dr_zeus is offline   Reply With Quote
Old 08-09-2007, 12:21 PM   #9
toFlash
Registered User
 
Join Date: Aug 2007
Location: Russia, Kaliningrad
Posts: 2
Thumbs up

Quote:
Originally Posted by dr_zeus View Post
The compiler doesn't know that mc_list is a MovieClip on the root. Try this:
It's work!!! Thanks!
toFlash is offline   Reply With Quote
Old 08-14-2007, 08:10 PM   #10
skyygirl
Registered User
 
Join Date: Aug 2007
Posts: 1
Default Same error - need more details

I am not a flash programmer at all - but I found a bit of code that I want to embed on a site that I have a need to lock down.

Action Script:
this.onEnterFrame = function(){
System.setClipboard("As long as this page is open your copy/paste functionality has been disabled.");
}

Error:
Warning: 1090: Migration issue: The onEnterFrame is not triggered automatically by Flash Player at run time in ActionScript 3.0. You must first register this handler for the event using addEventListener ( 'enterFrame', callback_handler).

What do I need to do and where?

TIA!
skyygirl is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Q] Setting up connection between MS Access and PHP... CyanBlue Server-Side Scripting 23 05-04-2009 12:05 PM
Access collection property in live preview and custom UI ngchenghow Components 1 11-29-2006 02:42 PM
Access object property with fram label TheJazzMan ActionScript 2.0 5 05-12-2005 06:46 PM
can't access property within function conspirisi ActionScript 2.0 2 03-23-2005 12:06 PM
access object property dynamically? kellere ActionScript 2.0 2 12-31-2004 03:02 AM


All times are GMT. The time now is 04:59 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.