Welcome to Dream.In.Code
Getting Help is Easy!

Join 107,647 Programmers for FREE! Ask your question and get quick answers from experts. There are 901 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



loading html into flash

 
Reply to this topicStart new topic

loading html into flash

BlueCube
post 16 Mar, 2006 - 03:00 PM
Post #1


THIS IS SPARTAAA

Group Icon
Joined: 19 Feb, 2002
Posts: 3,569



Dream Kudos: 70
My Contributions


So I never did fully get that last problem I had, but here is another solution. I've heard you can have a dynamic text box that is drawn, then loads an html page inside it. If so, I could do the image pulls that way. Anyone?
User is offlineProfile CardPM

Go to the top of the page


pioSko
post 16 Mar, 2006 - 04:29 PM
Post #2


still.dreaming

Group Icon
Joined: 6 Jun, 2003
Posts: 1,888



Dream Kudos: 225
My Contributions


You can load simple html into text boxec.. stuff like bold, italic .. not much else confused.gif
User is offlineProfile CardPM

Go to the top of the page

BlueCube
post 17 Mar, 2006 - 08:20 AM
Post #3


THIS IS SPARTAAA

Group Icon
Joined: 19 Feb, 2002
Posts: 3,569



Dream Kudos: 70
My Contributions


So you can't display an HTML page? Some kid at flash class at school seemed to think so, but I went home and tried what he explained and kind forgot...
User is offlineProfile CardPM

Go to the top of the page

pioSko
post 17 Mar, 2006 - 09:20 AM
Post #4


still.dreaming

Group Icon
Joined: 6 Jun, 2003
Posts: 1,888



Dream Kudos: 225
My Contributions


I did a bit of reading in the Flash manual and I have to say I'm a bit surprised but you actually CAN place images and even SWF files into textfields using HTML... and even give the img a href link...

here's how according to the manual (there was a lot more there):
QUOTE
Embedding SWF and JPEG files
To embed a JPEG or SWF file in a text field, specify the absolute or relative path to the JPEG or SWF file in the <img> tag’s src attribute. For example, the following code inserts a JPEG file that’s located in the same directory as the SWF file:

textField_txt.htmlText = "<p>Here’s a picture from my last vacation:<img src='beach.jpg'>";

textField_txt.htmlText = "Here’s an interesting animation: <img src='animation.swf' id='animation_mc'>";



Supported HTML tags:
This section lists the built-in HTML tags supported by Flash Player. You can also create new styles and tags using CSS; see Formatting text with Cascading Style Sheets.

Anchor tag (<a>)
The <a> tag creates a hypertext link:
CODE
urlText_txt.htmlText = "<a href='http://www.macromedia.com' target='_blank'>Go home</a>";

You can also define a:link, a:hover, and a:active styles for anchor tags by using style sheets. See Styling built-in HTML tags.

Bold tag (<b>)
The <b> tag renders text as bold, as shown in the following example:

CODE
text3_txt.htmlText = "He was <b>ready</b> to leave!";

A bold typeface must be available for the font used to display the text.

Break tag (<br>)
The <br> tag creates a line break in the text field.
CODE
text1_txt.htmlText = "The boy put on his coat. <br>His coat was <font color='#FF0033'>red</font> plaid.";

The closing </br> tag is optional, but it is good practice to include it.

Font tag (<font>)
The <font> tag specifies a font or list of fonts to display the text.
CODE
myText_txt.htmlText = "<font color=’#FF0000’>This is red text</font>";

The font tag supports the following attributes:
* face: Specifies the name of the font to use. As shown in the following example, you can specify a list of comma-delimited font names, in which case Flash Player selects the first available font:
CODE
myText_txt.htmlText = "<font face=’Times, Times New Roman’>Displays as either Times or Times New Roman...</font>";


* size: Specifies the size of the font, in pixels, as shown in the following example:
CODE
myText_txt.htmlText = "<font size=’24’ color=’#0000FF’>This is blue, 24-point text</font>";


Image tag (<img>)
The <img> tag lets you embed external JPEG files, SWF files, and movie clips inside text fields and TextArea component instances. Text automatically flows around images you embed in text fields or components. This tag is supported only in dynamic and input text fields that are multiline and wrap their text.

Italic tag (<i>)
The <i> tag displays the tagged text in italics, as shown in the following code:
CODE
That is very <i>interesting</i>.


List item tag (<li>)
The <li> tag places a bullet in front of the text that it encloses, as shown in the following code:
CODE
Grocery list:
<li>Apples</li>
<li>Oranges</li>
<li>Lemons</li>

Note: Ordered and unordered lists (<ol> and <ul> tags) are not recognized by Flash Player, so they do not modify how your list is rendered. All list items use bullets.

