A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: Flash intro to index.html - NO CAN DO!!!! HELP! REWARD!!!!

  1. #1
    Junior Member
    Join Date
    Mar 2009
    Location
    Miami
    Posts
    8

    Flash intro to index.html - NO CAN DO!!!! HELP! REWARD!!!!

    Okay, I am going to need a master here or something. I am trying to get a flash intro to go to the index.html page of a site. It's supposed tp redirect you when an "enter" button is clicked at the end of the intro. Once you click "enter", the screen fades to black then the site should appear - but, of course it isn't working.

    After the button is pressed, the screen fades to black but never redirects, or it fades out then fades back into the button again. I have an action code placed at the end of the timeline. It is an animantion and the only AS in the page is START and STOP of the flash file. On the last frame of the animation, I have this code as of right now -

    navigateToURL(new URLRequest("http://www.myurl.com/home.html"), '_self');

    It fades out after the button click, but wont redirect. I've heard and read a million different ways to fix the problem but nothing is working for me.

    Most of the time, when I publish the file after trying new code for the action, CS4 gives me a "compile error" code. the code above is one of about 30 that I've tried that doesn't give me the error. I know I am SOOOO close to getting this, but I'm not a flash guy and I need some expert help.

    ANyone who can solve this for me - I will buy and give you ANY single flash file you want from flashden.net because I have some credits on there..

    ANd BTW, I have all the html files labeled and linked correctly so I don't know wtf is going on here but I'm sure it's not a filename mistake or anything simple.

    I have been ALLLLLLLLL over the web searching for an answer and I can't figure this out.

    I will send you my .fla file, my .swf file, and even the original file that you can keep - it's a really nice animation.

    Here is a link to the animation so maybe it will help in understanding the coding issue. Thanks in advance.

    http://flashden.net/item/opening-curtain/14496

  2. #2
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    Have you put traces in frames to see if those traces are executed?
    - The right of the People to create Flash movies shall not be infringed. -

  3. #3
    Junior Member
    Join Date
    Mar 2009
    Location
    Miami
    Posts
    8
    No I haven't done that, I'm not sure how to test it like that. Do you have a quick example of how to do that? I don't know flash all that well but I'll figure it out if you could give me an example. Thanks

    And btw, when I say intro to index - I'm just using that to explain what I'm doing here.... The actual Index.html page is the intro page with the flash and the page it should go into is home.html.

    This sucks, I have a deadline for this project.. Deadline was yesterday..lol

  4. #4
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    Just write trace("whatever"); and place that in frames you want to know they are executed.
    - The right of the People to create Flash movies shall not be infringed. -

  5. #5
    Junior Member
    Join Date
    Mar 2009
    Location
    Miami
    Posts
    8
    Nope, thanks man, but that does nothing for me.. I know people have used this same flash intro doing it with flash 8 and CS3, so it's obviously a bug in CS4 that's stopping me from getting it right. I need a workaround or a code to compensate for this error somehow.. I spent $$$ out the ass for this program and it craps right on my face...

    Any programmers out there have any ideas?? SOMEONE has to know a workaround or a correct code for this..

  6. #6
    Senior Member
    Join Date
    Jan 2008
    Location
    UK
    Posts
    269
    Nope, thanks man, but that does nothing for me
    Then it's probably not executing that line of code. Use trace to check that a particular line of code is being executed. After the navigateToUrl code, on the next line, write:

    Code:
    trace("we got to this point");
    Then, in the output window in the editor (hit F2 if its not there already), you will see "we got to this pont" if it indeed did get to that point in the code.

    If it didn't, you may have a 'stop();' somewhere beforehand preventing the timeline from moving on, or perhaps your fade to black isn't completing.

  7. #7
    Junior Member
    Join Date
    Mar 2009
    Location
    Miami
    Posts
    8
    Quote Originally Posted by _Ric_ View Post
    Then, in the output window in the editor (hit F2 if its not there already), you will see "we got to this pont" if it indeed did get to that point in the code.

    If it didn't, you may have a 'stop();' somewhere beforehand preventing the timeline from moving on, or perhaps your fade to black isn't completing.
    Ric, at what point will I see the trace in the output window? After I publish? I've been tweaking the code and I finally got it publish with no error message, but I never saw anything about the trace in the output window.

    You mentioned that It might have a stop();

    It does have a stop on the last frame of the animation layer in the timeline, along with most of the other frames on that layer. Everyone says they paste the getURL after the stop(); so I dint know what the hell the deal is. I uninstalled my CS4 and installed macromedia flash 8 pro and this is what I'm working with as of now - my current code is

    navigateToURL(new URLRequest('http://www.myURL.com/home.html'), '_self')

    and it publishes without error. I still have the trace code on the next line, but never seem to see trace results anywhere. When I upload the .swf and test the site, the animation goes perfect and then stops at the screen with the button - just like it should. When I press the button, it fades out properly but STILL doesn't redirect to my homepage. I even tried to change the home.html to kjj.html to see if an improper file would bring the browser to an error page and it still didn't go anywhere, which leads me to believe that there is something wrong with the buttons function or the positioning of the stop(); ...........

    What else could it be and how can I figure this out?? There are NO actions applied to the "edit button", there are only actions on "edit scene"..

    This is killin me, I'd give my left nut to figure this one out right about now..


    What is the possibility of getting a programmer or anyone to rewrite something that I could paste into the index.html file?? Is it possible to add a code to the html that would re-direct me to the homepage? Like a workaround of some sort that could be placed after the </object>??
    Last edited by SlickVick; 03-19-2009 at 04:09 PM. Reason: added to post

  8. #8
    Junior Member
    Join Date
    Mar 2009
    Location
    Miami
    Posts
    8
    One more thing I just realized - WHen the screen fades out to black, the button is still there! (but you cant see it) SO I clicked it and then the page faded back in, without the animation of the curtains though. I press it a third time and it fades back out.. It does this each time I press the button. Does that mean that the animation itself is somehow incomplete or needs a stop somewhere??? I feel like I'm getting so close.. Somebody help! Ric! Help me! lol

  9. #9
    Senior Member
    Join Date
    Jan 2008
    Location
    UK
    Posts
    269
    You should see the trace message in the editor when you publish - the fact you don't see the message means that code never gets executed. Without seeing your work we can't tell you why, but like I said, you might be stopping the playhead on an earlier frame.

  10. #10
    Junior Member
    Join Date
    Mar 2009
    Location
    Miami
    Posts
    8
    Would you mind taking a quick look at it??? Could you send me your email in a PM so I could attach the .fla file??? I cant get it compressed enough to add as an attachment on here.. Thanks a million. Maybe you'll see a simple glitch in the animation layer named ACTION.. Maybe not.. Hopefully

  11. #11
    Junior Member
    Join Date
    Mar 2009
    Location
    Miami
    Posts
    8
    content.zip

    I attached the .swf file so you can open in flash to see what I'm talking about with the button.. When I open is in flash, once it's complete and I press enter, it says WE GOT THIS FAR...

  12. #12
    Junior Member
    Join Date
    Mar 2009
    Location
    Miami
    Posts
    8
    Problem solved.. CS4 is ****ed, had to have some sort of glitch because I did it with a similar file that was set up the same way and it worked. Only problem was I needed THAT animation. I ditched CS4, went back to my old school Macromedia Flash 8 pro, got rid of the stupid ass button, used this code ----- <script type="text/javascript">

    // number of seconds before page redirects
    var seconds = 12000;

    // page to redirect to
    var redirectUrl = "http://myurl.com/home.html";

    // don't touch
    setTimeout("redirect()", seconds);
    function redirect() {
    window.location = redirectUrl;
    }
    </script>

    ------- And now it works fine. Don't get me wrong, CS4 has some amazing new capabilities but if the **** cant handle a simple button click to fade and redirect with a perfectly recognizable code - I don't wan't it. I think I'll piss on my copy and spread it across limewire because it deserves to cost nothing..

    Thanks for the help Ric, at least I learned how to trace a script, lol.
    Last edited by SlickVick; 03-20-2009 at 11:03 PM. Reason: typo

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