HTML Loader Help
I can't get my Flex program to work. I'm trying to load a pdf in HTML loader help file. I use Flash Builder and I get errors. The errors I get are:
Access of undefined property htmlLoad
Access of undefined property urlReq
Calling a method perhaps undefined addChild.
Can someone please tell me what I'm doing wrong?
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/halo"> <fx:Script> <![CDATA[ import flash.display.*; import flash.net.URLRequest; if(HTMLLoader.pdfCapability == HTMLPDFCapability.STATUS_OK) { var htmlLoad:HTMLLoader = new HTMLLoader(); var urlReq:URLRequest = new URLRequest("http://www.evilfishsolutions.com/test.pdf"); htmlLoad.width = 800; htmlLoad.Height = 800; htmlLoad.load(urlReq); addChild(htmlLoad); } else { trace("PDF cannot be displayed. Error code:", HTMLLoader.pdfCapability); } ]]> </fx:Script> </s:WindowedApplication>
Hello
I think you should include your code in the function.
Try this.
import flash.display. *;
import flash.net.URLRequest;
public function addHTML (): void {}
if(HTMLLoader.pdfCapability == HTMLPDFCapability.STATUS_OK)
{
var htmlLoad: HTMLLoader = new HTMLLoader();
var urlReq:URLRequest = new URLRequest ("http://www.evilfishsolutions.com/test.pdf");
htmlLoad.width = 800;
htmlLoad.height = 800;
htmlLoad.load (urlReq);
addChild (htmlLoad);
}
on the other
{
trace ("PDF cannot be displayed. Error code: "(, HTMLLoader.pdfCapability);"
}
}
Thank you
Vikram
Tags: Flex
Similar Questions
-
Hello. I try to get my AIR application to load a PDF document from the dialog box using the file reference class.
With the code that I have if I use an ordinary charger so I can get a PNG image to be loaded into a container and display on the screen. But PDF requires HTML Loader that seems not to accept event.target.data because he expects a string.
This is the error I got
TypeError: Error #1034: Type coercion failed: cannot convert ["'FileReference object] in flash.net.URLRequest.
at test_pdf_load_from_dialogfla_fla::MainTimeline/loadFile() [test_pdf_load_from_dialogfla_fl a.MainTimeline::frame1:61]
Test_pdf_load_from_dialogfla.swf [UnloadSWF]
Here is my code:
import flash.net.URLRequest;
import flash.display.MovieClip;
import flash.html.HTMLLoader;
import flash.net.FileReference;
import flash.net.FileFilter;
var file:FileReference=new FileReference();
var container: MovieClip = new MovieClip();
addChild (container);
var i: Number = 1;
the button is an object on the stage, will not be called via actionscript
button.addEventListener (MouseEvent.CLICK, showDialog);
var myFile:FileReference;
var myFileLoader:HTMLLoader;
function showDialog(e:MouseEvent):void {}
myFile = new FileReference();
var PDFFileType:FileFilter = new FileFilter ("PDF Documents (*.pdf) ',"*.pdf"");
myFile.browse ([PDFFileType]);
myFile.addEventListener (Event.SELECT, selectFile);
}
function selectFile(e:Event):void {}
myFile.addEventListener (Event.COMPLETE, loadFile);
myFile.load ();
}
myFileLoader = new HTMLLoader();
function loadFile(e:Event):void {}
myFileLoader.load ((e.target) m:System.NET.SocketAddress.ToString ());
}
(with the new selection of forum I also can't seem to put this topic in the location of the ActionScript of Flash Pro forum.)
Success!
I was thinking about this subject for several hours, when I thought that "maybe the statement in the function loadFile e.target may contain the"name"property.
When I used a trace statement to test this, my thoughts have revealed that, to be precise. The appeal of e.target.name fills indeed console output with the correct file name.
To be sure that I did the following:
myFileLoader.load (new URLRequest (String (e.target.name)));
myFileLoader.width width = [[set to something other that the default value of 0 to show the PDF of the HTMLLoader content]]
myFileLoader.height = [[ditto of the previous line, the default value is 0, which would make the invisible PDF content]].
I'm so happy to have had this inspiration and also to the fact that the ActionScript documentation I found has good examples to follow.
-
Flash, HTML javascript help!
Hi all
I have 50 different images on my server, the images are loaded into the flash. and also, I created an HTML page that I will use to show the images. Now in flash when the user clicks on a particular image, this image should be loaded into the HTML code we already have on the server.
So I need to pass the name of flash to HTML to find the clicked image is displayed. I also want to hide the tool, the State... on the HTML toolbar.
If it is possible to load the HTML on full screen, that will be great.
Here, I did something...
btnClipMc.addEventListener (MouseEvent.CLICK, onBtnClicked);
var address: String = ("two.html");
var URL_var:URLVariables = new URLVariables();
function onBtnClicked(evt:MouseEvent):void
{
URL_var. Query = inpTxt.text;
var jscommand:String = "window.open (" "+ address +" win ',' ',' toolbar = no, scrollbars = no, location = no, status = no, menubar = no. ' ");"
urlReq:URLRequest = new URLRequest ("javascript:" + jscommand + "void (0);");
urlReq.data = URL_var;
navigateToURL (urlReq, "_self");
}
This displays an error message.
Can you help me fix this script?
I did...!
variable that you want to switch to HTML
imageName = "image_1".
do the restrictions of html with query
var address: String = "" largeView.html? query = "" + imageName;
var jscommand:String = "window.open (" + address + "win ',' ',' width = 1100, height is 600, resizable = yes, toolbar = no, scrollbars = yes, location = no, status = no, menubar = no, left = 0, right = 0');";
JS final to trigger the HTML code
var jscommand:String = "window.open (" + address + "',' victory ',' width =" + finalWidth + ", height =" + finalHeight + ", toolbar = no, scrollbars = yes, location = no, status = no, menubar = no, left = 0, top = 0');";
request URL
var urlReq:URLRequest = new URLRequest ("javascript:" + jscommand + "void (0);");
The HTML JS call
navigateToURL (urlReq, "_self");
-
Profile loading Help - profile 'path' in the latest Nightly build of WIN32.
I was used to a specified path to a folder containing a user profile, who worked for me from a shortcut that points to the path of the executable files of loading and "-'the folder path' profile '.." I am looking to restore the ability of browsers to load the profile said that I rather liked this feature. Thank you for your help and your patience continues.
wubalubadubdub
See also:
-
It cannot load help information, so I can't save my work?
I worked on this vi for about an hour.
When I try to save I ge an error that says "cannot load find_resources.vi help information.
So it won't let me save it.
I don't know what this error is, but in an emergency, I would try to copy and paste the entire schema to a new vi.
Unless the error is due to all the vi, of course...
-
Help, please! LOADING help A PC GAME.need
HELLO, I HAVE XP HOME ED. I LOADED DUNE 2000 WITH NO PRBLEM, BUT WHEN I TRY TO START THE 1ST MISSION. AN ERROR POPS UP: DUNE 2000 / DAT. WHAT CAN I DO TO FIX THIS PLEASE GIVE ME STEP BY STEP IF POSSIBLE. I LOVE THIS GAME! I STUCK AT HOME WITH MED. COND. FOR A COUPLE OF MONTHS, THIS WILL HELP YOU A LOT. THX SO MUCH.
Hi Lisa,
Dune 2000 must be running in XP compatibility mode, because it is a Windows 98 / Me game.We recommend uninstall you it, restart your PC, then use the program compatibility Wizard to install this program, select Windows 98 / Me compatibility & tick disable visual themes.
To find the program compatibility Wizard:
In XP, go to start > all programs > Accessories > the program compatibility Wizard
Otherwise, you may just update your graphics card driver. To know what card you have, simply type dxdiag in your box to run (in Start Menu) and when the report has finished building, look the view tab to see the name of your card. Now Google the manufacturer and find their driver updated the page, enter your model and download and install new drivers. Reboot your PC and start the game.
Dragonlady1970 www.AussieKidsSoftware.com.au
-
6 months Aspire one D270, "plug-in, do not load ' help me!
The battery is 0% @ the moment and refusing to load. Telling me to connect in, not charging hav try withdrawal d battery, change of source of power load and even leave the rest of the laptop for days now. Still not supported, please help me.
Thanks in anticipation!I had a similar problem that turned out to be a defective battery. Do you know someone who has the same model as yours, you can swap batteries and see if the problem goes away? You can also check to see if there is a diagnostic battery which can determine the State of the battery.
-
Registry key: HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/App Paths is missing HELPCTR. EXE. Want to know how to reinstall HELPCTR. EXE.
First see if it works:
The Center help and Support sometimes get broken with overzealous cleaning and there are a lot of things to 'try' who sometimes work and sometimes they are not. Sometimes people drop everything simply and never reuse Help and Support Center, but it can still be repaired.
Do you now or nave already used third-party applications on your system where the product description includes descriptive as sentences:
cleaner, mechanic, detective, doctor, heal, optimize, clean up, tune up, speed up, set towards the top, compact, compress, faster, power, boost, boost, gum, muncher. guaranteed or all that has an icon that looks like a key, the key or the screwdriver?
We will restore some things in the registry who sometimes kill himself by malicious software or, sometimes, these cleaning programs.
Before making any changes to your registry (although I hope that this update), make a copy of your registry with this free and popular tool:
http://www.SnapFiles.com/get/ERUNT.html
Then go to this page WWW of Riou (thanks, Ramesh).
http://WindowsXP.MVPs.org/startmenuhelp.htm
When you click the file startmenuhelp.reg on this page with your browser, you will see a bunch of text that
is the registry information that you want to apply to your system. It seems daunting, but it's not so bad.Press Ctrl + A to select all the text, then press Ctrl-C to copy the text to the Windows Clipboard.
Click Start, run, and then in the box, type:
notebook
Click OK to open a new Notepad file.
Press Ctrl + V to paste the information that you copied into the Windows Clipboard in the Notepad file. Save the new notebook
file on your desktop and the name of the new file something he can hold, as:startmenuhelp.reg
Quit Notepad and double click the file startmenuhelp.reg on your desktop and answer Yes to
the query about adding information to your registry.Test your help and your support now, then restart and test again to make sure that the changes 'stick' with a reboot.
You can delete the file startmenuhelp.reg to your desktop.
If that does not do it, we just reinstalled the whole shebang (help) and Support.
-
I play pogo games, I can't load any games it would be since Idownloaded AVG anti-virus free can someone please help
Try temporarily disabling the AVG.
-
HP Pavilion dv7 - 2277cl "blocked, do not load"-HELP!
HP support team,
First of all, I really want to thank you for holding this type of support. I have technical questions for laptop and it happens to be your guy - for Expert days how unfortunately had the chance of me!
I have a 4 years old HP Pavilion dv7 - 2277cl, Windows 7 operating system. I had a problem for months now with my recharge battery. Whenever I plug in the AC adapter, it is said "plugged in, not charging." For the last two months, I was able to get away, stirring the adapter so that it can load, even if my method 'all or nothing' does more work. I opened the Device Manager and updated the three drivers under "Stacks" (which were all updated), tried to uninstall the Microsoft ACPI Compliant Control and restart my laptop (nothing has changed). I tried to stop the laptop and tried to turn it back on with only the AC adapter is plugged (who doesn't) and even calibrated my battery - who only left until the point where I have a charge of 5%, and it has connected for more than 12 hours...
So, somehow the battery IS loading, but only when the laptop is turned off. While the battery icon is always displayed "blocked, do not load," the battery changed miraculously since a 38-78% more than a day to load (stopcock). Ditto for when I calibrated the battery somehow it responsible for a charge of 5% of weakness, but full of hope...
The culprit would be the battery, the power adapter or the laptop itself? I am a broke college student so it would strain my wallet to get help in the store, I am looking for help!
Desperate and concerned,
Princess of pop cornIf you turn on the laptop without the power adapter there is of course a mistake with the AC adapter. Substitute must address your situation.
-
External swf loading help please!
Hi, Im trying to load an external swf on even an object in the main swf file, I'm using this code, but I get an error, please help if you can:
bg.farm.addEventListener (MouseEvent.MOUSE_DOWN, farm_Press);
var fl_Loader:Loader;
function farm_Press(evt:MouseEvent):void
{
bg.farm.removeEventListener (MouseEvent.MOUSE_OVER, farm_Over);
bg.farm.removeEventListener (MouseEvent.MOUSE_OUT, farm_OUT);
bg.farm.removeEventListener (MouseEvent.MOUSE_DOWN, farm_Press);
removeChild (bg);
fl_Loader = new Loader();
fl_Loader.load (new URLRequest ("farmSWF.swf"));
bg.addChild (fl_Loader);
fl_Loader.width = Capabilities.screenResolutionX;
fl_Loader.height = Capabilities.screenResolutionY;
}
error-
TypeError: Error #1009: cannot access a property or method of a null object reference.
to Project2_fla::MainTimeline/frame1()
THX pavel
ferrisID.content, that's how you référenceriez the root of your loaded swf file
also: you cannot close a swf file loaded, you simply to delete the instance of the stage charger
-
Hello all, I use Flash CS4 with AS3.
I have a problem with the preloader site. When I simulate the load it is 'invisible' for awhile and then appear from loading of ~ 24-27% or perhaps ~ 55%
To resolve this problem some people suggested to create a loader.swf (where you want to preload) and the site.swf: when the loader.swf have loaded the site.swf then it appear.
Well, I tried this with the following code:var file:Loader=new Loader();
var: path string.
load.bar.scaleX = 0;
run the preLoader (event: Event): void {}
If (file.contentLoaderInfo.bytesTotal! = 0)
{
load.bar.scaleX = (file.contentLoaderInfo.bytesLoaded / file.contentLoaderInfo.bytesTotal);
Load.txt_perc. Text = String (Math.round ((file.contentLoaderInfo.bytesLoaded/file.contentLoad erInfo.bytesTotal)*100))+"%";))
}
trace (file.contentLoaderInfo.bytesLoaded);
}
function stopLoader (event: Event): void {}
trace ("Downloaded");
file.removeEventListener (Event.ENTER_FRAME, preLoader);
load.bar.scaleX = 0;
Load.txt_perc. Text ="";
}
file.contentLoaderInfo.addEventListener (Event.COMPLETE, stopLoader);
function loadMovie (): void {}
load.bar.scaleX = 0;
var swf:URLRequest = new URLRequest (path);
leader. Load (SWF);
file.addEventListener (Event.ENTER_FRAME, preLoader);
stage.addChild (file);
}
function path1(e:Event):void {}
path = "example.swf";
loadMovie();
}
stage.addEventListener (Event.ENTER_FRAME, path1);
But he returns this error:#2044 error: Unhandled IOErrorEvent:. Text = #2036 Error: incomplete loading.
Someone told me that this error is due to the impossibility to find the URL of the swf file, but this is false since the swf file is finished.If I look at the load simulation I see multiple copies of the swf file are "loaded", but nobody is 100%.
However, I said "responsible" because if I put a trace (file.contentLoaderInfo.bytesLoaded); I see a 0 permanent.
Please help me I'm going crazy!where did,
removeChild (file);
come from? which removes your swf loaded from the display list. remove this line of code.
-
SQL Loader: Help TRIM and Decode functions please
Hello
I have load data from a flat file, for some columns, I need to use the TRIM and DECODE functions. It's a pipe delimited file.
I get a syntax error (one is lower) same error listed for GARNISH.
SQL * Loader-350: at line xx syntax error.
Expected ', 'or') ', found 'DECODE '.
===========
, FINAL_BILL_DATE CHAR (30) "TRIM(:FINAL_BILL_DATE)".
, BUSINESS_ID 'DECODE(:BUSINESS_ID,'B',1,'C',2,'E',3,'G',4,'O',5,'R',6,'T',7,'U',8,'H',9,-1) '.
Can someone please help.
Thank you
JosianeHello josiane.
The error you receive leads me to believe that at some point before the DECODING on the BUSINESS_ID line, probably some line before the FINAL_BILL_DATE line, it is a syntactic error causing the quotes before DECODING actually put an end to some other syntaxes. Without any lines that might actually contribute to this, including details of the header, it's the best I can advise.Hope this helps,
LukePlease check the answer as helpful or response, if it is so. If this is not the case, further clarification.
Try to always provide create table and table insert to help members of the forum to help you. -
HI team,
I need to load data in to table using sqlloader, as I'm going to level three (header, detail, end "")
the first two positions of the data file representing the level as
00-header
01 to 98 - retail
99 - trailer
each level has different data structure and we need to insert in the same table
I created the table as
CREATE TABLE APPLICATIONS. XXD_TEST1
(
THE AA NUMBER,
TEST12 VARCHAR2 (10 BYTE),
testdt VARCHAR2 (10 BYTE),
testtr VARCHAR2 (10 BYTE),
NUMBER OF RECORD_ID
)
and a sequence created to record_id column
-CREATE SEQUENCE APPLICATIONS. XXD_TEST1_S
I have data in the data file as below, I want to load the data in the same order
-------------------------------------
000012
010012
010012
020012
030012
990012
000013
010013
020013
030013
990013
I was using the folowwing control file
-----------------------------------
DOWNLOAD THE DATA
Test INFILE
ADD
IN THE TABLE xxd_test1
WHEN (1:2) = '00'
TRAILING NULLCOLS
(
Test12 POSITION(3:6) CHAR,
AA POSITION(1:2) INTEGER EXTERNAL "lpad(:aa,2,'0')."
record_id 'xxd_test1_s.nextval '.
)
IN THE TABLE xxd_test1
WHEN (1:2)! = '99' and (1:2)! = '00'
TRAILING NULLCOLS
(
testdt POSITION(3:6) CHAR,
AA POSITION(1:2) INTEGER EXTERNAL "lpad(:aa,2,'0')."
record_id 'xxd_test1_s.nextval '.
)
IN THE TABLE xxd_test1
WHEN (1:2) = '99'
TRAILING NULLCOLS
(
testtr POSITION(3:6) CHAR,
AA POSITION (1:2) INTEGER EXTERNAL,
record_id 'xxd_test1_s.nextval '.
)
But it was inserted in the following order
-----------------------------------------
000012
000013
010012
010012
020012
020013
030012
030013
990012
990013
Please help me with the solution.
Thank you
Sriram.[Double wire | http://forums.oracle.com/forums/thread.jspa?threadID=979069&tstart=0]
-
When I turn on my computer, I have a boot loader, Windows 7 and Windows XP. When I choose XP, it comes up with a different bootloader! It has Windows (default) and Windows XP again. How do I remove Windows (default) and set the timer to 0?
Thank you.
Click Start > run > type msconfig > ok. In the new window click the boot.ini tab, click scan all boot paths button. All ineligible entries will be displayed with an option to remove. If this does not resolve the problem you can manually edit boot.ini text by clicking Start > run > type sysdm.cpl. In the property window click on the Advanced tab, and then on the button settings startup and recovery. In the new window, click on change. Find the invalid entry and delete it. You can also change time to display a list of the operating systems on this window or you can access prompt > type bootcfg timeout # (# represents the number of seconds that you want to display the list) sometimes to decide what battles to fight the toughest battle of all... Visit my forum @ http://repairbotsonline.forumotion.com/forum.htm
Maybe you are looking for
-
Re: Bought new Satellite C855-29N free 6 months offer cinema
Hi all First post, if not in the right region can a mod move it please, I bought Toshiba laptop may 2013, Satellite C855-29N end. He had an offer with this laptop, 6 months free movie ticketsThrough toshiba, filled in all the necessary details and wa
-
Impossible to find some drivers Win7 for my Satellite C660
When I want to download drivers for my laptop the c660 psc1ne, I can't find some drivers (Windows 7, 64-bit), for example: Bluetooth Stack, wireless Lan driver. Where is he? Or, now, it is not necessary? Explain please!
-
custom RefNum - what is underlying numeric type of refnums and how to respect the subtype
Specific RefNum, I intend to help is based on the byte stream file refnum - and will have an impact in and out of a DLL through knots of interface code - would it be U32 or I32 underlying type or something else? I based the concept of subtype on the
-
Hi every time I log on outlook express, it says password and THST username required that I do. then tells me it is incorrect, that then it comes up with error server number Ox800ccc90 then error 0x800ccc92. I contacted BT repeatedly they tell me now
-
will point causing erratic reboot
I discovered the problem I had my xp computer. It seemed to be the fault of the processor, interruption restart... is it from hibernation... even though I have a lot of space (2G) Control Panel incorrectly reports 217 m... only... the disc hiberate