How to finish flash movie before loading url

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.

Your attempt to listen for the end of the tween would have been th correct approach, so maybe your coding of it is off...
import fl.transitions.Tween;
import fl.transitions.easing.*;
import fl.transitions.TweenEvent;
rentals_btn.addEventListener(MouseEvent.CLICK, rentalsClick);
var myxTween:Tween;
var myyTween:Tween;
function rentalsClick(e:MouseEvent):void {
     trace("rentalsClick");
     myxTween = new  Tween(Truck_mc,"x",Regular.easeInOut,Truck_mc.x,-378,4,true);
     myyTween = new  Tween(Truck_mc,"y",Regular.easeInOut,Truck_mc.y,0,4,true);
     myyTween.addEventListener(TweenEvent.MOTION_FINISH, moveOn);
function moveOn(TweenEvent):void {
     myyTween.removeEventListener(TweenEvent.MOTION_FINISH, moveOn);
     navigateToURL(...etc);

Similar Messages

  • Flash movie not loading in IE 8....??

    Hi, ive made a flash site in Flash CS4  .The flash movie doesnt load either on my computer or on web server,  but only in IE 8 ??, in all other browsers(FF,Safari,opera) it works????
    Why does this happen?
    This is the page                       http://www.fragojo-nekretnine.com/
    and the code
    <script language="JavaScript" type="text/javascript">
        AC_FL_RunContent(
            'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0',
            'width', '1280',
            'height', '650',
            'src', 'index',
            'quality', 'high',
            'pluginspage', 'http://www.adobe.com/go/getflashplayer',
            'align', 'middle',
            'play', 'true',
            'play', 'true',
            'loop', 'true',
            'scale', 'showall',
            'wmode', 'window',
            'devicefont', 'false',
            'id', 'index',
            'bgcolor', '#242424',
            'name', 'index',
            'menu', 'true',
            'allowFullScreen', 'false',
            'allowScriptAccess','sameDomain',
            'movie', 'index',
            'salign', ''
            ); //end AC code
    </script>
    <noscript>
        <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="1280" height="650" id="index" align="middle">
        <param name="allowScriptAccess" value="sameDomain" />
        <param name="allowFullScreen" value="false" />
        <param name="movie" value="index.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#242424" />    <embed src="index.swf" quality="high" bgcolor="#242424" width="1280" height="650" name="index" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" />
        </object>
    </noscript>
    </body>
    </html>
    Please help!!!
    Thanks

    www.micca.co.uk/1871productions/showreels.html
    If you try any in IE8, they stop half way and do not give a smooth stream.  I am wondering if I have to stream differently and not via the progressive download stream as I have??!

  • How can I get my Flash movie to load correctly in Internet Explorer?

    I loaded an swf into an html. It loads fine in Safari, Firefox and Opera. However, in Internet Explorer the swf covers up part of the copy. I tried everything with the css to get it to work, but it nothing has helped. Among other things, I tried changing the z-index in the css, but that doesn't do anything.  Is there a specific code I need to add to my html regarding the importing of the flash movie that would be specific to IE?

    This thread should be in either the Flash Pro forum or the Dreamweaver forum.
    This is for Flash Player and Flash Player related issues, not Flash or browser or HTML issues.

  • IE7,  Flash movie only loads once...

    I've run into a problem, I can't figure out...
    I have a flash movie, that the first time you load it in IE7,
    everything works.
    http://www.floorplaninc.com/viewer.php?propertyTourID=797
    Now, if you close the ie7 window, and keeping another ie7
    browser instance open, then try to open a new window and go to this
    page again, it times out and never loads. The php that calls the
    swf never loads and the swf is never even requested by the browser.
    Now. If you close all your ie7 windows, and go to the url, it
    will load again. But if you repeat the scenario above. Opening a
    new window, it won't load.
    I have found that if you reload the page enough times (say,
    you were testing different HTML in an attempt to figure out what's
    not working), it will eventually start working. Once this happens,
    it will load in new browser windows consistently... Until you
    reboot. Then you're back to square one: loads the first time, not
    subsequent times until you close all browser windows.
    I'm competely at a loss... Has anybody had this happen to
    them before? How do I make it stop happening. I can alter the flash
    movie, I just don't know -what- to alter.
    I'm using both loadVars and loadMovie to load the data and
    the images used in the swf, respectively...

    If you have an swf, the same swf, set into each html page, then that swf is going to play when each page is loaded. If you only want to see the .swf play when the user gets to the home page, then only put the .swf into that page. Use a static image or a different .swf for the other pages. If, for whatever reason, you want to keep the .swf at the top of the browser window regardless of the page the user is looking at, then you might want to use a frameset or dynamic html to keep that section of the html page from changing.

  • How to center flash movie in browser window

    Can anyone explain how to horizontally center my Flash movie in the web browser window after publishing?
    A bit of background:
    I was able to achieve this using <center></center> tags a few years ago. But I have since upgraded to CS5 and I understand that this old method is now obsolete.
    I have found a few threads/forums that address this, but I know nothing about HTML and these threads don't help me because they assume you have more knowledge than I possess. When opening up the index.html file in Dreamweaver I can't find anything that looks vaguely familiar to what is being discussed. I have found some code samples using <div></div> tags but have no idea where to place it.
    So I will need it explained to me in a step by step fashion, including which file I need to fix and what program I should use. Code samples will be very welcome if you can tell me exactly where it goes.
    Thanks in advance...

    Just realized that there is no scrolling functionality with the .swf generated from the new CS5. Can anyone help out by providing revised code for centering and scrolling?
    I found something elsewhere in the forums that worked for both centering and scrolling that worked fine yesterday, but upon visiting my site today for testing, it did not allow the scrolling, and centering did not work in Firefox. Tested both Safari and Firefox on 2 Macs running Snow Leopard.
    Again, much appreciated - nice to visit forums where people are interested in helping instead of screaming at each other. Will visit the Illustrator or Indesign forum to see if I can help out someone there...

  • How to have Flash movie resize with rest of webpage

    Hi,
    I ran a search for this but couldn't find anything. Is there code I can write into my webpage (using dreamweaver) that will make my flash movie get larger along with the rest of my webpage when the viewer zooms their internet explorer 8 browser? Here's a link to an example. Looks fine when page is viewed at 100% but above that everything zooms except the movie.
    www.empowerments.net/canary.html
    Thanks for your help,
    James

    Thanks again for your time but it seems we're not on the same page (pun intended!).
    I do appreciate you trying to help me and I understand how easy it is to misread the question perameters.
    When your reply said "The Zoom does create a white space because it "zooms" the background image and text only.
    The Flash content isn't set to zoom with it apparently"
    it actually just stated what I said was the problem in my original post.
    I've already said the flash content looks fine at 100% and is only a problem when zoomed in by the internet explorer browser.
    The help I'm looking for is maybe a tip on some html code (like rescale = true or something) that I can write into the web page (via Dreamweaver) that tells the flash content to scale up with the rest of the page when zoomed.
    Does anyone else have any suggestions?
    Thanks again for your time and willingness, Mac=Win=Me!
    James

  • How to watch flash movies on ipad

    how do you watch a flash movie on the ipad

    Perhaps your first post?  If you bothered to look through this forum, you'd have seen several posts on this topic.  But to answer your question, Flash is not supported on any iOS device (iPhone, iPad, iPod).  There are 3rd party apps you can try to use from the App store, but they work with limited success......

  • Error Msg: Flash Movie not Loaded

    Hi,
    For some reason my flash movie will not load. I right click
    it and I see the following
    "Movie not loaded" it is greyed out. I can run this same .swf
    file from my local hard drive, but when I try to view it from
    http://localhost/mysite/header.swf,
    it does not work. I am using Windows XP Home edition which uses IIS
    5.1
    The HTML page I am running and the .swf file are in the same
    directory so its not a path issue.
    Here is the code:
    <script type="text/javascript">
    AC_FL_RunContent( 'codebase','
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','wid th','487','height','308','src','header','quality','high','pluginspage','http://www.adobe.c om/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','header'
    ); //end AC code
    </script>
    <noscript><object
    classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0"
    width="487" height="308">
    <param name="movie" value="header.swf">
    <param name="quality" value="high">
    <embed src="header.swf" quality="high" pluginspage="
    http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash"
    type="application/x-shockwave-flash" width="487"
    height="308"></embed>
    </object></noscript>

    Hi,
    Its quite strange, after further testing, the code works just
    fine at my hosting company, but when I run it locally, the flash
    movie does not load.
    I am running XP Home with IIS 5.1 I believe. I am not sure
    why this is happening.
    Any help appreciated?
    -Westside

  • How to run flash movie in applet

    can any one give me code for running flash movie in applet

    Just realized that there is no scrolling functionality with the .swf generated from the new CS5. Can anyone help out by providing revised code for centering and scrolling?
    I found something elsewhere in the forums that worked for both centering and scrolling that worked fine yesterday, but upon visiting my site today for testing, it did not allow the scrolling, and centering did not work in Firefox. Tested both Safari and Firefox on 2 Macs running Snow Leopard.
    Again, much appreciated - nice to visit forums where people are interested in helping instead of screaming at each other. Will visit the Illustrator or Indesign forum to see if I can help out someone there...

  • How To Add Flash Movie In Java Application

    Hello Every One
    I am facing a problem.
    I want to add a flash movie
    Plz Help Me

    Flash Player Java Edition is available - but only for old Flash V.2 :(

  • How to inser flash movie in wordpress?

    Hi everyone,
    I am trying to insert a flash movie into the footer of my website http://bajabeachfrontlandsale.com but I'm having problems. Does anyone know of a widget or some sort of modification to the code that will allow me to do this.
    Thanks for your help.

    Hi Fernando,
    I use a plugin to insert swf files on my Wordpress Blog called WP-SWFObject.
    You can download it from the Wordpress.org website, is quite easy to find, I enjoyed the ease of use of this plugin that much that I wrote an article and put a link on my Wordpress Blog to help people find a good solution to embedding flash files in WP posts.
    I tried many in the past, and this one uses shortcodes, You can get info on it here. http://bombnail.com

  • How to save flash movie

    i want to save    flash movie from  amazon ?
    buy crocs sandals

    There are many funny flash Animation files in the web pages,but       you can't save them into your hard disk directly.  Flash Catcher is designed to address this problem for you. With Flash Catcher,you can download a Flash File(.swf) in just two clicks.       Saving Flash can be as easy as saving a Picture.

  • How to get object key before load data into form?

    I need to get object key (e.g. ItemCode in Item Master Data From ,docEntry in A/R Invoice From) to calculate and do something  before data is loaded into this form .
    I try to use SAPbouiCOM.BusinessObjectInfo.objectKey as in this code.
    Private Sub oApp_FormDataEvent(ByRef pVal As SAPbouiCOM.BusinessObjectInfo, ByRef BubbleEvent As Boolean) Handles oApp.FormDataEvent
           If pVal.FormTypeEx = "672" And pVal.BeforeAction = True And pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_LOAD Then
                   oApp.MessageBox(pVal.ObjectKey)
           End If
    End Sub
    But this fields doesn't valid under this condition (form DI help file).
    - The property returns an empty value in the before notification of the Load action (et_FORM_DATA_LOAD) triggered by a Find operation.
    How can I get this value(key)?

    Janos
    I can't do a calculation after data is loaded because what I'm going to do is that if the opening entry match my condition , the system will not let that user see that entry (bubbleEvent = False).
    I think when formDataEvent is triggered B1 know which entry are going to load because before this event is triggered we did one of following ways
    1. choose from "choose from list windows"
    2. enter docEntry or itemCode or cardCode  and then press Find Button
    3. press "next/previous record button"
    4. press linked button (orange arrow)
    Choice 3 and 4 can be done by retrieve data from BusinessObjectInfo.objectKey (I've tested and it return entry key that is going to open correctly).
    but 1 and 2 can't (it return empty as I mention before).
    thanks
    Edited by: daron tancharoen on Aug 5, 2008 2:34 PM

  • How to call AMImpl method before loading the page(task_flow_config.xml)

    Hi experts,
    I have requirement like,
    I need to call AmImpl method, before rendering the page.(I heard like we can do it in task_flow_config.xml by using method_Invoke operation,But I am not sure about How it is going to work, also i need to know the implementation part,,,help pls )
    (I need to do in Task_Flow.)
    Inside that method I have some logic, where I will setting the BindVariable of my one ViewObject and I need to run the ViewOblect,So that DataShuold be available while page loading.
    I have some different logic after that,,,,
    can anyone suggest me for this??
    thanks
    Santosh

    thanks to Timo n TK,
    I have use case like,
    In the search page I have 2 LOV dropdowns say LOV1 and LOV2. Both list of values are created based on the independent View Objects based on the Query.
    LOV2 VO query is having the Bind Variable, for that Bind variable will be getting the value from the one of the AM method based on the user logged in.
    Also I need to display LOV2 dropdown in the page when user selects LOV1 as a 'SCM', for others it should be in hidden state.
    As per requirement I have to display LOV2 only for LOV1 value as 'SCM'. So I dont want to use valueChangeListner() for this.
    Instead I want populate LOV2 value before page rendering(because in that time i will be having all the parameter to populate ) by executing LOV2 VO Query.
    Once in search page user selects LOV1 as 'SCM', I should display 'LOV2' values in the dropdown.
    If i execute LOV2 VO in the AMImpl method say A() before page rendering ,then if user select LOV1 as 'SCM', will same data available in the dropdown (LOV2 dropdown is based on the LOV2VO)??
    Can u pls suggest me how can i render ,LOV2 when LOV1 as 'SCM' by using 'rendered' property without having valueChangeListner??
    pls suggest me the right approach as per my use case..
    waiting for reply,,
    Thanks
    Santosh

  • Download updates of apps stucks to wait, movie download blocks it! How to finish the movie download?

    Please help, how can I stop the movie download? I've even seen the movie on the pad already, but it is still shown as downloading.
    Pressing pause will download the other apps, but does not solve the problem  downloading of the movie endlessly.

    If there are multiple apps trying to download at once, only one can download at a time and the rest say "Waiting" until it is then their turn. Try this. Double tap the icon of the Waiting app, and it should resume the download.
    How to Solve the Problem of An iPad App Download Stuck on “Waiting”
    http://ipadacademy.com/2012/06/how-to-solve-the-problem-of-an-ipad-app-download- stuck-on-waiting
    Another thing to try - Turn the iPad Off & then back ON.
    If that doesn't work:
    •  Log out of your iTunes store account.  Go to Settings > Store > Sign Out Then press the Home button.
    • Then press and hold the Home and Sleep buttons simultaneously and don't release them when it brings up the Turn Off screen; keep holding them until the Apple logo appears.
    • After restart, the Waiting should be gone.
     Cheers, Tom

Maybe you are looking for

  • Add Redio Buttons

    Hi All, Please Help me to add Redio buttons to my selection screen** Thanks.

  • Bridge does not tile thumbnails accross two monitors after restart

    After restarting my computer Bridge suddenly quit tiling the images being displayed and only shows one row on the primary content panel. The only alteration to my system prior to restart was installing DivX. System was restarted after bridge refused

  • Need to add a check in between the stored procedure

    Hi Team, I am new to pl/sql and need to add a check in between the below procedure such that, Only if the Insert is successfull the delete should execute, if not the loop should be ended. Please help me. CREATE OR REPLACE PROCEDURE Archive_psuser_gra

  • Date of creating a table

    Is there any way to determine the date of create a table. for example u create a table today ,is there any dictionary data that shows this date?

  • Controller redundency for aps with 2 diff Locations

         hi all,                              i have 2 controllers in 2 diff loctaions.in (Location)LOC "A" i have 4400 series WLC with 10 aps are associated in  local mode  and in LOC "B" is also having new 5500 series WLC with 25 aps are associated in