Importing images & text into flash

fantasizzlin

Born

Posts: 4

3+ Months Ago

Hi,

Firstly thanks for reading and trying to help.

I have this database that is full of text and absolute URLs for images. It is easy to present this in HTML. How about in Flash? I heard that it is easy to import text into a text field in Flash, but not both text and images.

Please please please help me, as i want to display text & images in a flash page based on what is contained in a database

Thank you.

torbjorn

Novice

Posts: 23

3+ Months Ago

It's real easy to import images into Flash by using the actionscript "loadMovie"

Thanks. BUt what about both images and text... YOu can imagine in an article, it has long text coupled with a few images. HOw do i import that piece in? In html, it's just a long text coupled with <img> tags.

Thanks again.

lostinbeta

Guru

Posts: 1402

Loc: Philadelphia, PA

3+ Months Ago

If you are using Flash MX 2004, an HTML enabled textfield in Flash MX 2004 supports the <IMG> tag. And that would be your easiest method.

If you are not using Flash MX 2004, then I am sure it can be done with a little craftiness of loading the images to clips and using a textbox for the text, but I am also sure this is quite complicated to set up just right. And I know I don't have the time to work something out for you. Sorry

fantasizzlin

Born

Posts: 4

3+ Months Ago

Thank you moderator!!

OK, we are government compliant, that means we only use Flash 6. My co-developer suggests having 2 movie clips glued together. One has the text with gaps, and the other just contains images. He hopes they can scroll together.

Is that advisable?

solaris

Student

Posts: 83

Loc: NC

3+ Months Ago

yeah you can easily import text into individual text fields via text files, but im not sure if this is what you are trying to do

lostinbeta

Guru

Posts: 1402

Loc: Philadelphia, PA

3+ Months Ago

In Flash MX (which is Flash 6) you can use the ScrollPane component to scroll a movieclip symbol.

So inside a movieclip symbol have your textboxes, your clips to load the images to (via loadMovie()... only non-progressive .jpg images can be dynamically loaded), and your actions for loading stuff in, and then have the scrollpane component load this container clip.

Notes:

You may want to use LoadVars() to load the text in. For one it is more efficient and for two it allows you to have the onLoad event handler, which will then allow you to use the refreshPane() function after the text gets loaded in and displayed, so that the scrollpane will have a more accurate scroll.

If you don't know how to use any of these, I recommend checking out the actionscript reference that comes with Flash (Window/Reference) for information on these functions, etc.

fantasizzlin

Born

Posts: 4

3+ Months Ago

Thank you host!!! Let's play a warcraft game to relax after this tedious discussion!