View Full Version : iframe in AS 3?
peredy
June 11th, 2008, 10:27 PM
Okay, I struggled to get my movie to show my php page, and could never figure out what I did wrong. I did get some help on here and I'm greatful.
So I am wondering if there is a way to just make an iframe to show the php page that I already have. The page connects to a database with mysql. I realy want to be able to make this flash my site, so any help is appreciated.
I appologize in advance, but I'm quite stupid with all of this. I was pretty good with Flash 4 and havent messed with it since, so you see now I am dumb with it.
I can make an iframe for a web page but cant seem to do it for flash.
Okay... enouph babbeling... here is the flash movie I have so far. Click on the lick for news in Navigation to see where I am at...
www.blysterband.com/vids/trial.htm (http://www.blysterband.com/vids/trial.htm)
If there is any way I can just get a copy and paste thing, that would be grand. No, I'm not lazy, but I have tried to follow tuts and I am afraid that I think my mind might just be too small for this level of design.
I appreciate any help ALOT!!!!
dthought
June 11th, 2008, 11:29 PM
Uhm... why are you trying to create an iframe inside Flash? That's an HTML tag that includes another HTML page as an inline frame... you can achieve a similar effect in Flash by using a masked layer. You'd then use a textField set to HTML, and set its HTML text... but remember, Flash has a limited HTML vocabulary.
peredy
June 14th, 2008, 08:49 PM
The reason being is because I have my php pages already set up to display the information as I want them to from a database (MySQL)... I cant seem to get flash to do the same because I am simply not smart enouph to understand it all. I've tried for quite some time now. So... I thought if I could make an iframe in the flash movie, then I can just bring up the page that is already working, within the movie.. and I will have all I need to show the information.
There has to be some way of doing this. Best way I can explain it... if you go to www.blysterband.com (http://www.blysterband.com) you will see the link for news, click on that and the iframe will show the news.php page that displays the information.
If you go to www.blysterband.com/vids/trial.htm (http://www.blysterband.com/vids/trial.htm) and you click on news, from the navigation drop down, you will see a window animate accross, but has nothing. I want the same php info that I have for the page that is there to work within that window.
There is a text box and code, but it doesnt work.
hexvector
June 14th, 2008, 11:09 PM
IFrame is strictly HTML here. There is no way you can simply take a html page and display inside flash. The closest equivalent is a multi-line text field with a htmlText property.
It only supports basic CSS and a handful of HTML tags, which do not render the same as HTML would. You can use basic tags like font, strong, li, u, a, ect..
I would recommend Flash Remoting with PHP <a href="http://www.amfphp.org/">amfphp</a>, that is probably out of your league. The other simple way to get data into flash is through XML. But you would have to create a new XML file perhaps dynamically with PHP.
dthought
June 15th, 2008, 12:41 AM
If all you're wanting to use Flash for is a few fancy animated bits with your HTML, then you may be better off just using JavaScript with something like the del.icio.us library as opposed to doing in Flash :)
I will say that you're approaching Flash from the wrong direction - it is not an analogue or replacement for HTML. If you want to put HTML in it, you can only use a subset of tags and CSS. If you want to do HTML and CSS, better to do HTML and CSS and leave Flash out of the equation :)
Pier25
June 15th, 2008, 05:39 AM
Yeah, as others have said it's impossible for now to display a bunch of HTML inside Flash. You can display some text formatting tags, and some css... but that's all. Nothing fancy.
Instead you can make the whole website in HTML/CSS, and put some flash in the html. Like having the menu in flash, the video player, etc.
You can also use a JS solution like http://mootools.net/ to add some movement to the poor static html without using flash.
peredy
June 17th, 2008, 07:20 AM
Oh okay. Well that isnt what I was hoping for. Oh well. I guess I'll just create each box by itself and add the content manually. The biggest reason for the php pages is because I can edit most of the pages on my site with forms I created, the the pages display them. The pages are in iframes and there are flash buttons, but I was hoping to have the rest of it flash too.
I appreciate the help everyone. Now that I see it's impossible, I can quite spending so many hours trying haha.
Thanks a ton again.
Iamthejuggler
June 17th, 2008, 07:31 AM
If you use the Flex SDK you can fairly easily add an iframe into your flex app.
http://www.deitte.com/IFrameDemo3/srcview/index.html
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.