dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Code recently stopped working

  1. #1
    Junior Member
    Join Date
    Jan 2006
    Posts
    2

    Code recently stopped working

    i am a web developer/coder and was asked to come up with a flash file that will display a different logo depending on the incoming url. The url value is passed to the file and then an if/else script selects the logo display.

    frame 1 has this:
    stop();

    var urlSource;

    if (urlSource == "www.license-europe.com")
    {
    this.gotoAndStop(3);

    }
    else{
    this.gotoAndStop(2);
    }


    frame 2 has the default license logo
    frame 3 has the logo specifically for license-europe

    if the url http://www.license-europe.com/ is entered no logo displays. however, a simple shift-refresh will cause the movie to show properly. once the logo image is cached it works properly every time. if i clear the browser cache and try again, it's back to the problem. the same acts for the default display for http://www.licensemag.com/.

    this used to work back in the spring and only last week it was brought to my attention that it no longer does.

    any suggestions would be greatly appreciated as i am completely baffled.

    cheers,
    def

  2. #2
    Member
    Join Date
    Aug 2006
    Posts
    31
    try throwing onLoad code around the if/else statement.

    code:

    onClipEvent (load) {
    //other code here
    };



    Put that on a movieclip within your first frame. Im a bit out of it right now, so i cant tell you exactly, but you can fool around with the first bit so that you dont need the use of a movieclip and can just put it in the frame itself.

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