dcsimg
A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: Flv control with button?

Hybrid View

  1. #1
    Junior Member
    Join Date
    Oct 2008
    Posts
    5

    Question Flv control with button?

    Hi, I have a question: I need to know how to create the following:

    I want to start playing a flv file only when you keep your mousecursor over it, so you probable need some kindof button control, no clicking; just keeping the mouse over it. dont know if you can create a flv within a button or that you need a separate button 'over' the flv...

    It would also be cool that if you remove your cursor it would stop (of course) but when you would go over it again with your cursor later, that it would continue where it stopped earlier.

    anybody have any clue?

    D.

  2. #2
    Junior Member
    Join Date
    Oct 2008
    Posts
    29
    I think you could possiblily make a button that is the exact size of your flv video (name it "EXAMPLE" for now)and then make the flv video into a movieclip.
    Inside the flv movieclip on the first frame type
    Code:
    stop();
    then on the other button called example. You'll need to type a code something like this below
    Code:
    on (rollOver) {
    	_root.Example.gotoAndPlay(2);
    }
    Don't forget to add the instance of the button!

  3. #3
    Junior Member
    Join Date
    Oct 2008
    Posts
    29
    To make the stop on the FLV file when the mouse is out..
    You'll need the "Else If" Statement

    Code:
    on (rollOver) {
    	_root.Example.gotoAndPlay(2);
    }else
    if(_root.Example.gotoAndStop(1)
    }
    I don't know about the code above it worked before some how but in my Flash CS3 documents it doesn't seem to work anymore... Could someone help edited maybe?
    Last edited by InfiniteSource; 10-08-2008 at 09:46 PM.

  4. #4
    Junior Member
    Join Date
    Oct 2008
    Posts
    5

    Unhappy

    mm, doesn't seem to work (i;ve got CS3 too, maybe thats the problem)

    it keeps giving these errors also:[I] Statement must appear within on/onClipEvent handler

  5. #5
    Junior Member
    Join Date
    Oct 2008
    Posts
    5

    Unhappy doens't work

    mm, doesn't seem to work (i;ve got CS3 too, maybe thats the problem)

    it keeps giving these errors also: Statement must appear within on/onClipEvent handler: [about my stop() action in my mc flv.]

    and: the gotoandplay(2) action tells flash to go to fram 2 right. but should this be the second frame within my mc right after the first with the stop() action?

  6. #6
    Junior Member
    Join Date
    Oct 2008
    Posts
    29
    Are you talking about the second code or the first code and what actionscript class are you using?

  7. #7
    Junior Member
    Join Date
    Oct 2008
    Posts
    29
    If it's Action Scripting 2.0 I can help out If not..Can't sorries

  8. #8
    Junior Member
    Join Date
    Oct 2008
    Posts
    5
    ok, well I thought AS2.0 had some problems inn handling flv streaming playback capabilities &cetera, but if you can refute this, I'd be happy to construct it in AS 2, and would appreciate your help. -D-

  9. #9
    Junior Member
    Join Date
    Oct 2008
    Posts
    29
    Yea so all you need to do to make the flv movie to play is make it into a movie clip with the flv frames in it then in the scene 1. Make the transparent layer. Convert it into a movie clip and then give it the code of
    Code:
    on (rollOver) {
    	_root.Example.gotoAndPlay(2);
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center