HELP - Add a skip intro btn to AS3 preloader

Hello, I'm a bit of a newbie to AS3 and new some help!
I've created a preloader.swf that (when loaded) loads an external swf. I would also like to add a skip intro btn, but when I do, the preloader seems to loop over and over (blinking - I know, high tech).
This is the preloader code. I have it in the first frame of the preloader.swf:
stop();
var myRequest:URLRequest = new URLRequest("flash/index.swf");
var myLoader:Loader = new Loader();
myLoader.load(myRequest);
myLoader.contentLoaderInfo.addEventListener(Event.OPEN,showPreloader);
myLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,showProgress);
myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,showContent);
var myPreloader:Preloader = new Preloader();
function showPreloader(event:Event):void {
    addChild(myPreloader);
    myPreloader.x = stage.stageWidth/2;
    myPreloader.y = stage.stageHeight/2;
function showProgress(event:ProgressEvent):void {
    var percentLoaded:Number = event.bytesLoaded/event.bytesTotal;
    myPreloader.loading_txt.text = "Loading - " + Math.round(percentLoaded * 100) + "%";
    myPreloader.bar_mc.width = 198 * percentLoaded;
function showContent(event:Event):void {
    removeChild(myPreloader);
    addChild(myLoader);
On it's own, it works fine.
Then I added a MC with the instance name "skipIntro", and then added this script to the script above:
skipIntro.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage_2);
function fl_ClickToGoToWebPage_2(event:MouseEvent):void
    navigateToURL(new URLRequest("/residences/residences.php"), "_blank");
Any help? Thanks.

There doesn't appear to be anything wrong with the code.  Does it start behaving correctly again if you comment out that code?  Do you get any error messages?  The behavior you describe (looping/blinking) is indicative of an unhappy processor.

Similar Messages

  • FLVplayback: skip intro?

    So
    I'm making a flash project and I have 10 different videos on it (embedded using FlVPlayback) and all the videos have the same stupid intro. My boss would like me to add a "skip intro" button which would allow you to jump to about 19 seconds in the video.
    what I have done so far is insterted a video file without the introduction in a new keyframe and have the "skip intro" button linked to keyframe.
    the only problem is that if you do not wish to press the skip intro button, it stays up on the screen the entire time, and we would like it to disappear. I've thought about using skipintro.alpha = 0 at a cuePoint located 19 seconds in, but i'm not really sure how that would work.
    any ideas? am I on the right track? any shortcuts to what I'm doing?
    thanks!

    anyone?

  • Skip intro button please help

    I have a flash intro to my website and I have (2) buttons one sound one skip intro.  The sound works fine but the skip button will not work.  Here is my code.
    skipBtn.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
    function mouseDownHandler(event:MouseEvent):void {
    gotoAndPlay(401);
    any suggestions?

    This is for as3?
    WARNING: Text field variable names are not supported in ActionScript 3.0. The variable 'text' used for an unnamed text field will not be exported.
    WARNING: Actions on button or MovieClip instances are not supported in ActionScript 3.0. All scripts on object instances will be ignored.
    ReferenceError: Error #1065: Variable duplicateMovieClip is not defined.
    at default_fla::Symbol6_2/frame1()
    ReferenceError: Error #1065: Variable duplicateMovieClip is not defined.
    at default_fla::Symbol12_4/frame1()

  • FLV and skip intro...

    If I have an FLV that I've output as SWF with skin to have embedded into an HTML page, and now a 'skip intro' is needed - though I'd have to make note of the actual time or keyframe in which the intro completes...How is this possible? Clearly, a button would need to be added for that kind of interactivity?
    Is this sort of thing best for the videographer to build into his movie file (FLV)
    What would be the most appropriate method? Thanks.

    add a movieclip or button, assign a click event listener and in the listener function stop your video, remove and null your flvplayback instance and load or otherwise display the next part of your site/app.

  • Add wav file in flash using as3

    i want to add wav file to flash using as3 externally or
    internally..............

    If you look thru the Flash help files for adding sounds you
    will find the options you have and don't have.
    If you have already tried something and it is not working,
    then provide details of your situation.

  • Please help 'Translate' These codes from AS2 to AS3 for me

    Hi, i need help 'translating' these codes from Action Script 2 to Action Script 3. Please Do it for me:
    toc    loadText = new LoadVars();
        loadText.load("Curie.txt");
        loadText.onLoad = function(success) {
            if (success) {
                // trace(success);
                Curie.html = true;
                Curie.htmlText = this.Curie;
    Please translate it for me, i need it ASAP thanks
    Kenneth

    Thank you for helping me
    Kenneth
    Date: Thu, 15 Oct 2009 05:49:14 -0600
    From: [email protected]
    To: [email protected]
    Subject: Please help 'Translate' These codes from AS2 to AS3 for me
    Take a look at that:
    http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/migration.html
    There is a LoadVars section on that.
    There is also a tutorial here:
    http://www.republicofcode.com/tutorials/flash/as3externaltext/
    Cheers,
    CaioToOn!
    >

  • As3 preloader problem - Captivate5

    Hello all,
    Been searching around for this for a bit in a the forums and cant find anything on it here goes:
    I have a project that i built with a ToC for my company.  And i have a as3 preloader as well.
    Problem:
    Preloader is fine and centered in the middle of my project with out a ToC but when i add the Toc the preloader will not center in my project i have tried to alter it in the html file insterting <center> tags and such and also externalizing the skin or FMR SWF also removing and placing it back in and not getting a fix for it. I realize this maybe a simple fix but i cant find anything in the forums here discribing exactly this issue.
    can anyone help
    thanx
    bobby

    Hi,
    Going out on a stretch here but did you, by any chance, added external swf or widgets that would have set the values of either Stage.scaleMode or Stage.align. That could explain the effects you are seeing.
    Whyves
    www.flash-factor.com

  • How to add stop button in this code AS3

    Hello, im new to this adobe flash AS3. i want to create a simple play sound using flash + XML file for wbesite., this is my code
    all this code are working greate.. but i have the problem to add stop_btn code my playlist button already have pause, prevous and next and play.. only stop button i have fail to create. this is my code
    var my_songs:XMLList;
    var my_total:Number;
    var my_sound:Sound;
    var my_channel:SoundChannel;
    var current_song:Number = 0;
    var song_position:Number;
    var song_paused:Boolean;
    var myXMLLoader:URLLoader = new URLLoader();
    myXMLLoader.load(new URLRequest("playlist2.xml"));
    myXMLLoader.addEventListener(Event.COMPLETE, processXML);
    function processXML (e:Event):void{
    var myXML:XML = new XML(e.target.data);
    my_songs = myXML.SONG;
    my_total = my_songs.length();
    function playSong(mySong:Number):void{
    var myTitle = my_songs[mySong].@TITLE;
    var myArtist = my_songs[mySong].@ARTIST;
    var myURL = my_songs[mySong].@URL;
    title_txt.text = myTitle;
    artist_txt.text = myArtist;
    if (my_channel){
    my_channel.stop();
    my_sound = new Sound();
    my_sound.load(new URLRequest(myURL));
    my_channel = my_sound.play();
    my_channel.addEventListener(Event.SOUND_COMPLETE, onNext);
    next_btn.addEventListener(MouseEvent.CLICK, onNext);
    function onNext(e:Event):void{
    current_song++;
    if (current_song>=my_total){
    current_song=0;
    playSong(current_song);
    prev_btn.addEventListener(MouseEvent.CLICK, onPrev);
    function onPrev(e:MouseEvent):void{
    current_song--;
    if (current_song<0){
    current_song = my_total-1;
    playSong(current_song);
    pause_btn.addEventListener(MouseEvent.CLICK, onPause);
    function onPause(e:MouseEvent):void{
    if (my_channel){
    song_position = my_channel.position;
    my_channel.stop();
    song_paused=true;
    play_btn.addEventListener(MouseEvent.CLICK, onPlay);
    function onPlay(e:MouseEvent):void{
    if (song_paused){
    my_channel = my_sound.play(song_position);
    song_paused=false;
    } else if (!my_channel){
    playSong(current_song);
    can some one help with me... thank you

    stop_btn.addEventListener(MouseEvent.CLICK, onStop);
    function onStop(e:MouseEvent):void{
       if (my_channel){
          my_channel.stop();

  • Please help: Unable to stop intro from looping

    I've hired a good Flash developer who has most of his
    experience in Flash 8 - AS2. We developed an intro movie for our
    site, but when the intro is complete and the first page loads, the
    intro just restarts from the first frame (loops). We can't come up
    with a solution - the stop(); function does not seem to work in AS3
    as it did in AS2.
    My developer first tried to work entirely in AS2, but CS3
    will not permit us to add a Flash 9 player object when the project
    is compatible with AS2 - must be AS3 only.
    Any assistance in this issue would be greatly appreciated! It
    might be something very basic we are overlooking -
    Thanks in advance.

    The main timeline loops, kglad. The entire site "resets" and
    plays from the begining. Putting stop(); in the frames where we
    want the timeline to "stop" doesn't actually stop anything.

  • Help needed with Flash intro

    Hi,
    I've made a little Flash intro for a site I built in Golive.
    I have no knowledge of Flash whatsoever and I need some help to
    make sure that as soon as the intro finishes the visitor is
    redirected to the homepage. I made the intro in Imageready (so all
    frames ended up being bitmaps in Flash), but I read somewhere that
    I should use some scripting on the last frame. I've opened the file
    in Flash, but I'm not sure what script to use and how. Could
    someone help me out here (it's not a commercial site, it's just my
    own site but any help would not be less appreciated!)? And then, do
    I also need to add scripting to the html-page.
    My site is here:
    http://www.fdesign.eu/sicilia2007/index.html

    on the last frame put....
    this.stop();
    getURL("home.html");

  • Download helper add-on no longer works after update of firefox, what has changed?

    After I updated Firefox to 18.0.02 the download helper stopped working on 98% of the websites I watch TV programs on. What has changed and will it be returned to its previous condition?
    The website I go to is: http://www.free-tv-video-online.me/internet/

    Are you using an add-on as a download helper?

  • (Help) Using Input text in Flash CS4 AS3

    I am trying to take a user's input (His Name) and then greet the user on the next frame using the name he previously entered. I googled for 2days and was unable to find a way to do this on flash CS4 AS3, i guess because im very new to flash (only 2-3weeks )
    Any help would be greatly appreciated, and i am sorry if this was already answered in the forums.
    thanks for reading.

    If your interested... here's some general "rules of the road" that are basically courtesies...
    Don't post the same question in different forums (crossposting).  Folks that help don't like that because they can waste their time providing the same response someone else already offered elsewhere, or their helpful info gets no attention because the OP (original poster) got wrapped up in the discussion elsewhere and never went back to the other forums.  I saw one time where the OP suffered from doing this... the first person to respond in one forum said what they wanted couldn't be done, while my response in another forum showed them how to do it... but they accepted that it couldn't be done and never returned.
    Don't post in someone else's posting unless the exact same situation applies to you and it is a current posting.  It is a bit rude to step into someone else's posting just to get attention, which some people do... some with totally unrelated problems.  Or if your problem is even slightly different, it can end up confusing matters for all involved... trying to juggle helping two people where different solutions are needed.
    If you get one problem resolved and have another you want help with that does not involve the first, start a new posting.  People search these forums so it helps to have topics match the postings, which will not apply if mutliple topics get resolved under one title.  I recently saw one person tell someone to start a new posting even though they were following up to clarify something of the solution they received... that's wrong and is more likely someone with a case of points greed... as useless as points are, it happens.

  • Need help in screen capturing for flash CS4 AS3

    Hi, i need help!!!!!!!!!!!!!!!!!!!!!! URGENT!
    I am currently doing Augmented Reality.
    I got my marker to detect my model but my problem now is how to screen capture the content that is in swf.
    (As in capture the dae model shown in the comp not from webcam.)
    & also i just want to capture the swf window not the whole desktop.
    I read online, they say its impossible?
    Or is it possible to call screen capture function in javascript to flash CS4? (LIke external data)
    (Moreover, does anyone know how to detect multiple dae models with different markers?)
    Anyone can help??? Thanks in adv!!

    My current program (Flash CS4, AS3) only can capture what the webcam sees.
    How do i change it to screen capture (something like print screen) with my .DAE models?
    In the case, when i click on the capture button, it print screen.
    Here's part of the code that capture what the webcam sees.
    private function captureImage(e:MouseEvent):void
       bmd.draw(stage);
       bmp = new Bitmap(bmd);
       bmp.x = 140;
       bmp.y = 40;
       addChild(bmp);
       capture.visible = false;
       saveButton.visible = true;
       discardButton.visible = true;
    Really really need help! URGENT!
    Thanks!

  • Help plsss converting this AS2 code to AS3!!

    here is a little AS2 code that is in fact a photo gallery
    that i use in my site and i want to convert it to AS3 but i just
    cant seem to get it right... could someone plssss help me?!?!

    with what part are you having trouble?

  • Help with graphic skipping!!!

    I just built my own computer and i am having problems with my new graphics card. It is a GeForce4 Ti4200. When i first completed my new PC, it was working fine. All of a sudden, I started having graphic problems. Whenever I run a screen saver, play a DVD or simply scroll up and down in explorer, it seems as if the screen is skipping. The image will play for for a second, freeze for a split second, and continue doing this. It is almost like a CD that is slowly skipping. I have tried changing the refresh rate, color depth and resolution, on top of changing other various properties. This is driving me crazy and I don't know what to do. can anyone help me. Please!!!

    My power supply is 350 watts
    this is everything attached to my PC
    *has its own power source
    -180gb HDD (WD) [Windows XP Pro]
    -cd-rw 52x (Memorex)
    -DVD 16x (SONY)
    -flopy drive (sony)
    -soyo dragon p4x-400 dragon ultra platinum w/onboard audio and LAN (audio is currently out to my stereo system's speakers)
    -sigma box 4 port usb 2.0
    -512 MB pc3200 DDRRAM
    -pentium 4 - 2.8 Ghz CPU w/fan
    -MSI nvidia Geforce Ti4200 8x-vtd8x with (tv-out was in use but not currently)
    -side panel fan
    -PS/2 keyboard (Micrsoft)
    -usb mouse (microsoft)
    -gravis gamepad
    -computer microphone
    -NEC 15" LCD flat panel monitor*
    -iomega external zip drive 250MB*
    -canon bjc printer*
    -canon canoscan scanner*
    -desktop speakers*
    -56k external modem* (internal wouldnt work - idont know why)

Maybe you are looking for