Help with dynamic button click inside titleWindow
Hi Everyone, Your Help is much appreciated
I am building a flex application and I want the user to click
on a button and send them to another website. Basically I am
creating a tileList that holds thumbnails (created using item
renederer) and on click a popup with the same image and button will
be created. I get errors when I click the link button. This is what
I have so far:
// This is my custom item renderer
<mx:VBox xmlns:mx="
http://www.adobe.com/2006/mxml"
horizontalAlign="center"
verticalAlign="middle">
<mx:Image source="{data.@thumbnailImage}" />
<mx:Label text="{data.@title}" />
</mx:VBox>
// My TileList
<mx:TileList id="tileList"
dataProvider="{xmlListCollection}"
itemRenderer="CustomItemRenderer"
maxColumns="4"
columnWidth="140"
rowCount="2"
rowHeight="140"
verticalScrollPolicy="off"
horizontalScrollPolicy="off"
itemClick="tileList_itemClick(event);" />
// This is my code
private function tileList_itemClick(evt:ListEvent):void {
// Set the TitleWindow
myTitleWindow = new TitleWindow();
myTitleWindow.title = evt.itemRenderer.data.@title;
myTitleWindow.width = 350;
myTitleWindow.height = 600;
myTitleWindow.showCloseButton = true;
// Set the Image
img = new Image();
img.maintainAspectRatio = true;
img.buttonMode = true;
img.useHandCursor = true;
img.source = evt.itemRenderer.data.@fullImage;
img.addEventListener(MouseEvent.CLICK , image_click);
//Set the Label
myLabel = new Label();
myLabel.text = evt.itemRenderer.data.@title;
myLabel.setStyle("fontWeight","bold");
// Here I set the Button but its not functioning
var btn:Button = new Button();
btn.label = evt.itemRenderer.data.@link;
btn.buttonMode = true;
btn.addEventListener(MouseEvent.CLICK,clickHandler);
myTitleWindow.addChild(img);
myTitleWindow.addChild(myLabel);
myTitleWindow.addChild(btn);
PopUpManager.addPopUp(myTitleWindow, this, true);
PopUpManager.centerPopUp(myTitleWindow);
// This is the Part I can't get it to work
private function clickHandler(e:MouseEvent):void{
var url:String = "
http://" + data.@link;
var myRequest:URLRequest = new URLRequest(url);
navigateToURL(myRequest,'_blank');
My xml looks like this
<gallery>
<image title="Image One"
thumbnailImage="assets/big.jpg"
fullImage="assets/small.jpg"
link="www.google.com"
description = "Search Google"/>
</gallery>
What error?
Is your url being concatenated correctly? Trace it.
Tracy
Similar Messages
-
Hello,
I need help with a button. I created a button and set it up
so that when you click and hold it, the button becomes lighter in
color (I used Alpha). I want the button to stay this light color
after i release the click. Right now it goes back to the normal
color when I release the click. Can somone help we this?
Thanks!rpofclt wrote:
> Hello,
>
> I need help with a button. I created a button and set it
up so that when you
> click and hold it, the button becomes lighter in color
(I used Alpha). I want
> the button to stay this light color after i release the
click. Right now it
> goes back to the normal color when I release the click.
Can somone help we
> this?
you can't use the button itself if you want to maintain the
DOWN state after
release as button automatically resets itself once the mouse
lives the HIT zone.
Use movie clip instead and on press simply send it to a frame
where there
is DOWN state like image.
Best Regards
Urami
<urami>
If you want to mail me - DO NOT LAUGH AT MY ADDRESS
</urami> -
Help with linking buttons to Scenes
Hey,
Rookie to Flash and AS3. Just needed some help with my buttons. Im making a flash program about pancakes (random I know). I have a "Mainmenu" scene and then a "Recipe" scene. I have a button on my mainmenu which takes me to the recipe page when I click it, the code behind the button is
"stop();btn_recipe.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);function mouseDownHandler(event:MouseEvent):void {
gotoAndStop(1, "Recipe");
Then when I arrive at my recipe page I have a button which will take me back to my MainMenu, the code behind that button is:
"stop();btn_home.addEventListener(MouseEvent.MOUSE_DOWN, mouse5DownHandler);function mouse5DownHandler(event:MouseEvent):void {
gotoAndPlay(1, "MainMenu");
So I run my program and the first button works and takes me to recipe page but the button to get to the main menu does nothing, click it and no response or anything
Please helpFirst, hopefully having all your code mushed onto the same line is a copy/paste error, otherwise it should look like...
stop();
btn_recipe.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
function mouseDownHandler(event:MouseEvent):void {
gotoAndStop(1, "Recipe");
If the intention is to click the buttons to make them work, then you should use CLICK instead of MOUSE_DOWN. MOUSE_DOWN can be a persistent state whereas CLICK involves releasing it afterwards.
As for the code to get you back home, where is it located on the timeline? Are you getting any error messages when you try to use it?
One thing you should learn to use is the trace() function. It is useful for troubleshooting. You can use it now to see if your second button is talking to the function at all...
stop();
btn_home.addEventListener(MouseEvent.CLICK, mouse5DownHandler);
function mouse5DownHandler(event:MouseEvent):void {
trace("the button works okay");
gotoAndPlay(1, "MainMenu");
If you don't get that message in the output panel, you'll know the button is not properly coded to work.
Most folks here will recommend you get away from using scenes in a design that includes navigation--they have a history of being problematic. Instead of using scenes, divide the one main timeline up into sections or use movieclips for the sections and manage their visibility... or do a bit of both. -
Is it possible to make a search help with dynamic selection table?
Hi Experts,
Is it possible to create search helps with dynamic seletion tables means
i dont know the selection table names at the time of creation of search help.
These tables will be determined at runtime.
if yes, Please give an idea how to create and pass the table names at runtime.
Thanks
Yogesh GuptaHi Yogesh,
Create and fill your itab and show it with FM F4IF_INT_TABLE_VALUE_REQUEST
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'field to return from itab'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'field on your screen to be filled'
stepl = sy-stepl
window_title = 'some text'
value_org = 'S'
TABLES
value_tab = itab
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
Darley -
Creating tables with a button click
can anyone give me a sample code for creating multiple tables in a scrollpane
with a button click.
ThanksHere is an example that returns a JTable in a JScrollPane in a JInternalFrame:
import java.awt.*;
import javax.swing.JFrame;
import javax.swing.JInternalFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import java.awt.GridLayout;
public class TablaJ extends JPanel{
public TablaJ(){
public TablaJ(String data[][], String columnNames[]){
super(new GridLayout(1,0));
final JTable table = new JTable(data, columnNames);
//Create the scroll pane and add the table to it.
JScrollPane scrollPane = new JScrollPane(table);
//Add the scroll pane to this panel.
add(scrollPane);
static JInternalFrame crearFrameConTabla(String data[][], String columnNames[], String tabla) {
//Create and set up the window.
JInternalFrame frame = new JInternalFrame(tabla,true,true,true,true);
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
//Create and set up the content pane.
TablaJ newContentPane = new TablaJ(data, columnNames);
newContentPane.setOpaque(true); //content panes must be opaque
frame.setContentPane(newContentPane);
frame.pack();
return frame;
} -
Need help with Dynamic Excel File Name please.
I am try to output an excel file with dynamic date.
Here what I done.
I am using SQL 2012.
Create Execute SQL Task Connect Type: Excel
Create Data Flow Task set to DelayValidation: True
Create OLE DB Sourc
Create Data Converstion
Excel Destination
Excel Connection, Expression, select ExcelFilePath
@[User::sXLFilePath] + @[User::sFileName] + RIGHT("0" + (DT_WSTR, 2) DATEPART("DD", GETDATE()), 2)+ RIGHT("0" + (DT_WSTR, 2) DATEPART("MM", GETDATE()), 2) + RIGHT((DT_WSTR,
4) DATEPART("YYYY", GETDATE()), 2) +".csv"
C:\ExcelOutPut\SOX_CAM_SQL_Report_010215.xls
What I try to accomplish is output the file with each day append to it, date must be DDMMYY.
I google it and found many samples, tested it, and none of them is work for me.
Any suggestions or some examples to share is greatly appreciate.
I am new to SSIS. I found one poster have similar issue and inside the posted below, there was one suggestion to create variable and connection string but how do I bind that variable to Excel Connection manger.
Please help.
Thank you so much in advance.
Ex: SOX_CAM_SQL_Report _020215.csv
SOX_CAM_SQL_Report _030215.csv
--Similar issue:
https://social.msdn.microsoft.com/Forums/en-US/bda433aa-c8f8-47c9-9e56-efd20b8354ac/creating-a-dynamic-excel-file?forum=sqlintegrationservices
Suggestion in the above posted but where can bind this to Excel Connection Manger.
Please help provide step by step. Thanks.
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\temp\\" + "ExcelTarget" + (DT_WSTR,4)DATEPART("yyyy",GETDATE()) +
".xls" + ";Extended Properties=\"EXCEL 8.0;HDR=YES\";"
And yes, as you were intimating, the delay validation on the dataflow should be set.Hi NguyenBL,
According to your description, you created ssis package to export data from database to excel, when the package runs, you want to create new excel and name the file with time stamp. If that is the case, we can achieve the goal by following steps:
Create a script task used to create excel files.
Create a data flow task to export data from database to excel.
Add OLE DB source to data flow task.
Add Excel Destination to data flow task.
Create connection manager for OLE DB and Excel.
Click Excel Connection Manager, in Properties window, click (…) button next to Expressions, then set ExcelFilePath with expression like below:
"C:\\ETL Lab\\CreateNewExcel\\ExportData_"+REPLACE((DT_STR, 20, 1252)(DT_DBTIMESTAMP)@[System::StartTime], ":", "")+".xls"
For detail information, please refer to the document:
https://sqljourney.wordpress.com/2013/01/12/ssis-create-new-excel-file-dynamically-to-export-data/
If you have any more questions, please feel free to ask.
Thanks,
Wendy Fu
Wendy Fu
TechNet Community Support -
Help with dynamic text and and css !
My second question of the day.
I'm trying to build a feature in my app in which the user can
hide/reveal
bolding and or
italics and or
underlining. The text is being loaded in from an xml file
and I was thinking about styling it with css in order to get the
underlining. My problem is that the only way I can think about
pulling this off is to have a css style sheet that has a defined
bold,italic and underline class defined- - then another one that
just has a italic and underline class defined -- then another one
that has just a bold and underline class defined . . . and so on
and so on. You can see why I would prefer a much more streamlined
system. Unfortunately my experience with dynamic text styling is
somewhat limited. Hopefully someone can help me out here.Perfect. I knew it was some little snippet that I was
forgetting. I made a temporary fix of creating a 0% alpha box over
the button like a fake click area above the text, and that worked
but I know that it was a half-arsed way of working around it.
Thanks. -
Help with dynamic page layouts
Hello JSP Gurus,
I'm attempting to dynamically generate the page layout for my site based on the organization a user belongs to. Basically, I'd have certain resources like navigation links, graphics, etc, that are modular. Then I'd like to construct the layout using these "moduls" in a dynamic fashion. Does anyone have any suggestions on techniques or technologies that would be useful? I'm not really looking at the portal/portlet model. Is this something that Cocoon could do by storing the layout for each customer as an XML file or something? Any ideas, suggestions, experiences would be helpful.
Thanks!How does Tiles differ from the JetSpeed apache
project? They both appear to be portal-like
frameworks, or am I incorrect about that? Which is
preferred?Frankly, I can't give you an in-depth answer to that. Maybe someone else can help with more details.
What I can tell you is that JetSpeed seems to be more of a real portal architecture. Emphasis is placed on the framework portion, interfacing with exisiting applications. Visual layout takes second seat to this.
Tiles on the other hand puts more emphasis on visual layout and reuse.
Just looking at JetSpeed's visual interfacing a little bit makes me really dislike it. You build tables and such inside of a servlet, so there's a tight coupling (or at least, much tighter than with Struts/Tiles) between the presentation and logic. (I'm basing this on a JavaWorld article at
http://www.javaworld.com/javaworld/jw-07-2001/jw-0727-jetspeed.html )
Based on your initial question, it would seem to me that tiles is much closer to what you're looking for (and likely easier to just pick up and use).
Anyway, take all this with a grain of salt; I'm not exactly an expert on JetSpeed. =) -
Help With Radio Buttons -- URGENT!!
Hi i am new to using UI compents in flash.
Basically i havnt a clue where to start.
Just some simple action script will help and be much
appreciated if someone can give me it.
Basically i have a question to ask which requires radio
buttons to answer the question.
I have a question and the answers are A, B, C, D.
I want:
A to equal 1
B to equal 2
C to equal 3
D to equal 4
E to equal 5
Would someone be able to tell me how to set up the radio
button so that the value of the radio button is stored into an
array called SCORE.
i dont need a tutor for arrays, i can do them, i just need
help with the radio buttons so a reference to an array would be
enough, eg how to store the answer from the radio button in an
array.
Thank youPlace the radio buttons on the stage and set their parameters
to what you need. Make sure that for each group of radio buttons
you give them the same group name. Then you could use something
like this:
var listenerObject:Object = new Object();
var answerArr:Array = new Array();
listenerObject.click = function(eventObj:Object) {
answerArr.push(eventObj.target.selectedData);
trace(answerArr);
radioGroup.addEventListener("click", listenerObject);
radioGroup refers to the group name for the buttons.
eventObj.target will refer to the actual radio button
clicked.
Tim -
Create three textfiles with one button click
Hello,
how is it possible to create three textfiles after a button click. I create a textfile with the following code in a page process:
owa_util.mime_header( 'application/octet', FALSE );
htp.p('Content-Disposition: attachment; filename="Client_' || to_char(sysdate,'YYYYYMMDD HH24MI') || '.LAS"');
owa_util.http_header_close;
htp.prn('test');
htmldb_application.g_unrecoverable_error := true;
For the first textfile a savedialog to save the file appears in the browser. But there is no dialog for the second and third file.
How is it possible to get the savedialog for the second and third file?
Does anyone can help?
Best regards,
HamburgerI solved it with javascript:
window.open("f?p=1:2","_blank");
window.open("f?p=1:3","_blank");
window.open("f?p=1:4","_blank");
and three onload processes on every site!
Greets -
Open LOV popup with a button click or image link click
hi , a try the solution:
11g: How to populate LOV from button click
for open pòpup of lov , but don't works :
first the others components block the submit of button
i put the inmediate propertie but lov don't still open
any ideas???Does this one help?
Invoke lov popup window via keypress -
Spinner list to pop up with a button click
How can I open this spinner list with a click of a button, and then close it with another button?
<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" title="Sample SpinnerList" xmlns:r="renderers.*">
<s:layout>
<s:VerticalLayout paddingTop="40" paddingBottom="5" paddingLeft="5" paddingRight="5" gap="10"
horizontalAlign="center" verticalAlign="top"/>
</s:layout>
<s:SpinnerListContainer width="200">
<s:SpinnerList width="100%">
<s:dataProvider>
<s:ArrayCollection>
<fx:String>Test1</fx:String>
<fx:String>Test2</fx:String>
<fx:String>Test3</fx:String>
<fx:String>Test4</fx:String>
<fx:String>Test5</fx:String>
</s:ArrayCollection>
</s:dataProvider>
</s:SpinnerList>
</s:SpinnerListContainer>
</s:View>I cant get it to work it with this code:
How do I implement the code to my code so I can use the button to open spinner?
<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" title="Sample SpinnerList" xmlns:r="renderers.*">
<s:layout>
<s:VerticalLayout paddingTop="40" paddingBottom="5" paddingLeft="5" paddingRight="5" gap="10"
horizontalAlign="center" verticalAlign="top"/>
</s:layout>
<s:SpinnerListContainer width="200">
<s:SpinnerList width="100%">
<s:dataProvider>
<s:ArrayCollection>
<fx:String>Test1</fx:String>
<fx:String>Test2</fx:String>
<fx:String>Test3</fx:String>
<fx:String>Test4</fx:String>
<fx:String>Test5</fx:String>
</s:ArrayCollection>
</s:dataProvider>
</s:SpinnerList>
</s:SpinnerListContainer>
</s:View> -
I need help with a button animation!
Hi,
I hope someone can help with a simple-looking problem which
nonetheless has me stumped!
I have a feeling that I've missed something obvious.
I've created a movie clip to act as a button (I've called it
"abs_button") and placed it on the stage.
My main movie has one frame.
Within the "abs_button" movie clip there are 5 layers.
Labels, actions, default button state, rollover state and rollout
state.
Technically, default button state, rollover state and rollout
state could be on the same layer as they don't overlap, but I've
given each animation its own layer for clarity.
FRAME 01.
Default button state is one frame with a graphic of the
button. Just a label at the start ("abs_up") and a "stop();" action
at the end.
FRAME 02 to 31.
Rollover state is a 30 frame animation. Label at start
("abs_over"), "stop()"; action at the end.
FRAME 32 to 62.
Rollout state is a 30 frame animation. Label at start
("abs_out"), "stop()"; action at the end.
All animations were achieved with tweens.
My initial "abs_button" code:
on (release) {
getURL("targetPage.htm", "_self");
on (rollOver) {
gotoAndPlay("abs_button", "abs_over");
on (rollOut) {
gotoAndPlay("abs_button", "abs_out");
As it stands, the animation jumps to frame 1 of "abs_out" on
rollout.
I need the "abs_over" animation to always play through to the
end, as the "abs_out" is "abs_over" in reverse (i.e. image grows
large on rollover and shrinks again on rollout.
I've tried for 2 days to solve this, but I clearly need help.
My experiments with variables simply didn't work.
I would be grateful if someone could tell me where I'm going
wrong!
Thanks,
Andyuse this:
on (rollOver) {
gotoAndPlay("abs_over");
Since the code is attached directly to the movieclip, you
don't have to
identify the clip. A gotoAndPlay() function takes a frame
number or a
frame label name as its argument, never the name of the clip
that
contains the frame number or name.
Rob
Rob Dillon
Adobe Community Expert
http://www.ddg-designs.com
412.243.9119 -
Little bit of help[ with a button.
Good day all!
I need help making a button. This is what I want to happen.
I have a bunch of text, One of the words "merino" is bule as
to say there is a link hear! And I want an image of the "merino" to
come up, like a "ALT" box. Or have an image in the "ALT" box?
I know how to do this in "Flash" i.e just drop in the image
on the over state of the button event. Easy as pie! This is why I
cant get to grips with Dreamweaver! I hate it!
But I am willing to learn and maybe in time love???
Thanks all!"satrop" <[email protected]> wrote in
message
news:f0o4t7$954$[email protected]..
> Good day all!
>
> I need help making a button. This is what I want to
happen.
>
> I have a bunch of text, One of the words "merino" is
bule as to say there
> is a
> link hear! And I want an image of the "merino" to come
up, like a "ALT"
> box.
>
> I know how to do this in "Flash" i.e just drop in the
image on the over
> state
> of the button event. Easy as pie! This is why I cant get
to grips with
> Dreamweaver! I hate it!
>
> But I am willing to learn and maybe in time love???
HTML is a lot different from Flash! :-)
I believe you could do this using DW's Show-Hide layer
behavior - have
mousing over the link trigger a layer with the image to
appear. Someone else
may have a better idea.
Just FYI, having to mouse over a link in order to get more
information about
it isn't usually appreciated by users. You *might* want to
re-think this
plan..
Patty Ayers | Adobe Community Expert
www.WebDevBiz.com
Free Articles on the Business of Web Development
Web Design Contract, Estimate Request Form, Estimate
Worksheet -
I'm having a really rough time understanding how to code my interactive menu.
I've posted the files here https://dl.dropboxusercontent.com/u/21231523/Menu_animation.zip.
1. I'd like my first animation to run which involves the buttons swooping in and then coming into the correct positions.
2. When you roll over the buttons, I'd like them to turn red.
3. When you click on the buttons, I'd like them to stay red, and the actual text label rotates 90 degrees. I'd like this to stay this way until the user either clicks on the button again to rotate it back to 0 degrees or when the user clicks on another button and that also causes the button to rotate back and the current button clicked on rotates 90 degrees.
I'd appreciate any help.
Thanks so much.To get the kind of interaction and anoimation you identify you will need to use movieclip symbols instead of button symbols.
Maybe you are looking for
-
How do i keep my wife's iphone and mine separate when syncing?
my wife and i just bought 2 3Gs iphones yesterday. when i synced them, my account (the master account) had all my info on her phone as well as mine. how do i keep them separate? this is what i have i done so far. -created family pack w/ mobile me and
-
Totally helpless installing NetWeaver with ABAP
Hi, I am trying to install SAP NetWeaver 2004 SneakPreview with ABAP for the last 2 days. But I am getting the error esage which is at the end of this topic:I did all the above and am at my wits end: 1) Removed any exiting database instance. 2) Insta
-
Problem with SAPWL_WORKLOAD_GET_STATISTIC results
Hello, in order to get som statistic Informations about the number of calls of some reports, i use the FM SAPWL_WORKLOAD_GET_STATISTIC. CALL FUNCTION 'SAPWL_WORKLOAD_GET_STATISTIC' EXPORTING periodtype = 'M'
-
Can we have a JTabbedPane inside JPanel ?
I am having following containment hierarchy. JFrame --> JSplitPane(RightComponent) --> JPanel --> JTabbedPane --> (JPanel1 and JPanel2) When I run the application, I see no tabs and only JPanel2 is loaded. regards, Nirvan
-
Disabling slide time limitations
Hi guys, How does one disable or delete the time that can be spent solving a slide in Captivate 7? once i launch drag and drop, my images seems to disappera after a few seconds and i dont want this and i dont fancy individually dragging the timeline