-
1. Re: Yet Another Convert AS1 to AS3
moccamaximum Jan 29, 2014 4:12 AM (in response to thanser)import flash.events.MouseEvent;
root.seattle.addEventListner(MouseEvent.ROLL_OVER, roHandler);
function roHandler(e:MouseEvent):void{
root.text.gotoAndStop("seattle");
}
-
2. Re: Yet Another Convert AS1 to AS3
thanser Jan 29, 2014 8:43 AM (in response to moccamaximum)Thank you! Making progress.
I fixed your typo Listner to Listener, but I get two compile errors:
Scene 1, Layer 'Actions', Frame 1, Line 19 1119: Access of possibly undefined property text through a reference with static type flash.display:DisplayObject. Scene 1, Layer 'Actions', Frame 1, Line 15 1119: Access of possibly undefined property seattle through a reference with static type flash.display:DisplayObject. My code:
stop();
/* Rollover button command
*/
import flash.events.MouseEvent;
root.seattle.addEventListener(MouseEvent.ROLL_OVER, roHandler);
function roHandler(e:MouseEvent):void{
root.text.gotoAndStop("seattle");
}
When I test this movie, it loops endlessly. I have stop commands in place (main timeline AND the MC), but...what am I missing?
Thanks again.
-
3. Re: Yet Another Convert AS1 to AS3
moccamaximum Jan 29, 2014 11:31 PM (in response to thanser)its not a good idea to name a movieclip exactly like a common property.
try renaming it to CityLabels or sth.
Seattle is the button instance name, text is the MC name and the seattle is the MC label name.
Honestly, I have difficulties to understand what you are tring to communicate here.
if Seattle is a SimpleButton instance, you should convert it to a MovieClip, since SimpleButtons have some drawbacks when trying to overlay your own eventlisteners.
There is also sth. wrong with the nesting of your string component
-
4. Re: Yet Another Convert AS1 to AS3
thanser Jan 30, 2014 7:34 PM (in response to moccamaximum)Well, as I'm not exactly a developer nor am I very fluent in AS3, I did my best to communicate my needs and my current code.
I'm going to go in another direction with this project, and try roll over buttons that go to a different frame with text on it. On roll out, go back to frame 1 and stop. I don't know how else to do it.
The project file I have now is AS1, and a button instance commands a MC to go to a frame number, but I don't know how to get a button and a MC to work together.
Thank you.

