Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 03-29-2004, 01:16 PM   #1
Registered User
Join Date: Mar 2004
Posts: 2
Default Dynamic image caption positioning

I have a Flash slideshow that pulls the image information from an XML file. You've probably seen these all over the place. Anyway, what I'd like to do is make the text accompanying the image to appear below or to the side of an image depending on the image dimensions. For example, if the image is vertical the flash file should be smart enough to put the caption to the right. On the otherhand, if I have a wide horizontal shot the caption would appear below it. Sounds pretty simple, but I'm not sure how to do this. Anyone seen a good tutorial or know of an easy way to automate this?
jason000 is offline   Reply With Quote
Old 03-29-2004, 05:21 PM   #2
Join Date: Sep 2002
Location: Toronto, ON
Posts: 2,068

just use if statements:

if (width >= some width) {
then put horizontally;
} else {
put vertically;

You'll just have to know what the max size is for a thin and wide image. then you can use those in the if function
o Please do a search before you post
o Please use the [ as][ /as] tag for your code (so we can read it clearly)
Slowburn is offline   Reply With Quote
Old 03-29-2004, 11:32 PM   #3
Registered User
Join Date: Mar 2004
Posts: 2

Thanks, I'll give it try.
jason000 is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

All times are GMT. The time now is 02:29 PM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.