• Making a simple mouse rollover video in Flash
    16 replies, posted
Well, when it comes to actionscript I'm not exactly bright. So what I want to do is: I've made a video in After Effects and imported it into Flash CS3. Now what code would I need to put in Action script to make it play on mouse rollover?
You're in the wrong place buddy I haven't used flash in long time. We are help with fixing your computer ploblems not flash tutorials.
Still though. Someone here probably knows. And for those of you who don't, just don't post in this thread. :v:
The guys over in programming will be able to help you more, i'll move the thread.
Ah, thank you lad.
What type of object is it, a MovieClip?
Well, hem, if you're thinking of "Convert to symbol"'s movie clip - no. However it is a movie clip. Raw footage imported from After Effects.
Combine this [url]http://www.zedia.net/2008/the-right-way-to-do-rollover-event-in-as3/[/url] + [url]http://www.republicofcode.com/tutorials/flash/as3flvplayback/[/url] + [url]http://www.thetechlabs.com/tutorials/audionvideo/how-to-build-a-as3-videoplayer/[/url] Sorry, thats all I can do I lost interest in as long ago so I don't remember much.
Learn the syntax though, you just don't want to copy code without knowing what it does.
Isn't it just something like [code]stop(); onEvent(mouseOver) { gotoAndPlay(2); }[/code] That's AS2. Put the footage on frame 2.
[QUOTE=Agent766;18873942]Isn't it just something like [code]stop(); onEvent(mouseOver) { gotoAndPlay(2); }[/code] That's AS2. Put the footage on frame 2.[/QUOTE] Syntax error "onEvent(mouseOver) {"
[code] import flash.events.MouseEvent; addEventListener(MouseEvent.ROLL_OVER, showVideo); addEventListener(MouseEvent.ROLL_OUT, hideVideo); stop(); function showVideo(e:MouseEvent) : void { gotoAndPlay(2); } function hideVideo(e:MouseEvent) : void { gotoAndStop(1); } [/code]
[QUOTE=Zemog;18878024]Syntax error "onEvent(mouseOver) {"[/QUOTE] You want just "on" not "onEvent".
[QUOTE=Wickedgenius;18884409]You want just "on" not "onEvent".[/QUOTE] "Mouse events are permitted only for button instances" "Unexpected '}' encountered" [editline]07:56PM[/editline] [QUOTE=h2ooooooo;18884334][code] import flash.events.MouseEvent; addEventListener(MouseEvent.ROLL_OVER, showVideo); addEventListener(MouseEvent.ROLL_OUT, hideVideo); stop(); function showVideo(e:MouseEvent) : void { gotoAndPlay(2); } function hideVideo(e:MouseEvent) : void { gotoAndStop(1); } [/code][/QUOTE] "The class or interface 'flash.events.MouseEvent' could not be loaded." "The class or interface 'flash.events.MouseEvent' could not be loaded."
Is your project actionscript 2 or 3, because it'd pretty help us much to know what language we're actually writing this in..
As2. I could do it in As3 if I wanted - if that's recommended of course.
It's always recommended to do everything in AS3. It's a lot quicker.
Sorry, you need to Log In to post a reply to this thread.