A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: dropdown menu as3

  1. #1
    Junior Member
    Join Date
    Nov 2009
    Posts
    6

    dropdown menu as3

    ive got a rollover button on frame 1

    with a bit of tweening i have 3 buttons stacked on top of each other on frame 20
    with a transparent square behind them set to rewind if hovered over

    the code on frame1
    Actionscript Code:
    stop();


    b1.addEventListener(MouseEvent.MOUSE_OVER,blar );
    function blar(event:MouseEvent):void


    {
    gotoAndPlay(2);
    }

    the code on frame 20

    Actionscript Code:
    stop();
    var rewind:Boolean = false;
    this.addEventListener(Event.ENTER_FRAME, everyFrame);
    function everyFrame(event:Event):void {
        if(rewind == true) {
            prevFrame();
            }
            }
            MovieClip(root). b .addEventListener(MouseEvent.ROLL_OVER, over);
           
           
            function over(event:MouseEvent):void {
                rewind = true;
               
                }

    b1.addEventListener(MouseEvent.CLICK,blar4 );
    function blar4(event:MouseEvent)

    {
    var request :URLRequest=new URLRequest("http://www.demt.co.uk");
    navigateToURL( request);

    }


    b2.addEventListener(MouseEvent.CLICK,blar2 );
    function blar2(event:MouseEvent)

    {
    var request :URLRequest=new URLRequest("http://www.demt.co.uk");
    navigateToURL( request);

    }
    b3.addEventListener(MouseEvent.CLICK,blar3 );
    function blar3(event:MouseEvent)

    {
    var request :URLRequest=new URLRequest("http://www.demt.co.uk");
    navigateToURL( request);

    }

    unfortunately the code only works once when i want it to run repeatedly

    any help appreciated

  2. #2
    Will moderate for beer
    Join Date
    Apr 2007
    Location
    Austin, TX
    Posts
    6,801
    You never set rewind back to false.

  3. #3
    Junior Member
    Join Date
    Nov 2009
    Posts
    6
    thanks ill have a go

  4. #4
    Junior Member
    Join Date
    Nov 2009
    Posts
    6
    ive got it to work but the swf doesnt seem to behave


    please take a look at the attached fla and run the swf
    Attached Files Attached Files

  5. #5
    Junior Member
    Join Date
    Nov 2009
    Posts
    6
    it looks a bit rough so you can see all the individual elements

    would the swf file remember earlier versions and if so is there a refresh button?

    help appreciated

  6. #6
    Flash/Flex Developer samac1068's Avatar
    Join Date
    Apr 2007
    Location
    Here, no there
    Posts
    1,813
    Not sure what you mean by "would the swf file remember earlier versions". A SWF is a SWF and doesn't store, record, or list any previous version. It just is. But I believe I am misunderstanding your questions, can you rephrase.
    Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.

  7. #7
    Junior Member
    Join Date
    Nov 2009
    Posts
    6
    there are anomalies between whats on the stage and whats on the swf file

    please run the fla hit test the movie and prove me wrong/or right

    mr samac118.

  8. #8
    Junior Member
    Join Date
    Nov 2009
    Posts
    6
    erm 1068

  9. #9
    Flash/Flex Developer samac1068's Avatar
    Join Date
    Apr 2007
    Location
    Here, no there
    Posts
    1,813
    Okay, I've ran it multiple times and I get the same results. Each time you publish you SWF it will replace the previous version, this is the only file that contains the active code. If you are running on a server, there may be a chance where the latest version is not being used but rather the cached version. This can be change by changing the browser's setting. It is an easy fix in IE but you have to manually change configuration in Firefox.
    Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.

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