Paragraph tag (<p>)
The <p> tag creates a new paragraph. It supports the following attributes:

align Specifies alignment of text within the paragraph; valid values are left, right, and center.
class Specifies a CSS style class defined by an TextField.StyleSheet object. (For more information, see Using style classes.)
The following example uses the align attribute to align text on the right side of a text field.
CODE
myText_txt.htmlText = "<p align='right'>This text is aligned on the right side of the text field</p>";


Span tag (<span>)
The <span> tag is available only for use with CSS text styles. (For more information, see Formatting text with Cascading Style Sheets.) It supports the following attribute:

class Specifies a CSS style class defined by an TextField.StyleSheet object. For more information on creating text style classes, see Using style classes.

Text format tag (<textformat>)
The <textformat> tag lets you use a subset of paragraph formatting properties of the TextFormat class within HTML text fields, including line leading, indentation, margins, and tab stops. You can combine <textformat> tags with the built-in HTML tags.

The <textformat> tag has the following attributes:

* blockindent: Specifies the block indentation in points; corresponds to TextFormat.blockIndent.
* indent: Specifies the indentation from the left margin to the first character in the paragraph; corresponds to TextFormat.indent.
* leading: Specifies the amount of leading (vertical space) between lines; corresponds to TextFormat.leading.
* leftmargin: Specifies the left margin of the paragraph, in points; corresponds to TextFormat.leftMargin.
* rightmargin: Specifies the right margin of the paragraph, in points; corresponds to TextFormat.rightMargin.
* tabstops: Specifies custom tab stops as an array of non-negative integers; corresponds to TextFormat.tabStops.

Underline tag (<u>)
The <u> tag underlines the tagged text, as shown in the following code:
CODE
This is <u>underlined</u> text.
User is offlineProfile CardPM

Go to the top of the page

BlueCube
post 17 Mar, 2006 - 09:20 AM
Post #5


THIS IS SPARTAAA

Group Icon
Joined: 19 Feb, 2002
Posts: 3,569



Dream Kudos: 70
My Contributions


Ok, got it! I don't know why I didn't just think about the loader component! It works fine, and easy. Here is my problem. When I create a new document, and use the loader component, it pulls in jpgs fine, but when I use my current document and place the loader 4 layers deep it won't load the .jpg correctly, just a white box appear..
User is offlineProfile CardPM

Go to the top of the page

BlueCube
post 17 Mar, 2006 - 09:21 AM
Post #6


THIS IS SPARTAAA

Group Icon
Joined: 19 Feb, 2002
Posts: 3,569



Dream Kudos: 70
My Contributions


aha, I just wrote that, posted, and saw your post! lol
User is offlineProfile CardPM

Go to the top of the page

dreamndiscover
post 7 Jan, 2007 - 09:12 PM
Post #7


New D.I.C Head

*
Joined: 7 Jan, 2007
Posts: 1


My Contributions


So is it not possible to load say "http://www.yahoo.com" inside a flash page?
User is offlineProfile CardPM

Go to the top of the page

pioSko
post 8 Jan, 2007 - 12:37 AM
Post #8


still.dreaming

Group Icon
Joined: 6 Jun, 2003
Posts: 1,888



Dream Kudos: 225
My Contributions


10% Yes.... 90% No.

Only a few HTML tags are available for use in the textFields. If you manage to load anything from Yahoo, it will be a mess of tags and JavaScript.
User is offlineProfile CardPM

Go to the top of the page

strighker_001
post 18 Jul, 2008 - 06:53 PM
Post #9


New D.I.C Head

*
Joined: 18 Jul, 2008
Posts: 1

Apparently this guy did it; He embedded http://www.google.com inside a flash object. Look!:

http://www.articulate.com/community/blogde...ect/player.html

Can someone please figure out how to do this? Right Click anywhere around the embedded google page and the standard Flash right click menu pops up. Right click inside the google page and the regular right click menu appears. Better believe it! (He even added the browsers Back Button functionality during the flash movie.. HUH!?)

This post has been edited by strighker_001: 18 Jul, 2008 - 06:54 PM
User is offlineProfile CardPM

Go to the top of the page

JBrace1990
post 22 Jul, 2008 - 01:07 PM
Post #10


D.I.C Regular

Group Icon
Joined: 9 Mar, 2008
Posts: 379



Thanked 16 times

Dream Kudos: 350
My Contributions


that's in Flex, actually... I found a page explaining it, and it's pretty simple:
http://www.themidnightcoders.com/blog/2006...ing-iframe.html

EDIT: you'll see that when you use the one above me, if you right click and hit settings, you'll see the settings menu partially covered... Javascript just overlays the app, it's not actually in it...

This post has been edited by JBrace1990: 22 Jul, 2008 - 03:23 PM
User is online!Profile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 8/29/08 08:26PM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month