A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: swf files loading at different speeds

  1. #1
    Junior Member
    Join Date
    May 2007
    Posts
    24

    swf files loading at different speeds

    Hi

    I've got a website w/ a few different pages (each it's own swf file). When buttons are pressed the first time things seem good. But if you return to a button that's already loaded once, the movie clip file that has the navigation (and is the background), loads either too slow or too quick for the other swf files and it gets stuck in random spots. It's hard to explain, but something is not working properly. If anyone can check my url and give me some feedback, I'd be grateful.

    Thanks so much.

    http://www.somefineprint.com

  2. #2
    Senior Member guardiankitty's Avatar
    Join Date
    Dec 2006
    Location
    Here
    Posts
    215
    Hmm...

    Interesting: Looks like a very nice site!

    The buttons on the front page need a tad bit of work, for instance: Make a box over each of the buttons, so that the mouseOvers work a little better.

    Also turn up the fps, if my eyes are not lieing, looks like you are running it at 24fps, try cranking that puppy up to 60-120

    You can 'float into space' , this looks like the issue you are talking about.
    I think some very simple logic can fix this, just be sure to check before you move something, rather then after moving it.


    And as far as loading in separate swfs- I dont see any issue with that... I do have really really fast internet though... so it might be manifesting.




    Hope this helps and good job on the very nice site!

  3. #3
    Junior Member
    Join Date
    May 2007
    Posts
    24
    Thanks so much Guardian Kitty! I think it worked. I thought fps topped out at around 24, but boosting up to 120 has made it much smoother and it's not hanging up in limbo land anymore.

    I know my buttons need some love. Someone else suggested some parent/child labeling? Not sure how to do that, but your suggestion could be easier. What do you think?

  4. #4
    Junior Member
    Join Date
    May 2007
    Posts
    24
    Well, maybe I typed too soon. I did a few more trials and it did get hung a few times, but not as bad as before.

    Can anyone tell me if there is a fps hierarchy - meaning, if my index swf file is set to 120 fps, but another swf that loads into the index is set to say 24, will it run at 120 or 24?

  5. #5
    Senior Member guardiankitty's Avatar
    Join Date
    Dec 2006
    Location
    Here
    Posts
    215
    Quote Originally Posted by Bike betty View Post
    Thanks so much Guardian Kitty! I think it worked. I thought fps topped out at around 24, but boosting up to 120 has made it much smoother and it's not hanging up in limbo land anymore.

    Well, maybe I typed too soon. I did a few more trials and it did get hung a few times, but not as bad as before.
    If i could see your code, I would be happy to help in anyway that I can.


    Can anyone tell me if there is a fps hierarchy - meaning, if my index swf file is set to 120 fps, but another swf that loads into the index is set to say 24, will it run at 120 or 24?
    The host swf (the one doing the loading) dictates the FPS of the movie (I could totally be wrong, but I think my memory serves me correct).




    Yeah, so if you want post the part of the code which is moving all of the swfs, and ill see what I can do.



    Good Luck!
    ~GK>'.'<

  6. #6
    Senior Member Steven FN's Avatar
    Join Date
    Mar 2010
    Location
    CA, USA
    Posts
    276
    Just wanted to voice some concerns.

    I'm glad that the animation is smoother at 120 fps, but the drawbacks are possible CPU overloads, causing browsers to freeze and quit unexpectedly. I would look into possibly more efficient coding and/or designing.

    I know for this instance it is alright but if a visitor is on a slower machine it will probably be pretty choppy.

    Framerates should stay at 24-30 fps, in my opinion.

    I would also like to take a look at your code for you. Kudos on the site.

  7. #7
    Junior Member
    Join Date
    May 2007
    Posts
    24
    I'd be happy to share my code. I'm working in CS4 w/ AS 3.0.

    Here's the part I think that you are interested in:
    function moveContent (theXPosition:Number, theYPosition:Number, theSection:String):void{
    var myxTween:Tween = new Tween(content_mc, "x", Regular.easeOut, content_mc.x, theXPosition, 3, true);
    var myyTween:Tween = new Tween(content_mc, "y", Regular.easeOut, content_mc.y, theYPosition, 3, true);
    sectionLoader.source = theSection;
    }

    And here is a what I have for my poka dot buttons:
    content_mc.about_mc.addEventListener (MouseEvent.CLICK, aboutClick);
    function aboutClick( event:MouseEvent):void
    {
    moveContent(150,32,"about.swf");
    }

    content_mc.about_mc.addEventListener(MouseEvent.RO LL_OVER, aboutOver);
    function aboutOver( event:MouseEvent):void
    {
    content_mc.about_mc.gotoAndPlay(2);
    }

    content_mc.about_mc.addEventListener(MouseEvent.RO LL_OUT, aboutOut);
    function aboutOut( event:MouseEvent):void
    {
    content_mc.about_mc.gotoAndPlay(15);
    }

    content_mc.about_mc.buttonMode = true;

    I can't tell you how happy I am to have some experts check this out. Thanks a million!!!

  8. #8
    Junior Member
    Join Date
    May 2007
    Posts
    24
    I got a tip from someone else that maybe things were getting hung up because I have a few tweens happening at the same time. This makes sense. I need to add a onCompleteEvent to start the second tween. Looking at the code above, can anyone help me write and place the correct code? Any help would rock!
    Thanks

  9. #9
    Senior Member Steven FN's Avatar
    Join Date
    Mar 2010
    Location
    CA, USA
    Posts
    276
    It has to be something with the Tweens, I've done animations with tons of tweens and it didn't really slow anything down at 12 fps.

    Is it possible to get a source with just 1 button with the above code and dot animation to see what exactly is going on?

    I'm lazy and don't want to spend the time recreating a similar effect, when it could be just the way you have your tweens setup.

    I'm new to AS3, but am able to read it. I'm more of a AS2 guy.

  10. #10
    Junior Member
    Join Date
    May 2007
    Posts
    24
    Thanks Steven. I've stripped the file down to just one button, but it's still too big for me to upload to this forum. If you send me your email I can send it to you. My email is sfmolly@mac.com.
    thanks again!

Tags for this Thread

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