Loading Image from HTML page into Flash component
Ok, after doing much research on the internet, I am pretty
sure you have to be a Flash and Actionscripting Jedi in order to
solve this issue. Here we go:
I have created an HTML page using PHP and MySql that displays
image thumbnails. When a user chooses and clicks on one of the
thumbnails, I want the larger image to be loaded into my swf. It is
a jigsaw puzzle component I picked up here: www.crifano.com. Here
is the puzzle on my page with an image manually inserted using
Flash 8 (Note: This is only working in Internet Explorer right now,
for whatever reason):
http://premieretans.com/puzzle/jigsaw.php.
I want the image on this page to be chosen by the user from a
number of images that are populated on a regular PHP/HTML page from
a MySql database. What is the best way to go about this?
Thanks so much for the help on this matter. I know I am not
the only person who has run into this dilemma, so I hope your
knowledge will save others with a similar problem the hours I have
spent on this issue myself. Thank you!
Cheers-
Charles
Hi,
There's no direct support for this. But you could implement
drag and drop the way you normally would in javascript. Except
here, on mouseUp over a div encapsulating the object or embed tag
(the flash object), you'll need to make a call into actionscript
from javascript indicating that a drag and drop happened.
For more info, see
how
to drag and drop using javascript and
actionscript
and javascript communication
Similar Messages
-
Drag and drop a image from html page into flex
how can i drag a image form the html page and drop it into
the flex application.Hi,
There's no direct support for this. But you could implement
drag and drop the way you normally would in javascript. Except
here, on mouseUp over a div encapsulating the object or embed tag
(the flash object), you'll need to make a call into actionscript
from javascript indicating that a drag and drop happened.
For more info, see
how
to drag and drop using javascript and
actionscript
and javascript communication -
how to load external html page into flash? (AS3)
You cannot load an html page into Flash, though you can try to load the html code that it contains into a textfield. Flash supports only a very limited number of html tags, so it is highly likely you won't get what you are after if you are reading an html file that hasn't been edited for Flash specifically. Just look up the TextField.htmlText property in the AS3 help documents and it lists the html tags that are supported.
For AS3 you need to look into the URLLoader class as far as loadng an extrernal text file goes. -
HTML-page into flash slideshow?
Hi,
I'm am trying to load a HTML-page into a flash slideshow. The slideshow is going to run locally on the computer and the HTML-page (or RSS-feed if that is easier) is recieved from the company´s web-page. I'm totaly new to flash, and I would be very grateful if anyone knew any way to do this. Is there any simple string I can use, like URLloader?
Thanks in advance!
FranzYou can do this only with AIR :
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/html/HTMLLoader.h tml -
Hi all,
i want to load HTML pages into my flash movie when i press a button. is that possible?
Thanks
thilsenNo. Flash has limited support for html and is not capable of displaying html web pages as content.
-
Pull images from SQL/PHP into Flash
I have a website that displays images that are stored in a
SQL database using PHP as a method for pulling and displaying the
images. These images are stored in the database as text (ex:
image1), then the PHP looks for the image like this:
<img src="images/Photograph/<?php echo
$row_rs_Photos['Image']; ?>.jpg" alt="" width="<?php echo
$row_rs_Photos['Thumb_Width']; ?>" height="<?php echo
$row_rs_Photos['Thumb_Height']; ?>" border="0" title="" />
I want to pull these images into Flash. I've done a bunch of
ActionScripting, but am no expert. Really don't have the foggiest
idea where to start.
-kirkI seem to have this one working, kinda. It has an array and
automatically numbers the buttons, but there are some buttons, that
ask SQL to return a photo that doesn't exist. For instance, there
is no 7 or 8 ID in my SQL, so those buttons don't work:
http://www.lbiphotos.com/Flash/loadImages_finished.html
PHP Code:
<?php require_once('my.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType,
$theDefinedValue = "", $theNotDefinedValue = "")
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue)
: $theValue;
$theValue = function_exists("mysql_real_escape_string") ?
mysql_real_escape_string($theValue) :
mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" :
"NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) .
"'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" :
"NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue :
$theNotDefinedValue;
break;
return $theValue;
$colname_rs_Photos = "-1";
if (isset($_GET['passID'])) {
$colname_rs_Photos = (get_magic_quotes_gpc()) ?
$_GET['passID'] : addslashes($_GET['passID']);
mysql_select_db($database_LBI_Photos_Connection,
$LBI_Photos_Connection);
$query_rs_Photos = sprintf("SELECT ID_Photos, Image,
YearPhotographed FROM Photos WHERE ID_Photos = %s",
GetSQLValueString($colname_rs_Photos, "int"));
$rs_Photos = mysql_query($query_rs_Photos,
$LBI_Photos_Connection) or die(mysql_error());
$row_rs_Photos = mysql_fetch_assoc($rs_Photos);
$totalRows_rs_Photos = mysql_num_rows($rs_Photos);
$imageId = $_GET['passID'];
//MUST use code below to grab $images
$images =
$row_rs_Photos['YearPhotographed'].'/'.$row_rs_Photos['Image'];
print "image=" . $images;
?>
<?php
mysql_free_result($rs_Photos);
?>
ACTIONSCRIPT:
function loadImage(passID:Number) {
var resultLv:LoadVars = new LoadVars();
var sendLv:LoadVars = new LoadVars();
resultLv.onLoad = function(success) {
if (success) {
mcLoader.loadClip(imagePath+this.image+".jpg",
loadContainer);
trace("passID: "+passID);
sendLv.sendAndLoad(phpPath+"?passID="+String(passID),
resultLv);
function loadInit(target:MovieClip) {
trace("Begin Loading File");
trace("imagePath + this.image ; "+imagePath+this.image);
function assignButtons() {
for (var i in loadButtons) {
this[loadButtons
].numberTxt.text = String(Number(i)+1);
this[loadButtons].onRollOver = function() {
this.gotoAndStop(2);
this[loadButtons
].onRollOut = function() {
this.gotoAndStop(1);
this[loadButtons].onRelease = function() {
trace("String(this).length "+String(this).length);
if (String(this).length == 16) {
loadImage(Number(String(this).substring(String(this).length-1)));
if (String(this).length == 17) {
loadImage(Number(String(this).substring(String(this).length-2)));
var loadButtons:Array = new Array('loadBtn1', 'loadBtn2',
'loadBtn3', 'loadBtn4', 'loadBtn5', 'loadBtn6', 'loadBtn7',
'loadBtn8', 'loadBtn9', 'loadBtn10', 'loadBtn11', 'loadBtn12',
'loadBtn13', 'loadBtn14', 'loadBtn15', 'loadBtn16');
var loadContainer:MovieClip =
this.createEmptyMovieClip("loadContainer",
this.getNextHighestDepth());
var siteUrl:String = "
http://www.lbiphotos.com";
var imagePath:String = siteUrl+"/images/Photograph/";
var phpPath:String = siteUrl+"/Flash/images.php";
var mcLoader:MovieClipLoader = new MovieClipLoader();
var mcLoadObj:Object = new Object();
mcLoadObj.onLoadInit = loadInit;
mcLoader.addListener(mcLoadObj);
//below centers called image
loadContainer._x = (Stage.width/2-100);
loadContainer._y = (Stage.height/2-100);
assignButtons(); -
How can we load images from database to macromedia flash?
Dear All,
Actually I'm creating a intractive CD with images(Catalogue)
loaded in access db. I don't want every user to install the program
into his pc. When he/she inserts cd it should play and display
images by category wise (9 pictures at one time). is there flash or
vb code to acheive this in flash or any flash sample projects
highly appreciated.
Thanks a lotHello
You should look into the option of Retraction from BW to ECC. You may find a lot of docs on the same. Refer the below link for the same
https://scn.sap.com/thread/1008067
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/90cd1106-21b4-2d10-0695-9b1e076191eb?QuickLink=index&overridelayout=true
Regards
Gajesh -
How to Load a html page into Flex the application?
I want to load separate html page in to my flex application.
for example
think I am in my shopping cart and I wanna buy something and pay for that.Then I am try to pay they will load a separate html page into my shoipping cart.
How can I do that inside flex application?
Any ideas are appreciated..
thnxHi snkd,
You need to make use of iframe to load html content in Flex application.
Check out the link below...there is also source code included..
http://www.deitte.com/archives/2006/08/finally_updated.htm
Thanks,
Bhasker -
Embed external HTML page in Flash
Does anybody know how to embed an external HTML page into Flash? I am envisioning something like an iFrame, but can't really figure how this would work. I've attempted using a scrollpane, but it didn't work at all.
Any suggestions?you can display it in a popup window or in the same window or in an iframe in the same html page that displays your swf.
When you say this, do you mean I can create an iFrame on the same html page that displays my swf, and have it be dynamically populated by what the user clicks on the swf?
yes, exactly.
use getULR() (as2) or navigateToURL() (as3) with the 1st parameter being the html page you want to display and the 2nd parameter being the iframe "name" property. -
I used to be able to copy and paste images from the internet into keynote slides and pages. Now when I copy and paste all I get is an empty box. My iskysoft iTube studio has also stopped downloading videos. Is there an extension I need to enable? Any ideas
Try dragging the image to the desktop, then drag the image to the slide you want it on
-
Load html page into a table area
I have an html page that I would like to add to a table area
on my main page. How do I do this? Can anyone help?Investigate "server-side includes". But beware - you CANNOT
put a
stand-alone HTML page INTO a stand-alone HTML page. You have
to make the
incoming HTML into a fragment so that the final assembled
page still
validates.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"uptoppapi" <[email protected]> wrote in
message
news:g6n0du$jnm$[email protected]..
>I have an html page that I would like to add to a table
area on my main
>page. How do I do this? Can anyone help? -
Insert HTML Page into XML CDATA Tag
Hi Guy
I have a very big problem.
I create a little web site and I use XSL + XML to produce output.Now I
want to add a part of html page into xml tag to use a custom page section.
But i find a problme,
see the example :
I use this xml :
<resources>
<html><![CDATA[<B>Hello World</B>]]></html>
</resources>
trasform xml with xsl page
and my output into html browser is (<);B(>);Hello World(<);/B(>);(please remove the bracket( ) while reading the text to understand my problem)
my BOLD html tag is not parse by browser because xslt parser trasform
my special tag into other tag.
I want output like this:
<b>Hello World</b>
But it's coming like (<);B(>);Hello World(<);/B(>); (please remove the bracket( ) while reading the text to understand my problem)
Can you help me ?
this is my trasformation function :
private Transformer getXSLTransformer (xslFile) throws
XSLTransformerConfigurationException {
try {
Transformer transformer = null;
tFactory = TransformerFactory.newInstance();
transformer = tFactory.newTransformer(new
StreamSource(xslFile)); // load xslFile from disk
} catch (TransformerConfigurationException tce) {
throw new XSLTransformerConfigurationException(tce.getMessage());
return transformer;
public String myTrasform(String xml,String xslFile) throws Exception {
StringWriter outputString = new StringWriter(512);
Transformer transformer = getXSLTransformer (xslFile);
transformer.transform(new StreamSource(new StringReader(xml)), new
StreamResult(outputString));
return outputString.toString();
Thank's in advance.
kuruvi
Edited by: Mc_Kuruvi on Jun 14, 2009 3:47 AMRead:
Oracle® XML DB
Developer's Guide
10g Release 1 (10.1)
Part No. B10790-01
December 2003
1. "Do I use sqlloader and what datatype?"
Use XMLType
2. "I have embedded graphics so do the images get stored separately or does the entire page get stored as a BLOB datatype?"
Page 827:
The Oracle XML DB native datatype XMLType helps store and manipulate XML. Multiple storage options (Character Large Object (CLOB) or structured XML) are available with XMLType, and administrators can choose a storage that meets their requirements. CLOB storage is an un-decomposed storage that is like an image of the original XML. -
I havent used flash in a couple years and i'm feeling a
little lost (not that i knew what i was doing before!) I am however
determined and can understand the code, i just am a little
overwhelmed.
I'd like to tell a movie clip to look into a specific folder
(via url or whatever) and load all images from that folder into the
movie clip. I do not want to have to give the movie the exact
address of each image, as they files may change / be added to over
time.
i know in AS3 i have to use the loader class and then the
addChild to put the loaded stuff into the movie (and thats all i
know), but i just dont know how to get all available images
blindly. any help? please and thank youYou have the right info for the Loader and addChild part.
But I'm afraid you can't use flash to request a directory
listing on your server directly. You can have a script on your
server return the directory listing to flash after the script
performs a directory listing (e.g. php).
Other than that approach (using serverside scripting)...
You could have all the images with a common naming convention
and a numeric suffix and just keep loading in turn until you
encounter a loading error (which your code is set up to
detect).....
e.g. image1.jpg, image2,jpg etc
or:
You could set up some manually coded xml to point to the urls
of each image etc. It seems you want to avoid this though. (This is
pretty much the same idea as the server side scripting except that
instead of using scripting you create the data by 'hand' as xml). -
Loader will load images from another server, but then we get error on Bitmap operation
I'm developing an app that currently is using Loader to get images from another server. This shouldn't currently work since we are still waiting for the owner of that server to put a crossdomain file in place. However, it does work -- sort of .
Loader can load the images fine, without an error. But then the app has a feature in which we are making a larger duplicate of the image to display in a sidebar, we do this in this manner:
var myBitmap:Bitmap = Bitmap(loader.content);
and when this runs we get a Flash player security error 2122, sandbox violation.
So while I'm hoping all this will fix itself when the crossdomain.xml file is put in place, I'm confused as to why we only get the sandbox error when we make a Bitmap from the image, and not when we initially try to retrieve the image.
(Incidentally: is there a better way to make a "copy" of an image loaded by a Loader, and then change its width and height for simultaneous display in another part of the stage? I don't need to change its actual dimensions -- I just need to change its display width and height.)
Thanks!The sandbox allows viewing, not editing from another server without a crossdomain.
So, when you try to load it up, it loads it, but "read-only" and gives you an error when you try to "edit" it by making a new Bitmap out of it.
This should resolve itself once that crossdomain is in place.
||EDIT||
I just realized I should clarify my statement a little more.
When you load images from another server without a crossdomain, it allows the load for display only. When you try to load data, it will fail. This is because, XML data, or some other type of data is editable by default, and images are only viewable by default. So, the image fails when you try to convert it into an editable form. -
Insert one html page into another html page
Hi there,
I wonder if sombody can help. I am trying to insert one short
html page into another page. I could not find any option or feature
in Dreamweaver that allow me to insert the page at all. The page I
want to insert has the links and it is a short page, just like a
banner. When I update the links on that page it will update all
other pages in the website. I do not have to open many pages to
update. I have been using FrontPage and I am now converting to
Dreamweaver. Some codes from FrontPage does not work in
Dreamweaver. I would very much appreciate if somebody can help with
the codes.
This is my website so that you can understand what I mean. At
the top of the screen there are many links that are from one page I
inserted into index.html. I use FrontPage. But, Dearmweaver does
not work that way.
Thank you. KevinBe aware that IFrames carry all the disadvantages that frames
do, for both
you and your client's visitors.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"polarl light" <[email protected]> wrote in message
news:g06ad0$2rm$[email protected]..
>
>> I wonder if sombody can help. I am trying to insert
one short html page
>> into
>> another page. I could not find any option or feature
in Dreamweaver that
>> allow
>> me to insert the page at all. The page I want to
insert has the links
>> and it
>> is a short page, just like a banner. When I update
the links on that
>> page it
>> will update all other pages in the website. I do not
have to open many
>> pages
>> to update. I have been using FrontPage and I am now
converting to
>> Dreamweaver.
>> Some codes from FrontPage does not work in
Dreamweaver. I would very
>> much
>> appreciate if somebody can help with the codes.
>
> Depending on what you want to do you can use SSIs or an
Iframe. SSIs are
> good for things such as headers, menus and nav bars that
you want to stay
> the same across a range of pages. Iframes let you load
an external HTML
> file into a predefined area of your page so you can
display different
> content while staying on the same page.
>
Maybe you are looking for
-
Application installer not working with PC Suit App...
I have a Nokia E60 and Windows XP SP2. After installing PC Suite 6.82.96.4 I try to open the App. installer but it opens and closes inmediately (blinks) but do not work. I try to do the installation through the File manager, and I can see and open th
-
How do I project my new mac on my new apple TV?
I purchased a Mac Air and apple TV for the exact purpose of projecting my mac and other intel-based laptops onto my new HDMI TV and using the computer big screen. The apple sales person who sold it to me said that apple TV would facilitate it wireles
-
What is the file path in OS X Yosemite to locate my saved "On My Mac" emails from the Mac Mail Application? I am trying to recover them from Time Machine as I had to reinstall Yosemite due to a software issue. I tried using the search bar with no l
-
Itunes 11.1.3 Wont work
I just got the iphone 5c today for my brithday, so i just downloaded itunes. However I ran into an unexpected problem, as soon as i open the program, windows closes it. "a problem has cause the program to not work correctly", so no error messages, it
-
Custom ADF Taskflow to be displayed as part of Human Task notification
Hi all, I am trying to display a custom ADF taskflow as part of notification of a Human Task. I see multiple ways of implementing it and need guidance on how to go about this. As a first step, I created a taskflow based on the human workflow task. Th