dynamic flash vars from embed tag not loading soon enough?

  • susancbk
  • Proficient
  • Proficient
  • susancbk
  • Posts: 293
  • Loc: New York City

Post 3+ Months Ago

in the following swf

http://photojojo.com/imageEditor/vinyls ... =480&h=360

I've made a cropper.
that cropper is supposed to have a live preview on the right of whats being cropped - which - isn't working.

Part of it depends on two variables...a width and height.
If I set those two variables manually - the live preview works.

If i try to get it, however, from a query string passed to the embed tag of the swf... the live preview dosen't work.

ie
Code: [ Select ]
<embed src="cropper.swf" FlashVars="img=<?=$img?>&w=<?=$w?>&h=<?=$h?>&prodW=<?=$prodW?>&prodH=<?=$prodH?>" ........


Now I know my variables are in fact being loaded into my actionscript because in the bottom right text box i print them.

This leads me to believe that perhaps they're not being loaded quick enough ?

Another reason I believe its related to them not being loaded quick enough - is because when I refresh that page -- everything loads and then for just a split second I see the variables being populated into the textbox (ie.. i see it flash from "DEFAULT CONTENT" to "width: 480 height:360"

in other words, those variables are coming in too late...after most of the swf is loaded ...therefor breaking the portion of my cropper that depends on those variables.


Am I on the right track with these assumptions?
Does any one have a suggestion for a fix?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • susancbk
  • Proficient
  • Proficient
  • susancbk
  • Posts: 293
  • Loc: New York City

Post 3+ Months Ago

arghhh figured out what was going on...

wasn't that my variables weren't being loaded --- but they were being loaded as strings

so... a simple parseInt(variableName)

makes everything better.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 9 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.