Using LoaderInfo to get params from HTML
Hi All
Working my way throught the new things in AS3. One problem is
getting <params> passed to the .swf from the HTML file. I can
make it work if the code is embedded via Actions on frame 1, but
not when the code is in an external .as file! The example I'm
playing with is the 'Dynamic video playlist'...
http://www.adobe.com/devnet/flash/articles/video_playlist.html
and the amendments I've made in the VideoPlaylist.as file are
as <=====ADDED below...
ALL HELP/COMMENTS MUCH APPRECIATED, thank you
ROBERT
package {
import flash.display.MovieClip;
import flash.display.LoaderInfo; <=====ADDED
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.events.Event;
import fl.controls.listClasses.CellRenderer;
import fl.controls.ScrollBarDirection;
public function VideoPlaylist():void {
// Load the playlist file, then initialize the media player.
xmlLoader = new URLLoader();
xmlLoader.addEventListener(Event.COMPLETE, initMediaPlayer);
//xmlLoader.load(new URLRequest("playlist.xml"));
<=====ADDED commented out
var playlist = this.loaderInfo.parameters.xmlfile;
<=====ADDED
xmlLoader.load(new URLRequest(playlist)); <=====ADDED
argument change
etc etc...
The error report is...
TypeError: Error #2007: Parameter url must be non-null.
at flash.net::URLStream/load()
at flash.net::URLLoader/load()
at VideoPlaylist()
And the HTML code is this for the xmlfile parameter I'm
trying to read in...
<object
classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="
http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0"
width="538" height="290" id="VideoPlaylist" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="true" />
<param name="movie" value="VideoPlaylist.swf" />
<param name="loop" value="false" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="xmlfile" value="playlist.xml">
<embed src="VideoPlaylist.swf" width="538" height="290"
loop="false" align="middle" quality="high" bgcolor="#ffffff"
name="VideoPlaylist" allowscriptaccess="sameDomain"
allowfullscreen="true" type="application/x-shockwave-flash"
pluginspage="
http://www.macromedia.com/go/getflashplayer"
xmlfile="playlist.xml" />
</object>
Many thanks for both your replies. I used Dreamweaver's
Parameters 'helper' to put the params in, and they were placed in
AC_FL_RunContent() correctly. I also tried the FlashVars variations
with the same result. As said I have made it work when the
retreival code is in the main swf file, but it just won't work for
me when the coding is in an external .as file.
Thanks again
ROBERT
Similar Messages
-
Trying to use FTP to get data from a different server
Hi Friends,
I have to use FTP to get data from a different server and upload it on SAP server. Now my problem is when I m trying to do ftp through command line it brings the file but with no data.
Through ABAP program nothing is happening.
Here's my code--
V_PASSWORD = 'test@123'.
V_PWD_LEN = STRLEN( V_PASSWORD ).
CALL FUNCTION 'HTTP_SCRAMBLE'
EXPORTING
SOURCE = V_PASSWORD
SOURCELEN = V_PWD_LEN
KEY = CS_KEY_500098
IMPORTING
DESTINATION = V_PASSWORD.
CALL FUNCTION 'FTP_CONNECT'
EXPORTING
USER = 'test'
PASSWORD = V_PASSWORD
HOST = '176.0.1.6'
RFC_DESTINATION = 'SAPFTPA'
IMPORTING
HANDLE = MI_HANDLE
EXCEPTIONS
NOT_CONNECTED = 1
OTHERS = 2.
CHECK SY-SUBRC = 0.
cmd = 'lcd d:\ftp'. .
PERFORM FTP_COMMAND USING CMD.
CMD = 'asc'.
PERFORM FTP_COMMAND USING CMD.
CONCATENATE 'dir' 'ftpt*' INTO CMD SEPARATED BY SPACE.
PERFORM FTP_COMMAND USING CMD.
cmd = 'ls'.
concatenate 'ls' INTO CMD SEPARATED BY SPACE.
PERFORM FTP_COMMAND USING CMD.
cmd = 'mget trial.txt'.
CONCATENATE 'mget' 'trial.txt' INTO CMD SEPARATED BY SPACE.
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
HANDLE = MI_HANDLE
COMMAND = CMD
TABLES
DATA = MTAB_DATA1
EXCEPTIONS
TCPIP_ERROR = 1
COMMAND_ERROR = 2
DATA_ERROR = 3
OTHERS = 4.
IF SY-SUBRC = 0.
LOOP AT MTAB_DATA1.
WRITE: / MTAB_DATA1.
ENDLOOP.
ELSE.
CONCATENATE 'Error in FTP Command while executing' CMD INTO ERROR SEPARATED BY SPACE.
WRITE: / ERROR.
ENDIF.Hi
try this.....in one of my reqt, i done this successfully....
FORM FTPCON.
FTP-------------------------------------------------------*
CLEAR DSTLEN.
SET EXTENDED CHECK OFF.
DSTLEN = STRLEN( S_PWD ). -
> (S_PWD (password) is a selection screen field )
CALL FUNCTION 'HTTP_SCRAMBLE'
EXPORTING
SOURCE = S_PWD
SOURCELEN = DSTLEN
KEY = KEY
IMPORTING
DESTINATION = S_PWD.
CALL FUNCTION 'FTP_CONNECT'
EXPORTING
USER = P_USER -
> Username
PASSWORD = S_PWD -
> password
HOST = P_HOST -
> Host
RFC_DESTINATION = P_DEST -
> Destination
IMPORTING
HANDLE = HDL
EXCEPTIONS
NOT_CONNECTED = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
HANDLE = HDL
COMMAND = 'set passive on'
TABLES
DATA = RESULT
EXCEPTIONS
TCPIP_ERROR = 1
COMMAND_ERROR = 2
DATA_ERROR = 3.
CALL FUNCTION 'FTP_R3_TO_SERVER'
EXPORTING
HANDLE = HDL
FNAME = G_FCNAME
CHARACTER_MODE = 'X'
TABLES
TEXT = T_FILE1
EXCEPTIONS
TCPIP_ERROR = 1
COMMAND_ERROR = 2
DATA_ERROR = 3
OTHERS = 4.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'FTP_R3_TO_SERVER'
EXPORTING
HANDLE = HDL
FNAME = G_FCNAME1
CHARACTER_MODE = 'X'
TABLES
TEXT = T_FILE2
EXCEPTIONS
TCPIP_ERROR = 1
COMMAND_ERROR = 2
DATA_ERROR = 3
OTHERS = 4.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'FTP_DISCONNECT'
EXPORTING
HANDLE = HDL.
CALL FUNCTION 'RFC_CONNECTION_CLOSE'
EXPORTING
DESTINATION = P_DEST
EXCEPTIONS
DESTINATION_NOT_OPEN = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " FTPCON
Hope it helps..... -
Anyone knows about using java to get data from MS Access database.
hi there
anyone knows about using java to get data from MS Access database? thank youthere is a list of jdbc drivers at:
http://industry.java.sun.com/products/jdbc/drivers
they have several ms access drivers listed.
also, you can use a jdbc-odbc bridge which allows you to use jdbc to connect to any odbc data source:
http://java.sun.com/j2se/1.3/docs/guide/jdbc/getstart/bridge.doc.html -
Can i set my iPhone 4 as a new phone then use iCloud to get information from before restoring the phone? I've restored my iPhone 4 thru iTunes and now trying to set it up using iCloud but it says 'no back ups available'.
I was upgrading my OS system thru iTunes but the plug on my macbook came out and battery ran flat half way thru. This jammed my iPhone 4.
I think it's to do with the OS system. That if i take it to the previous OS system it might work. But since i'm in phone set up mode i can't get into general setting to change it back.
So can i set it up as a new phone and then use icloud to restore info? Or shld i set it up thru iTunes and then iCloud (but since it jammed half way thru upgrading and i've restored i don't think iTunes has any of my previous info)? Or is there something else i can do?No. You can set up as a new device or restore from iCloud or iTunes. It looks like you backed up with iTunes, so you can't restore with iCloud. To backup your device in iCloud, go to Settings > iCloud and activate it
-
I use OverDrive to get audiobooks from my library to listen on my ipod. Does not work since latest update of ipod. Converts the WMA and acts like it is putting it on the ipod but then it isn't there.
Downgrading the iOS is not supported by Apple.Have yo tried:
- Backing up and restore from backup. See:
iOS: Back up and restore your iOS device with iCloud or iTunes
- Restore to factory settings/new iOS device.
- Go to the OverDrive support site -
I used sync to get notes from my i-pad to my computer. It apparently went to my windows 2007 but where do I find the notes on my computer?
Thank you.
Your answer led me to the notes I was seeking.
When I looked at the bottom of the left side in outlook I did not see any icon but I saw a little arrow.
When I clicked on that it I was able to specifiy that I wanted an icon for notes.
When I added the icon, I was able to click on the icon and find my notes. -
Hello I'm upgrading my iPhone 4S tmw to a iPhone 5c , I also have a iPad which I've used iCloud to get pics from phone to iPad, obviously if I delete my phone pics there gonna go from iPad too. Any idea what I can do please?
In addition to the very sound and useful information posted by Lawrence Finch, there is also a way to save the photos from the photo stream to the camera roll on the iPad so that even if the photo stream is turned off, the photos will remain on the iPad.
Launch the photos app and them open the Photo Stream album. Select every photo that you want to save by tapping on them, then tap in the action/sharing icon and select - Save to Camera Roll.
Having said that, the information that Lawrence shared with you is very important and the instructions in both articles are very useful. Make use of them. -
Use Java to collect data from HTML
Hi Guys
I am doing a online stock trading project, the main part is to collect raw data from http://finance.yahoo.com User can retrieve the stock detail by inputting the right stock symbol, such as "AOL". I dont have too much problem in this part because yahoo provde a spreedsheet format to display the result. If you type the URL below, it can bring you a set of stock data separating by comma. So, I can use StringTokenizer(date, ",") to collect each data from yahoo into my system.
========================================================================
http://finance.yahoo.com/d/quotes.csv?f=sl1d1t1c1ohgv&e=.csv&s=AOL&
"AOL",15.57,"8/12/2003","4:01pm",+0.04,15.47,15.63,15.40,12097200
========================================================================
However beside this function, I also need to search Stock Symbol, because user may only know the company name. Although Yahoo finance also provide this function, with no spreedsheet format provided. So, if I type the URL below, it will only give me a set of result BUT in HTML format.
========================================================================
http://finance.yahoo.com/l?s=AOL&t=S&m=
========================================================================
So, can anyone tell me what is the best way to collect data from a HTML page? Or anyone know any good stock quoting sites which also provide spreedsheet format?
Thank you very much
KelI am doing a online stock trading project, the
the main part is to collect raw data from
http://finance.yahoo.com
Sounds fun.
So, can anyone tell me what is the best way to
to collect data from a HTML page? Or anyone know any
good stock quoting sites which also provide
spreedsheet format?I really don't know any other stock quote sites. But if you want to implement a search function for stock names, I would do it like this
1) Code the HTTP SUBMIT/POST to lookup the possible stock names
2) Use XSL to filter out the HTML path to the table with results, the layout is consistent, so there are no strange exceptions. You can check the DOM structure by using Mozilla's DOM inspector. Just write down the path to the TABLE element and select it, and transform it to CSV for example.
3) Reparse the CSV to fill some boxes
To possibly save some server load use a small fixed size in memory cache to store N requests based on some strategy.
The other part is actual a separate part of what you want to code and should be a separate class in which you can feed the stock name.
If the user types in a bad stock name, you can retrieve a list of possible names using the input as the company name.
Greets.
Maybe there is a SOAP service out there somewhere. -
How to use RFC to get data from BW?
Hi all, we need to get data from BW using RFC, I am not familiar with BW and RFC, would you please give me some advice? Many thanks in advance!
would you please bring your solution to light here?
thank you
God's blessing
Andreas -
Get parameters from html page from java application standalone ...
Hi all,
I work in one solution that i have values in Html Page and i want get the parameters values from html and cath they in java application standalone.
The Html page is in same host than de java application.
I want know if this is possible. I wnat know if without HttpServlet i can get the parameters from Html Page pure.
Thanks in Advance for the ideas,
Antonio.Hi Abdul,
The problem is my client want one solution where i have one page simple page Html and one application java standalone. This application runs in one machine, but we don't have web server. So the question is: Is possible without web server i can get the parameters values that is inside the html page from java application. I remember you that the application java is one .jar that run's with one command line from crontab "java -jar teste.jar". -
Right now a jar file's manifest can have a "main-class" which makes the jar truly executable - you can double-click it. The problem is, if you need environment variables, there is no way to pass them in to your main-class' "args."
So why don't we make it so when the jar's manifest is read, that in addition to "main-class" you can have "main-args"?
That would mean everyone would no longer need to bundle java apps with ".exe" or ".bat" or ".sh" files!!! We could have truly Java applications, that are executables!!!
Just package them in a jar, have a main class and the args for it!!
what does everyone think?Unfortunatly, it won't happen.....
Sun has been pushing property files ever since they disabled getEnv. You are probably better off designing some sort of Runtime.exec("echo $VARIABLE") or such to catch the environment variables during init. Or you could just start using property files like sun would want. -
I have a field in html:
<INPUT TYPE="TEXT" NAME="searchString">
I want applet to get searchString (something like in servlets:
String searchString = request.getParameter("searchString");)
thanks for helphmmm.. I send information to my applets as parameters
So the HTML code for the Applet has a parameter 'min_value':
<OBJECT>
<PARAM NAME=CODE VALUE="com.blah.Test.class">
<PARAM NAME=min_value VALUE="1">
</OBJECT>Next, The Applet code should contain the method:
public String getParameter(String key, String def) {
return isStandalone ? System.getProperty(key, def) :
(getParameter(key) != null ? getParameter(key) : def);
}Finally, I get the parameter value into the Applet using getParameter():
String minVal = getParameter("min_value");Seeya! -
Help with getting links from HTML page
Hello all. I found the sun tutorial for getting HREF values from a tags in an HTML document at <http://java.sun.com/developer/TechTips/1999/tt0923.html>. My question now is how would a person add the ability to get the text of the link to this code?
For example:
Provided the HTML code:<a href="link.html">example</a>Returned is: href=link.html text=exampleI think the TechTip you've linked too is quite old (1999). I would write a simple SAXParser that uses TagSoup (http://www.ccil.org/~cowan/XML/tagsoup/) as its input source. In your handler, simply set a flag and reset a StringBuffer to collect the contents of any <a>...</a> element. Simplified:
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
if ("a".equals(localName)) {
currentHref = attributes.getValue("href");
if (currentHref != null && currentHref.length() > 0) {
inLink = true;
//reset the string buffer
buffer.setLength(0);
public void characters(char[] ch, int start, int length) throws SAXException {
if (inLink) buf.append(ch, start, length);
public void endElement(String uri, String localName, String qName) throws SAXException {
if ("a".equals(localName) && inLink) {
inLink = false;
//add link to the stack
links.add(new Link(currentHref, buffer.toString()));
}Completely untested, of course... .Good luck... -
iam new to java
how we can retrieve the content of html table .
if suppose i have an website www.abc.com from this website i have to get the html table data how it can be possibel
thank u
shaunakYou don't need to include any jars if you do not use any specific libs / APIs.
In addition I'd rather use regexes than indexOf - they're much more flexible.
To match a html table contents use a pattern like that:
String pattern = "<table[^>]*>([^<]*?)</table>";After that a matcher using that regex against the input wiil contain the matched the data insite the <table> tag in group no 1.
You can use similar expressions with <tr> and <td>
Regards. -
Using EL to get values from View Objects
Hello again!
I' m using jdev 11.1.1.4.0, with adf and business components
Is there any way i can get a value to an af:outputText from a view object's field without
a) having to expose all fields that I need in bindings tab?
b) having to declare all fields to a backing bean
I have a statistical table with about 30 numbers in a record and it would make my project impossible to follow!
Some EL on the af:outputText with a parameter to a function on my backing bean, would sound perfect, but I've read that it's impossible...
Any clues?
Thank you for your efforts!
NikosI did not understand you.
will the drag and drop your attribute on your page will solve your problem?
or do you need to create attributeValues biding for single attribute? if yes do the following:
1- From your page, right click and select Go to Page Definition.
2- From the binding section, click the plus green icon to create a new control biding, and choose attributeValues from the list.
3- select your data source from the list or create a new one, then select the attribute you need.
4- now you have a biding, and you can set the value for your output text.
value =#{biding.yourAttribute.inputValue}
Maybe you are looking for
-
How do I view the details of my spotlight results in OSX 10.8?
Recently upgraded to Mountain Lion from 10.5 I use the spotlight function alot searching .doc and .pdf files for strings of keywords. I am often getting 1000+ results which is fine and correct but my issue is that in 10.5 there was an info bar at th
-
How do I only add a few things to the iPod w/o erasing everything on it?
I'm confused. Every time I want to put something onto my iPod, I'm told it erases what is currently on it. How do I stop that? Thanks!
-
1. create table t1 (t1ID int, t1nam varchar2(33) 2. create or replace view t1t2t3 t1id, t1name, t2id, t2nam, t2cty, t2st, aid, aname, bid, bname, t3id, t3nam as select * from t1, t2, t1 a, t1 b, t3 where t1.t1ID = t2.id(+) and T2.CTY = a.t1ID(+) and
-
EM Database Express not working in RAC installation
I installed the Oracle 12cRAC , Standard editon ,version : Oracle Database 12c Release 12.1.0.1.0 - 64bit Production edition in Windows 2008 64 Bit . Instance and RAC database is working fine is both host. After installation of the database (DBCA),
-
Myphone was given a 4 number code that i dont know so im unable to use my phone
The passcode on my phone was changed to a number I do not know. I am unable to unlock my phone