How do you start a function without a button?

I currently have an action that starts with a button click. But I want it to start on frame 1 automatically without a button. How do I need to edit my code to make this work correctly? It's a typewriter effect and I plan on exporting it out as a .MOV and importing it into Adobe Premiere. I also need to figure out how to get the background transparent if possible. Thanks in advance!
Here is what I have.
Button to start the action
btn.onRelease = function()
    txt_ani.startTypeEffect();
Typewriter function
typewriter effect
// clear the string
//txt.text = "";
// stop the page
stop();
// the text string
// use \n for line breaks
var _txt:String = "“This is the text that will start after you press the button, but hopefully it will start automatically soon”";
var _tmr:Number; // timer
var _sec:Number = 62; // milliseconds till next letter
var i:Number = 1;
var l:Number = _txt.length;
function TypeEffect() : Void
    if( i < l )
        txt.text = _txt.substr( 0, i );
        i++;
    } else {
        txt.text = _txt;
        clearInterval( _tmr );
        trace("\t< FIN >");
    //trace( i );
// call this function to start:
function startTypeEffect() : Void
    trace("\t< START >");
    _tmr = setInterval( TypeEffect, _sec );

My movie has 1 frame. I deleted the layer that had the button, so I have an AS layer with the following code in it.
txt_ani.startTypeEffect();
And a layer below it with my movie clip with the Function code on one layer and the text in another layer below it.
When I do play it, nothing happens. But when I add some frames to the movie, it starts after a delay, but I keep seeing "START" in my output tab due to the Trace I have, which makes the text appear very quickly. I think I may need some code to stop it from restarting.
Where should this code you provided be put? And do I need additional code to have the text not speed up?

Similar Messages

  • HT2534 ummm, we don't have the none button to select for our payment type, how can you set it up without that button or a credit card??? apple isn't doing to good of a job so far and i'm not impressed

    Hi, I'm setting up an account for my brother, but apparently we need a credit card. Neither of us own one and the system won't let us continue without one. Now I know that there's supposed to be a none selection, but it won't appear on ours. How can we continue if we don't have a credit card or the none selection button??? Help us please!!!!

    When I created a new account on my computer's iTunes yesterday, I first logged out of my existing account. I then found a free app in the store, clicked on it's free 'price' to 'buy' it, clicked on 'create Apple id' and filled in details about the new account and which gave me the option of 'none' for the payment details - clicking on the 'verify' email that I received then allowed me to download a free app.
    That is the process that you are using when you tried to create both new accounts ? The instructions won't work on existing accounts (even if the account has only been partially created), and you are in the country that you are trying to create the account for ?

  • How do you reset an ipod without the buttons on it?

    i was on my ipod touch and then suddenly the screen just turned black and the loading sign has been on it for about an hour. do you know how to reset or anything? but if i press any button, nothing happens.

    See Here for
    Frozen or unresponsive iPod touch
    Try this First...
    Press and Hold the Sleep/Wake Button and the Home Button at the Same Time...
    Wait for the Apple logo to Appear...
    Usually takes about 15 - 20 Seconds... ( But can take Longer...)
    Release the Buttons...
    http://support.apple.com/kb/ht1430

  • How do I start my MacBook without the Battery Installed

    My battery has started to Bulge and I am having the usual problems I have read about with this issue, the trackpad isn't working, premature shutdown, etc. I am living thousands of miles away from an Apple Store so I have given the battery to a friend to either get replaced or buy a new one. In the mean time I want to use the MBP without the battery. How do you start the MBP without the battery being installed?
    I know there will be a reduction in performance but I am not worried about that at the moment as I need some of the info of my hard disk. It can't run any slower than it is at the moment, it's dead.

    Kappy Thanks I have started it again. I actually found this thread and tried it yesterday before my question but nothing worked. I left the computer uplugged over night and thought I had nothing to lose so I tried it agian this morning and it actually worked this time. I only had to use the Restart (Control-Command-Power) option not the SMC reset. Leaving the power disconnected must have cleared something somewhere.
    Thanks again.

  • How do you start a new text message to someone without including past history

    how do you start a new text message to someone without including past history

    You delete the current text message with that person and then create a new one.

  • How do you unlock your ipad without a passcode if it wasnt setup through itunes

    How do you unlock your ipad without a passcode if it wasnt setup through itunes

    How can I unlock my iPad if I forgot the passcode?
    http://www.everymac.com/systems/apple/ipad/ipad-troubleshooting-repair-faq/ipad- how-to-unlock-open-forgot-code-passcode-password-login.html
    iOS: Device disabled after entering wrong passcode
    http://support.apple.com/kb/ht1212
    How can I unlock my iPad if I forgot the passcode?
    http://tinyurl.com/7ndy8tb
    How to Reset a Forgotten Password for an iOS Device
    http://www.wikihow.com/Reset-a-Forgotten-Password-for-an-iOS-Device
    Using iPhone/iPad Recovery Mode
    http://ipod.about.com/od/iphonetroubleshooting/a/Iphone-Recovery-Mode.htm
    You may have to do this several times.
    Saw this solution on another post about an iPad in a school environment. Might work on your iPad so you won't lose everything.
    ~~~~~~~~~~~~~
    ‘iPad is disabled’ fix without resetting using iTunes
    Today I met my match with an iPad that had a passcode entered too many times, resulting in it displaying the message ‘iPad is disabled – Connect to iTunes’. This was a student iPad and since they use Notability for most of their work there was a chance that her files were not all backed up to the cloud. I really wanted to just re-activate the iPad instead of totally resetting it back to our default image.
    I reached out to my PLN on Twitter and had some help from a few people through retweets and a couple of clarification tweets. I love that so many are willing to help out so quickly. Through this I also learned that I look like Lt. Riker from Star Trek (thanks @FillineMachine).
    Through some trial and error (and a little sheer luck), I was able to reactivate the iPad without loosing any data. Note, this will only work on the computer it last synced with. Here’s how:
    1. Configurator is useless in reactivating a locked iPad. You will only be able to completely reformat the iPad using Configurator. If that’s ok with you, go for it – otherwise don’t waste your time trying to figure it out.
    2. Open iTunes with the iPad disconnected.
    3. Connect the iPad to the computer and wait for it to show up in the devices section in iTunes.
    4. Click on the iPad name when it appears and you will be given the option to restore a backup or setup as a new iPad (since it is locked).
    5. Click ‘Setup as new iPad’ and then click restore.
    6. The iPad will start backing up before it does the full restore and sync. CANCEL THE BACKUP IMMEDIATELY. You do this by clicking the small x in the status window in iTunes.
    7. When the backup cancels, it immediately starts syncing – cancel this as well using the same small x in the iTunes status window.
    8. The first stage in the restore process unlocks the iPad, you are basically just canceling out the restore process as soon as it reactivates the iPad.
    If done correctly, you will experience no data loss and the result will be a reactivated iPad. I have now tried this with about 5 iPads that were locked identically by students and each time it worked like a charm.
    ~~~~~~~~~~~~~
    Try it and good luck. You have nothing more to lose if it doesn't work for you.
     Cheers, Tom

  • How can you delete an app without losing saved data/progress?

    How can you delete an app without losing saved data/progress? Is there a way through iCloud? I have an 8gb 4th gen iPod touch. I have a lot of music, so with 8gb, space is limited. Some apps I have take up 20-30 MB. Some of these games I don't play that much, but I don't delete them because I have made a lot of progress (levels, scores, acheivements). It would be nice to delete some of these 30 MB apps that take up precious space, and them redownload them in the future when I have more space, but without having to start the whole game over.
    Also, I read somewhere that there might be a way to do this with iCloud, but I don't really know how.
    Thanks!

    This is the only way I know of.  It is messy though.
    How to transfer game saves between iOS devices, without iTunes, and without jailbreaking | TUAW - The Unofficial Apple Weblog

  • How do you switch to streaming without deleting synched photos in AppleTV?

    I have synced my photos onto my AppleTV and use them as my screen saver. I'd like to keep these photos on my Apple TV and also use the stream function to listen to my music playlists and movies. When I switch the option to streaming everything is deleted from my Apple TV, including the photos that I use as the screensaver. How do you switch to streaming without deleting synched photos in the Apple TV?

    Firstly, the ctrl-click option says turn of syncing not turn on streaming, but I'm not at all sure this is really what you want to do.
    In itunes, select the tv from the device list, then in the main part of the iTunes window select the summary tab and ensure you have custom sync enabled and that 'show only synced items' is unchecked.
    Click sync from the bottom RH corner, your tv should now see all the content in itunes provided it is checked. See This.
    Now you can work your way through all the tabs in the main window and select/deselect any content you want/don't want to sync.

  • What is the apple mobile device service? how do you start it ?

    what is the apple mobile device service? and how do you start it?

    Try Here   http://support.apple.com/kb/TS1567

  • How do you make audio fast without changing pitch?

    How do you make audio fast without changing pitch?

    PrPro may have that but I've always just gone over to Audition ... you change speed there, you're given a choice of keeping the pitch the same or allow it to change. Note ... if there's much cha ge in speed the result can be odd.
    Neil

  • How do you start a loop with an event and end the loop when u release ....

    How do you start a loop with lets say an event of some sort, whether it be holding down a key or pressing the mouse click and then stopping the loop when you release that key or mouse button.?
    double c = 1.8, i = 1, max = 90, exp = 0;
    final double inc = 0.002; //speed at while it increases
    boolean f = false, g = false;
    while (true)
        while (f == false && stopMeter == false) //increasing speed going up to 90
            exp = Math.pow (c, i);
            i += inc;
            pAngle.setText (Math.round (exp) + "");
            if (exp > max)
                f = true;
                g = false;
            } //end if
        } //end while
        while (g == false && stopMeter == false)  //decreasing speed going down from 90
            exp = Math.pow (c, i);
            i -= inc;
            pAngle.setText (Math.round (exp) + "");
            if (exp < 1)
                g = true;
                f = false;
            } //end if
        } //end while
    } //end whilethis is a snippet of my increasing increments. Its for an angle meter. I can't get it to stop, when the user clicks or does something... the program just gets stuck in an infinite loop. I am still new to java and i do not know how to fix this.

    You are in the wrong forum. Try this one instead: http://forum.java.sun.com/forum.jspa?forumID=31
    /M

  • How can you listen to music without headphones?

    How can you listen to music without headphones?

    - Try cleaning out/blowing out the headphone jack. Try inserting/removing the plug a dozen times or so.
    Try the following to rule out a software problem
    - Reset the iPod. Nothing will be lost
    Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Reset all settings
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup
    - Restore to factory settings/new iPod.
    - Make an appointment at the Genius Bar of an Apple store. Seems you have a bad headphone jack.
    Apple Retail Store - Genius Bar
    Apple will exchange your iPod for a refurbished one for this price. They do not fix yours.
    Apple - iPod Repair price
    A third-party place like the following will replace the jack for less. Google for more.
    iPhone Repair, Service & Parts: iPod Touch, iPad, MacBook Pro Screens
    Replace the jack yourself
    iPod Touch Repair – iFixit

  • How can I start windows 8 without useing my password

    how can I start windows 8 without useing my password

    Hi,
    Review the information posted in this thread.
    HP DV9700, t9300, Nvidia 8600, 4GB, Crucial C300 128GB SSD
    HP Photosmart Premium C309G, HP Photosmart 6520
    HP Touchpad, HP Chromebook 11
    Custom i7-4770k,Z-87, 8GB, Vertex 3 SSD, Samsung EVO SSD, Corsair HX650,GTX 760
    Custom i7-4790k,Z-97, 16GB, Vertex 3 SSD, Plextor M.2 SSD, Samsung EVO SSD, Corsair HX650, GTX 660TI
    Windows 7/8 UEFI/Legacy mode, MBR/GPT

  • How do you start the hardware test on an imac with bluetooth keyboard

    How do you start the apple hardware test on an imac with a bluetooth keyboard as the instructions is to press the D key whilst restarting? And of course the imac cant see the keyboard whilst booting up as the bluetooth connection has yet to be established

    Have you tried following the directions for running it from the DVD? The instructions are on the Hardware Test link.If you are correct and it cannot due to the wireless keyboard not making a connection you will need to borrow a wired USB keyboard.  

  • How do you download multiple apps without having to enter the password each time

    How do you download multiple apps without having to enter the password each time

    You don't, this is a security measure which can't be changed, however, if you purchase another App within 15 minutes your password should not be required.

Maybe you are looking for

  • Can I return my IPAD to apple store because IOS6 is defective?

    Can I return my IPAD to apple store because IOS6 is defective?

  • Changes made in iphoto library are not showing up in aperture

    I currently have Aperture referencing my photos off of my iphoto library. I have made changes (consolidated a couple of events) and imported more photos from my camera and both are not showing up in Aperture. The new photos I imported were placed int

  • Need User Exit before the Purchase Order saved!!!

    Hai All,     I am in search for User Exit before the Purchase Order gets saved.This User Exit should capture this generated Purchase Order and post it to the Destination System for further processing.     Can anyone help me to find this User Exit. Th

  • Greater function(Arithmetic) not working in graphical mapping

    Hi SapAll. in an Idoc To File Interface i have got a requirement where i need to compare occurance of two child segments  G02,G02 Under parent Segment G01 and then determine the occurance of target Record Structure. the IDOC structure is   G01       

  • Ise vm upgrade to 1.2

    I have been reading the documentation and just seeking some guidance on this upgrade. I have a standalone ISE on a 32 bit VM. Is the process to perform the upgrade on ISE itself then shut down and change the VM settings? Or change the VM settings and