Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Junior Member WeaselFlix's Avatar
    Join Date
    Apr 2010
    Location
    Los Angeles, CA
    Posts
    2
    Member #
    21763
    I'm pretty new at web design but I've picked up Flash through some tutorials. I'm a bit stuck on how to do the following:

    When you click on one of my home page buttons I want my flash animation movie to finish THEN link to url.

    I tried adding an eventListener for the tween to 'finish' and then added a link to url to the button but it either linked immediately or the movie finished and didn't link at all.

    Here is an example of the code for the button and animation:

    rentals_btn.addEventListener(MouseEvent.CLICK, rentalsClick);
    function rentalsClick(e:MouseEvent):void {
    trace("rentalsClick");
    var myxTween:Tween=new Tween(Truck_mc,"x",Regular.easeInOut,Truck_mc.x,-378,4,true);
    var myyTween:Tween=new Tween(Truck_mc,"y",Regular.easeInOut,Truck_mc.y,0, 4,true);

    after this x, y, animation finishes I wish for the button to link to my rentals page url. In all of the sections to my site, I want to be able to link to separately so I didn't design the flash to animate to each section. I want it to link to the url.

    Any help would be really appreciated. :-D

  2.  

  3. #2
    Junior Member petew86's Avatar
    Join Date
    Apr 2010
    Location
    Australia, Gold Coast
    Posts
    12
    Member #
    21800
    I,m pretty sure you would want to use the timer class in your code. I just did a quick Google and come up with this tutorial, I hope it helps http://www.republicofcode.com/tutorials/flash/as3timer/

  4. #3
    Junior Member WeaselFlix's Avatar
    Join Date
    Apr 2010
    Location
    Los Angeles, CA
    Posts
    2
    Member #
    21763
    Thanks for the help mate. I found that I was on the right track with the EventListener. Below is the code that worked like a charm, in case you were curious.

    rentals_btn.addEventListener(MouseEvent.CLICK, rentalsClick);
    function rentalsClick(e:MouseEvent):void {
    trace("rentalsClick");
    var myxTween:Tween=new Tween(Truck_mc,"x",Regular.easeInOut,Truck_mc.x,-378,4,true);
    var myyTween:Tween=new Tween(Truck_mc,"y",Regular.easeInOut,Truck_mc.y,0, 4,true);
    myyTween.addEventListener(TweenEvent.MOTION_FINISH , moveOn);}
    function moveOn(TweenEvent):void {
    navigateToURL(new URLRequest("http://twitter.com/DoubleHGuys"), "_self");


Remove Ads

Posting Permissions

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

Search tags for this page

flash finish movie url

,

how to finish flash movie

Click on a term to search for related topics.
All times are GMT -6. The time now is 05:46 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com