dcsimg
A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: if/else statement works locally, but not online

  1. #1
    Nose Picker
    Join Date
    May 2002
    Posts
    66

    if/else statement works locally, but not online

    This is in CS3 exported to player 8. I've got an external swf inside a container, and inside that contained swf is another external swf in a container. Like so: root/container/humanHolder.

    So this code is inside "container" timeline and should make the swf in "humanHolder" go to a specifically named frame if the swf is on a frame less than 339.

    The code works on my drive, but not after uploaded to my site. Any idea why?

    PHP Code:
    if (_root.container.humanHolder._currentframe <= "339") {
        
    _root.container.humanHolder.gotoAndPlay("beamOut01");
    } else {
        
    _root.container.humanHolder.gotoAndPlay("beamOut02");


  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    _currentframe is supposed to return a Number, not a String:
    <= 339 would be better
    Not sure if this will solve the problem, but it won't hurt

    gparis

  3. #3
    Nose Picker
    Join Date
    May 2002
    Posts
    66
    Still not working. One thing that I forgot to mention is that the script half works. If the humanHolder swf is less than 339 it doesn't react. If the frame is greater than 339 it does what it should. Again, it works perfectly when played from my local drive.

  4. #4
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    the difference between local and online would be the time it gets to load the swf.
    You should make sure the external swf has completely loaded before sending this command. Methods would differ depending on how you load (loadMovie or MovieClipLoader)

    gparis

  5. #5
    Nose Picker
    Join Date
    May 2002
    Posts
    66
    my god, you're absolutely right. The loaded swf is REALLY big. that part of the movie is probably not loaded yet. Thanks, man! Should be easy enough to fix.

  6. #6
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    Your footer image is a bit big too

    You should resize it according to FK rules.

    gparis

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