Flash scripting help

Matt L

Suspended / Banned
Messages
852
Name
Matt
Edit My Images
Yes
i will love who ever solves thie problem forever :lol:

basically at the moment it is doing the following.

var frontCDWidth:Number = 200;
var frontCDHeight:Number = 300;

know it picks up these variables elsewhere (dont know where so cant go find them and stop them from there) but basically i want it to pick the sizes up from the img not have the code change the sizes, because at the moment it obviously distorts landscape pictures.

i hope this makes sense.
 
I think he's trying to resize images, but beyond that your guess is as good as mine :)
 
thats the problem i dont know what its doing in the first place :lol:

im using an itunes style gallery and i dont want it to resize the pictures i just want to it take the pictures as they are saved :lol:

the best i could do is send the whole code via email to someone to look through.

basically the same as this one on here
http://www.paulvanroekel.nl/picasa/imageflow/index.asp

but i dont think it is that one for some reason.
 
The link you posted uses flash to read the images from an xml file so the re-sizing would be done in the flash code not javascript.

Did you write the code you're using or download it from somewhere?
 
Ok, so it's not javascript at all then ;)

Sorry, flash isn't my thing so I can't even open the .fla to look at the code but I'm sure there's a few flash savvy people here - maybe edit the title of the thread to attract them :thumbs:
 
Actionscript as pxl8 says.. change the subject of this thread and you may get the right people viewing it :)
 
If you do a global search in Flash for the variable names you should find every time they are used...
 
You would need to preload the image with Actionscript and then use _height and _width within the variable declarations.

Since you are not competent with Actionscript, it would just be easier to hardcode the heights and widths in, and then just make all your images that size.
 
It could also be that the variables don't control the size of the image at all, it might be an object or sprite (can't remember the flash terminology) that controls it.
 
It wouldn't be too difficult to do it as Javascript for Photoshop. If you can't get it sorted in the next week I'll have a look but I'm just trying to put the finishing touches to version 1.2 of the Exif Border Scripts, editors, contact sheet generator etc etc

ADDED: Just realised that you may not just want a still :)
 
sorry havent been on here for a while, its still not sorted so for the time being i have changed gallery layouts. but if someone was kind enough to work out how to solve the problem it would be very much appreciated.

Might be worth asking "PAUL MR" one of our newer users, he knows about flash. He might be able to point you in the right direction. He has been extremely helpful to me over the past few weeks with javascript and there is a flash application on his web site.
 
Matt, have you got this sorted yet, sorry I've only just seen it!

You say it's getting these variables from somwhere else? External XML maybe?

Need a bit more info or even the .fla to really know what you're trying to achieve.
 
Looking at the code that comes from (iTunes Album Art Viewer) the variabels are setting up the basic frame. Of course the images wil need to be resized, to fit the frame. I think it is a case of ... decide what size you want and run with it, or.. find a viewer that handles multiple sizes and dimensional proportions more easily

Here is a snippet of code from the same file
this.setSides(-(shelveCDWidth / 2),-(shelveCDHeight / 2) + (Math.sin(angle * Math.PI / 180) * frontCDWidth),-(shelveCDWidth / 2) + shelveCDWidth,-(shelveCDHeight / 2),-(shelveCDWidth / 2) + shelveCDWidth,shelveCDHeight / 2,-(shelveCDWidth / 2),(shelveCDHeight / 2) + ((Math.sin(angle * Math.PI / 180) * frontCDWidth)));

you can basically see that these variables are pretty intergral in the whole set up, so it wont just be an easy cut and chop job

The variables

var frontCDWidth:Number = 200;
var frontCDHeight:Number = 300;

are set at the front of the script, allong with about 40 others

Richard King
 
not a cut and chop no... but if they're set prior to use it's easy enough to bend them to fit what Matt wants.

Any chance of a copy of the FLA Matt?

The problem with Flash is everything is relative, so saying that you want the sizes to come from the images isn't actually logical. What you want is the aspect ratio of the images and then bend the variables to fit that.
 
not a cut and chop no... but if they're set prior to use it's easy enough to bend them to fit what Matt wants.

Any chance of a copy of the FLA Matt?

The problem with Flash is everything is relative, so saying that you want the sizes to come from the images isn't actually logical. What you want is the aspect ratio of the images and then bend the variables to fit that.

i can email you a zipped folder with it all in later tonight if you like?.
 
Back
Top