Links to AS functions in text?
Is there a way to create hyperlinks to AS functions within
text that is imported from an XML file without having to call out
to JavaScript and back?
In other words, I'd like to have a way to put a link in the
middle of a line of text and have it call an ActionScript function
when clicked.
Thanks for any help!
lectro,
> Is there a way to create hyperlinks to AS functions
within
> text that is imported from an XML file without having to
> call out to JavaScript and back?
I think the answer is yes. It is possible to create
hyperlinks (<a>
tags) in HTML-formatted text in a Flash text field. It is
possible to have
that hyperlink trigger ActionScript, rather then open a URL.
The
HTML-formatted text can indeed be loaded from an XML
document. Because none
of this involves anything outside of the SWF file itself
(besides the XML
document), no JavaScript is required.
> In other words, I'd like to have a way to put a link in
the
> middle of a line of text and have it call an
ActionScript
> function when clicked.
Assuming you're using HTML-formatted text, it's as easy as
using the
asfunction pseudo protocol, instead of the http protocol. For
example:
var tf:TextField = this.createTextField("sampleTF", 0, 0, 0,
0, 0);
tf.autoSize = "left";
tf.html = true;
tf.htmlText = "<p>Lorem ipsum dolor <a
href='asfunction:myFunction'>sit
amet</a>.</p>";
function myFunction():Void {
trace("I've been clicked!");
If your function accepts parameters, send those in as a
string, like
this:
tf.htmlText = "<p>Lorem ipsum dolor <a
href='asfunction:myFunction,param'>sit
amet</a>.</p>";
function myFunction(msg:String):Void {
trace(msg);
In the above example, the parameter's value is "param", so
that string
gets passed into the function, where it is intercepted as the
variable msg.
The line trace(msg) will trace "param" to the Output panel.
David Stiller
Co-author, Foundation Flash CS3 for Designers
http://tinyurl.com/2k29mj
"Luck is the residue of good design."
Similar Messages
-
Creating 3 links each with pop-up text box on the same slide
Hi,
I'm trying to create a slide that has 3 links and each link has a pop-up text box. I do not want to separate the pop-up text into separate slides. I have it so that there are 3 click boxes and each have the action "show" the proper text box. I also created another click box that acts as a close button where the action is to hide the pop-up box. I have an extra click box hidden on the page to make sure the user stays on the page and not automatically advance.
Once I have the user click on the first "link" it shows the text box. Once the user clicks the close click box it takes the user to the next slide. I just need it so that it shows the user the pop-up text and then when the user closes the pop-up and returns to showing the 3 options/links. So it basically refreshes the slide instead of going to the next slide.
Thanks,This will be a little tricky to achieve. This is because per default Adobe has decided that any interactive object (like a button or a click box) that has a user defined action on it (like continue, pause, open URL etc.) automatically continues to play the project when clicked.
Therefore when you click your button it will show your textbox, but it will also continue to play on your timeline.
You can read some more about it here: http://forums.adobe.com/thread/479725?tstart=0
I did something similar to what you want one time and I just created a bunch of click boxes and made them very small and put them in a corner. The click boxes were placed on the timeline with 0.2 seconds between the pauses. Then I created my "real" buttons to show/hide the text boxes and placed them on the timeline before the other click boxes.
The result is that once a user clicks your button it will show the text caption you want - continue on the timeline and pause at the first click box. When they click another button the same will happen. Just make sure that you have a lot of click boxes (I think I put like 30) and make sure that your navigation button for advancing to the next slide is set to "go to next slide" and not "continue" as that would make it pause at all your click boxes as well.
/Michael
Click here to visit the www.captivate4.com blog -
How to write from a linked list collection to a text file.
Hi,
I want to write my data in linked list collection to a text file.
the following is the code of my linked list. how do i write it
Iwant the data to be comma separated while writing it to a text file.
please help.
class MailList
public static void main(String args[])
LinkedList m1 = new LinkedList();
m1.add(new Address("J.W.West", "11 Oak Ave",
"Urbana", "IL", "118011"));
m1.add(new Address("H.S.sandy", "1 k ve",
"Bana", "L", "18011"));
m1.add(new Address("K.Satish", "1 104 Clarence Street",
"Strathfield", "NSW", "135"));
Collections.sort(m1);
Iterator itr = m1.iterator();
while(itr.hasNext())
Object element = itr.next();
System.out.println(element + "\n");
}look at the API for FileWriter.
http://java.sun.com/docs/books/tutorial/essential/io/index.html -
How can i link a video to a text file on iPad2
how can i link a video to a text file on iPad2
Alrite mate,cheers for replying....You are right,my mistake,,It is Frame and not Panel...therefore Frame 1 is home and Frame 2 is Add User. Frame 1 has a button called Add User,which if i press it should run and open up my Frame 2. I can run Frame 1 and 2 seprately and it works fine,but Now i want to link them. So When i run Frame 1 at first i only get Frame 1,but then when i press Add User button my program should start Frame 2.Resuting in 2 Frames opened. I dont know how to link them.
-
Equium A100 - s video link has not functioned
Dear Forum Members
I have an Equium A100 running Vista (home edition).
In the past I have happily had my PC linked to a TV using an S video lead to view TV programmes, dvds etc.
However recently my computer had to be reset to the original factory settings and since that time the s video link has not functioned - the PC wallpaper shows on the TV but nothing else.
I have loaded what I hope are the appropriate latest drivers (perhaps source of problem) and the display settings appear to be correct.
Any help with this problem would be greatly appreciated.
Ron>... the PC wallpaper shows on the TV but nothing else.
This happen when option Extend the desktop onto this monitor is enabled.
Please enter display settings/properties and be sure this option is disabled. -
What happened to linking a web address to text?
Why can't I link a web address to text or an image in Thunderbird anymore?
Embedding a link in text or an image only works when you are composing messages in HTML format. If plain text is your default, hold Shift when you click Write, Reply or Forward to compose in HTML format.
-
To include a new link in the function area?
Hi all,
I need to include a new link in the function area of the masthead. Could any of you please explain me how to do this?
Also after clicking on this new link on the fucntion area of the masthead, the iview needs to be displayed in the innerpage or the content area of the portal...
thank you
regards
LukeHi Luke
Hi
You can modify the par file <b>com.sap.portal.navigation.masthead</b> to achieve this.
Copy the
com.sap.portal.navigation.masthead.par.bak file from
<local_drive>usrsap<instance>JC00j2eecluster server0appssap.comirjservlet_jspirj
ootWEB-INF deploymentpcd to a temporary folder.
Rename the par file to some other namespace and import the new par file into your NWDS.
you have 3 main files in the masthead namely HeaderiView.jsp, LogInRedirect.jsp, LogOffConfirmMsg.jsp.
change the corresponding jsp file to make the changes as per your requirements.Upload and deploy the par file to the Enterprise Portal.
Also go through these links.
Customizing masthead in theme editor
Removing Masthead Function Area
Adding a background picture to masthead
hope this helps.
Regards
Yoga -
Is there a way to mix functions with text within a formula?
eg =DATEDIF("21/9/96";NOW();"Y")&DATEDIF("21/9/96";NOW();"YM") produces 183
How do I parse this formula to produce 18y 3m?
All my attempts produce a parsing error.
I'd like to avoid splitting the result into two adjacent cells (my current solution).
MacBook Pro (Retina, 13-inch, Late-2012) - 8GB mem - 128GB SSD - OS X 10.10.1 - Numbers 3.5.2 (2118)Hi zebadee,
I adjusted the dates and syntax for my region but this should work once you adjust it back.
While this gives you the desired result it will not be recognized as a duration in Numbers. If you are looking to use this value as a duration you will need to use weeks.
Hope this helps.
quinn -
In earlier versions of Flash, it was possible to link to a
local function. In the htmlText of a text area, you could link to
event:functionName instead of a website. Is that possible in the
text layout framework? If so, can someone post an example?Im having a very similar problem. I have a script which feeds
a dynamic text field named t_txt, I would like to use the
textlayout component instead of the regular dynamic text field.
currently the script informing t_txt looks like this:
import net.slideshowpro.slideshowpro.*;
function onImageData(event:SSPDataEvent) {
if (event.type=="imageData") {
t_txt.htmlText=event.data.caption;
my_ssp.addEventListener(SSPDataEvent.IMAGE_DATA,
onImageData);
Im using the slideshowpro component which is hooked up to an
external database which provides captions, pictures and titles.
What href would i supply to the textlayout component? and are there
any changes i need to make to the above script? thx, Yasha -
The following tutorial works fine for static html that is hard coded into the tag
http://www.xllusion.net/ed/2010/04/26/flex-4-richeditabletexttlf-link-example/comment-page -1/#comment-2057
but I need my text to be bindable and dynamic loading sometime later...I cannot seem to get the event things work if I embed like in the aforementioned tutorial so im sure my code for the adding events is good.
Im using the following
<s:RichEditableText paddingLeft="10"
paddingBottom="5"
paddingRight="10"
id="articleField"
maxHeight="300"
textFlow="{TextConverter.importToFlow( articleText, TextConverter.TEXT_FIELD_HTML_FORMAT )}"
editable="false" />
many thanksImages that are referenced by url may not be loaded when the textFlow is initially generated. The TextFlow will send an event when the load is complete --- see the StatusChangeEvent. I would try this, after you've got a textFlow object:
newFlow.addEventListener(StatusChangeEvent.INLINE_GRAPHIC_STATUS_CHANGE,recomposeOnLoadCom plete,false,0,true);
private function recomposeOnLoadComplete(e:StatusChangeEvent):void
if (e.status == InlineGraphicElementStatus.ERROR)
trace("IOERROR loading inlinegraphicelement",e.errorEvent.toString());
if (e.element.getTextFlow() == activeFlow && e.status == InlineGraphicElementStatus.SIZE_PENDING)
activeFlow.flowComposer.updateAllControllers();
The TextFlow will send a SIZE_PENDING when the graphic is loaded, and this code will force an update when that happens. For better performance, make a counter of all the inline graphic elements that are pending, and do the update once after they've all completed, and remove the event listener. But this code should work fine for you, and if you leave the event listener in place will handle any susequent graphic loads on that text flow as well.
- robin -
Interactive report column with an external link - Sort, chart functions
interesting.... the message text did not make it into the post (twice). But edit seems to work.
Our problem....
We have an interactive report with a column that in some cases will contain information allowing us to build a link. We have updated the report query to return the data tagged with the <a href..... on rows that can be links. The links are displayed and function correctly. However, if we click on the column header so we do something like sort, the page hangs. If we try to create a report using this column we get an error.
We have also tried marking the column as a link in the IR definition. With that design, the sort and reporting isn't an issue, but all the rows are links, which is not what we need.
Does anyone have any ideas on how to solve this problem?
Thanks, Nann
Edited by: Nann on Feb 6, 2010 11:07 AMHi Peter,
Thanks for your suggestion. We ended up with a slight variation in the design that allowed us to mark the column as a link.
Basically we have a column just for the link.
In our query we now have 2 columns. One that builds the url, the other the text we want displayed as a link.
If that row should not have a link in it the query returns null for both columns.
We only display the link column in the report.
We use the url column in the link definition .
We've disabled the sort and other functions on this column.
All works as we wanted.
Thanks
Nann -
Masthead Function Area text alignment
Hi all,
It seems that the portal theme editor does not have a property for alignment of the text in the Masthead Function Area. I'd like to move the "Personalize", ""Log-off" links lower in the function area. Is there any standard property for this?
Note: I DONT want to edit the Masthead PAR.
- NiravHi Irina,
I do not think that you could use some kind of standard functionality to add a custom link to your portal masthead. I guess you have to modify the com.sap.portal.navigation.masthead.par file in order to achieve your goal. Have a look into this <a href="https://www.sdn.sap.com/irj/sdn/thread?threadID=191891">thread</a>. It contains detailed instructions how to modify the file and might inspire you.
Best regards,
Martin -
Linking a slideshow with a text box on Muse
Hi!
So I'm creating my first every website on Adobe Muse, so I'm still new to its functions.
I'm creating an online portfolio for myself. What I want to do, is have a menu bar containing the names of all my projects, and clicking on one link would open up a lightbox-slideshow. At least I want to make this happen, I'm not sure if I can do it. Its fairly easy to do it on Dreamweaver, you just drag the hyperlink to the image/file you want and that's it. I'm wondering if there's something like that I can do in Adobe Muse?
Its fine if it doesn't happen that way, but are there any alternatives? I basically have a lot of projects, and I want people to be able to select a text box/image and open the project so they can view all the images of that particular project.
Am I making sense?
For reference, here's the idea behind it -
http://gemmasuttondesign.com
Its my friend's wordpress blog. You click on an image to view the entire project. Can I do this on Muse?
Really need help here, my deadline for the portfolio is coming up in a few days and I need to sort this out!
Thank you xxHi
Yes, you can do this using widgets in muse. You can either use Lightbox composition where the triggers can be used for text box or image and then on click it would bring up the images in lightbox mode.
Or you can use any other composition for similar effect, if you are looking for some pop-up box with images on click to trigger then you can use Tooltip.
Additionally you can use Panel widget if you want auto slide for images.
Helpful Links :
http://www.youtube.com/watch?v=pgemI-B0Jrc
http://helpx.adobe.com/muse/tutorials/widgets.html
http://tv.adobe.com/watch/muse-feature-tour/muse-create-tabbed-and-accordion-panels/
Thanks,
Sanjit -
Email link to a pdf with text anchor on web site
I'm trying to create an email with a link to a web site's pdf file with a text anchor. I want the link to take the reader not just to the pdf file but to a certain location in the pdf file. I'm creating the pdf with the text anchor in Indesign 4. It's not working. Is this even possible?
Many thanks, Lorrainehttp://partners.adobe.com/public/developer/en/acrobat/PDFOpenParameters.pdf
See also http://www.htmlcodetutorial.com/help/sutra66019.html for a full discussion. But of course it all depends on the application you are trying to open the PDF with -- not all of them may support these parameters. -
How to make an URL link in tabel connected to text or image?
I have a tabel with cells. in each cell is a picture and the name of twitter accounts. Just like a Vcard
Now I want to link the image or/and the accountname to the webpage of that twitter account.
This doesn't seem to work in the normal link way option.
Some one already solved this?
I was thinking of a hidden text frame with white color or no color but that doesn't seem to work either.
Can't accept that this is not possible....
Need it for a twitterpage of astronauts for my book @astro_andre
http://itunes.apple.com/nl/book/astro-andre/id502369424?mt=11Those links can only be local to the book as I recall...
Maybe you are looking for
-
Copy iTunes library to new MacBook Pro
Hi 1st timer here I've just upgraded from a Power Mac (V10.5.8) to a Mac Book Pro. I'd like to transfer all the music I have in iTunes (V10.6.1) and don't want to have to buy Leopard just for this one-off. I've used the thunderbolt to copy everythi
-
Made a website in iWeb '08, and would like to work on it in iWeb '09 too!?!
We originally had iWeb '08 on our G5 iMac on which I made my website. Recently we bought a new Intel based iMac which has '09 on it. We are still using both computers in the house on a wireless network. I would like to primarily continue to work on t
-
Java update not working with OS X
Downloaded Java and it doesn't seem to be working after updating to OS X and can't play mine craft -
-
So I have created a logo in CS6... I would like to use the logo on a letterhead but when the letter is saved as a pdf the letterhead is pixelated. The logo is text only with effects on the lettering. I need be able to either export the logo into illu
-
Cvta changing from 1.0.2 to 2.0.2
hello, i'm considering changing our vt users to 2.0.2 after upgrading the ccm to 4.1.3. In 1.0.2 you could use the deployment application to upgrade or install vt users, however the literature i'm reading on 2.0.2 seems to indicate thats done away wi