Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Tween Stalling

Community Expert ,
Mar 10, 2008 Mar 10, 2008
I have a function on my main timeline that includes a few tweens, everything runs fine when I test in Flash or run the swf from my desktop. When I run the .swf from a browser one of the tweens inexplicably stalls halfway through. Any general reasons why this might happen?
TOPICS
ActionScript
539
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Mar 10, 2008 Mar 10, 2008
Make sure its not a weak reference to the tween.

var myTween:Tween;

function something(){
myTween = new Tween(blahblah);
}

would not be weak.

function something(){
var myTween:Tween = new Tween(blahblah);
}

would be weak. Once the function has run, the reference to myTween can be GC since there is no base reference.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 11, 2008 Mar 11, 2008
Thanks, I was writing the tween variable outside of the function as you suggested.

As I mentioned it was only happening inside of a browser, so i thought it might be a memory issue—I'm scaling an image 600%. But then I tried it with no image and got the same stalling. I've managed to solve the problem by running the tween once outside of the function, before I call it, with the same beginning and ending scale so nothing moves. Don't know if that will come back to haunt me, but so far I can't break it.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Mar 11, 2008 Mar 11, 2008
I suppose its getting GCd when you're scaling that image. Must be eating a lot of mem.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 11, 2008 Mar 11, 2008
LATEST
I am worried about memory with this. Would the amount of scaling be an issue? Would it help if the scaling could be lowered to something like 400%? I'm also scaling a movie clip with jpegs inside and was wondering if I would be better off trying to use the bitmap class, which I'm finding a bit intimidating.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines