Need help displaying images with List component for Flash CS4 (ActionScript 3.0)
Hi folks:
I am an inexperienced user of Flash CS4 Pro (v10.0.2). I am attempting to use the List component with ActionScript 3.0 to make a different image display when a user clicks each item in a list.
I did find a tutorial that showed me how to make different text display using a dynamic text box and the following ActionScript:
MyList.addEventListener(Event.CHANGE, ShowSelectedItem);
function ShowSelectedItem(event:Event):void {
ListText.text=MyList.selectedItem.data;
...where My List is the instance of the List component and ListText is the dynamix text box. In this case, the user clicks an item in the list, defined by the label value in the dataProvider parameter of the List component, and text displays as defined in the data value in the dataProvider parameter.
However, as I mentioned to start, what I really want to do is make images display instead of text. Can anyone provide me the steps to do this?
I appreciate your help (in advance)!!
Cindy
Hi...thanks for responding! I was planning on using images from the Library, but if there is a better way to do it, I'm open. So far, I just have text in the data property. This is part of my problem. I don't know what I need to put in the data value for an image to display. Do I just put the image file name and Flash will know to pull it from the Library? Do I need to place the images on the stage on different frames? I apologize for the "stupid user" questions, but as you can tell, I'm a newbie.
Appreciate your patience and any help you can offer!
Cindy
Similar Messages
-
Display Image In List Tile for creating Hyperlink
Hi,
I have a requirement in my project that I have to display Image in one of the column of the List tile for Hyperlink. I have created custom control for this but unable to show the image on the List tile, currently it showing the Path of the Image. I wrote the following two codes but none worked.
-- First One
'Me.ctrlZ_MyControl.value = gServices.getResourceFilename("Z_Image.GIF")
--Second One
'columns.Item(Me.ctrlZ_ MyControl.bookmark) = "Z_Image "
Pls share the code If Anyone has worked on this kind of scenario.
Thanks and regds
HarishHi,
did you already follow my suggestions in
[Filling the custom resource in a grid;
Regards,
Wolfhard -
Need help Loading images with selection on a form field?
So I'm kind of a newb.. I can do basic forms but I need to set up a form field drop down box that will give me the ability to load images correlating to the users choice. I'm at a total loss for where to start, so ANY help would be appreciated. If you know of any good books or tutorials on the subject please share.
Thanks in advance
Sincerely,
Stumped4nowP.S. I think I'm getting a better understanding of OCGs after lots of research today. However I still seem to be missing something
var docOCGs = this.getOCGs();
for (var x=0; x < docOCGs.length; x++)
if(docOCGs[x].name == "Layer1")
docOCGs[x].state = !docOCGs[x].state; -
Need help displaying image on canvas :((
can anybody help me with my coding. my problem is, i cannot display an image on my canvas. plz..someone help me to solve my problem..
Here's my coding...
import javax.microedition.lcdui.*;
import javax.microedition.io.*;
import java.io.*;
import java.util.*;
public class ImageMidletServlet
Display display = null;
//Form f = null;
String url = "http://localhost:8080/banner/hp0.gif";
String url2 = "http://localhost:8080/banner/rotateNumber";
//String url = "http://localhost:8080/banner/banner";
Command backCommand = new Command("Back", Command.BACK, 0);
Command submitCommand = new Command("Submit", Command.OK, 2);
Command exitCommand = new Command("Exit", Command.STOP, 3);
private Test test;
private StringItem stringItem2;
private TextField txtField;
private Timer tm; // Timer
private load load; // Task
private int id = 0;
Image img = null;
//String id;
public ImageMidletServlet(Display display)
this.display=display;
loadimage();
public void loadimage()
tm = new Timer();
load = new load();
tm.schedule(load,0,6000);
class Test extends Canvas implements Runnable, CommandListener
private Canvas canvas;
public Test(Canvas canvas)
this.canvas=canvas;
setCommandListener(this);
public void start()
Thread t = new Thread(this);
t.start();
public void run ()
DataInputStream is = null;
DataInputStream is2 = null;
StringBuffer sb = new StringBuffer();
Image img= null;
TextBox txtBox = null;
StringBuffer b = new StringBuffer();
HttpConnection c2 = null;
OutputStream os = null;
++ id;
try
c2 = (HttpConnection)Connector.open(url2+ "?bannerid="+id);
os = c2.openOutputStream();
os.write(("bannerid="+id).getBytes());
os.flush();
//HttpConnection c = (HttpConnection) Connector.open(url+ "?bannerid="+id);
HttpConnection c = (HttpConnection) Connector.open(url);
int len = (int)c.getLength();
if (len > 0)
is = c.openDataInputStream();
byte[] data = new byte[len];
is.readFully(data);
is2 = c2.openDataInputStream();
int ch;
while ((ch = is2.read()) != -1) {
b.append((char) ch);
System.out.print((char)ch);
try {
//img = Image.createImage(data, 0, len);
img = Image.createImage("/images/splash.png");
Graphics graphics = img.getGraphics();
catch (Exception e)
if(img==null)
System.out.print("no image");
else {System.out.print("got image");}
else
showAlert("length is null");;
is.close();
c.close();
c2.close();
// repaint();
catch (Exception e)
e.printStackTrace();
showAlert(e.getMessage());
/* Display Error On screen*/
private void showAlert(String err)
Alert a = new Alert("");
a.setString(err);
a.setTimeout(Alert.FOREVER);
display.setCurrent(a);
public void commandAction(Command c, Displayable d)
if (c == exitCommand)
//destroyApp(true);
//notifyDestroyed();
else if (c == backCommand)
//display.setCurrent(f);
else if (c == submitCommand)
/*test = new Test(this);
test.start();*/
protected void paint(Graphics graphics)
if (img != null)
graphics.setColor(0x000000);
graphics.drawImage(img, 0, 0, Graphics.TOP | Graphics.HCENTER);
else
{System.out.print("no drawing");}
class load extends TimerTask
private Test canvas;
public final void run()
this.canvas = canvas;
test = new Test(canvas);
//test();
test.start();
}Hi
I would do like this: take the code that draws the image an put it into a separate class (which will extend the Canvas class) which will take as a parameter to its constructor either an array of bytes or an Image object (it's up to you) and call this class after you have downloaded all the bytes from the input stream. I presume that you get the "no drawing" message..
Mihai -
Need help/hints/tips with a method for connect 4 game.
Hi!
I'm currently trying to get my "movepiece"-method to make it so that players can only drag a piece into the empty square at the bottom row, and if the square is not empty the method will move up one row and check if it's empty if not, repeat until
6 are checked if no one is empty then move is invalid.
I've been trying out while loops and for loops but i think i might set the wrong conditions for exiting the loop...
Here the code for the method without any loops simply adds pieces.
/// <summary>
/// Method that performs the actual move.
/// The old piece gets overrun by the attacking piece.
/// The attacking piece's position becomes null.
/// </summary>public Piece[,] MoveAttackpiece(int[,] changearray)
int origX = changearray[0, 0];
int origY = changearray[0, 1];
int targetX = changearray[1, 0];
int targetY = changearray[1, 1];
pieceArray[targetX, targetY] = pieceArray[origX, origY]; //swap
return pieceArray;
The game is using winforms and a 2D array(pieceArray)to draw the game board
I'm using a Constants class for declaring the height and width of the board, which the pieceArray is based on, Namely const int BOARDESIZEx and BOARDERSIZEy.
And while i'm at it when i did different loops for tryng to make the piece move down/up (based on if a square in bottom row was empty or not) the program crashes and i get the "Null Reference Exception unhandled"
at this part in the game.CS (the earlier code reside in a class named Squares.cs)
if (changearray != null)
//Building string to print (split over several rows for readability but also to avoid calculations)
Piece attackpiece = pieceArray[changearray[1, 0], changearray[1, 1]];
string message = "";
if (move % 2 == 1) message += "TURN " + move / 2 + ":\r\n"; //integer division, as there are two draws per turn
message += attackpiece.Name + ": "; //Walker:
message += IntegerToChar(changearray[0, 1]); //Walker: A
message += (changearray[0, 0] + 1) + " - "; //Walker A1 -
message += IntegerToChar(changearray[1, 1]); //Walker A1 - B
message += (changearray[1, 0] + 1); //Walker A1 - B2
if (move % 2 == 0) message += "\r\n"; //blank row inserted after each completed turn
Board.PrintMove(message);
I've tried making
While(piecearray[targetX, targetY]!=null)
pieceArray[targetX, targetY]==pieceArray[targetX, targetY +1];
return array;
but that didn't work and i don't really know how to make the game start at bottom row.
I appreciate any help or tips on how to get this to work since it's the only thing left for making the game work as intended.
Cheers and thanks for reading.
PS: if there's anything you wonder just ask and i'll explain as much as i can.
Regards Gabbelino
Student at the University of Borås, SwedenLet's look at what's wrong with the following code.
While(piecearray[targetX, targetY]!=null)
pieceArray[targetX, targetY]=pieceArray[targetX, targetY +1]; // I assume the "==" in your post above was a typo.
Suppose, for the sake of argument, that targetX is 2 and targetY is 3, and that pieceArray[2,3] is not null. The line inside the loop will then become...
pieceArray[2,3] = pieceArray[2, 4];
...and this line will keep being executed as long as pieceArray[2,3] is not null, which if pieceArray[2,4] is not null will be forever (infinite loop).
I suspect that your loop should look something like this...
for(int i = 0; i < BOARDSIZEy; i++)
// Look for the first available square in the target column.
// When found, set the piece on that square then break out.
if(pieceArray[targetX, i] == null)
pieceArray[targetX, i] = pieceArray[origX, origY];
break; -
Can't delete images with adobe bridge for days , don't know how to fix this ? Can you help please ?
Thank you so much for sharing
-
Display image with display tag
Hi,
I am using display tag but I don't know how to display the image in the display tag....let me explain how I fetched data and what I want to display..
1. I kept all the images in the folder "userfiles" on the server and saved the url in the table(database).
2. I fetched all the rows from table using the select statement and saved it into bean class and then to the list as....
while(rs.next()) {
String a="../userfiles/"+rs.getString(4)+"";
System.out.println(a);
list.add(new newsFetchBean(rs.getInt(1),rs.getString(2),rs.getString(3),a));
everything is working fine and I am able to show data in the display tag on my jsp page using ...
<display-el:table id="table1" pagesize="20" cellpadding="0" cellspacing="1px" name="newsList" requestURI="" class="displayTag" sort="list" export="true">
<display-el:caption style="font: bold 1em Arial, Sans-Serif;padding: 15px 0 0 0;color:#009933;">Inquiries Received From Latest To Old</display-el:caption>
<display-el:column title="Heading" property="vnews_heading" sortable="true" headerClass="sortable"></display-el:column>
<display-el:column title="News Content" property="vnews_content" sortable="true" style="width:200px;" headerClass="sortable"></display-el:column>
Problem: I need to show images form "userfiles" folder for whom URL is being fetched from the database as...
String a="../userfiles/"+rs.getString(4)+"";
System.out.println(a);
list.add(new newsFetchBean(rs.getInt(1),rs.getString(2),rs.getString(3),a));
in the upper statements....
Please tell me how to show images....
I tried .....
<display-el:column title="Image" sortable="true" style="width:250px;" headerClass="sortable" ><img src="<c:out value="#{table1.vnews_imageURL}"/>"></display-el:column>
but no success and I searched a lot for it....may be I am wrong in my search but please help......Open the page in your browser.
View the generated HTML source.
Take a look at the <img> element.
Does its 'src' attribute point to a valid URL? Can you request that URL independently? -
How can i Display images with may own table
Hi
I want display images with my own table. How can I use in this query.
SELECT '<a href="#" onclick="javascript:'
|| 'getImageHeight(''my_img'
|| '#ROWNUM#'');javascript:redirect'
|| '(''f?p=&APP_ID.:212'
|| ':&SESSION.:DISPLAY:NO::P212_IMAGE_ID:'
|| ID
|| ''');">'
|| '<img src="#IMAGE_PREFIX#edit.gif" '
|| 'alt="Edit"></a>' ID,
'<img id="my_img'
|| '#ROWNUM#" src="#WORKSPACE_IMAGES#'
|| filename
|| '"/>' image
FROM wwv_flow_filesThanks
Nr
Edited by: user10966033 on Sep 28, 2009 1:41 PMYou don't use #workspace_images# since that is for STATIC files, not images in a table..
see this thread for help: Re: Display image from blob
Thank you,
Tony Miller
Webster, TX -
Info needed on how to get list price for a given MATNR and pricing Conditio
Hi All,
Can some one help me in finding List price for a given MATNR and pricing condition type.
Basically, i need info regarding the tables that i need to use for this purpose.
Thanks in advance.
Regards,
Udaya.
PS: All helpful answers will be rewarded.Hi Udaya,
A simple solution to all these kind of problems:
Goto Transation SE16
Table :TSTC
in Tcode :Give A* or V* or anything...and find the relevant transctions and data.
if found useful...reward points.
Regards,
Nisha -
Info needed on how to get list price for a given MATNR and pricing Conditi
Hi All,
Can some one help me in finding List price for a given MATNR and pricing condition type.
Basically, i need info regarding the tables that i need to use for this purpose.
Thanks in advance.
Regards,
Udaya.
PS: All helpful answers will be rewarded.Hi,
I moved your topic to this forum
Mario -
Mail will not display images with .jpeg extension. .jpg works fine. (displays in place when opening the email. What plug-in would correct this?
If you think you're insane now, try maintaining those pop up menus.
As far as I know, these menus have not been updated since FW 8, so
they are at least two versions old.
Save yourself a lot of grief by avoiding those menus. There are many
other products on the market which do a much better job of creating
and maintaining this type of navigation structure.
Read this link before you climb any higher on this slippery slope:
http://apptools.com/rants/jsmenu.php
There was another blog post by the fellow who originally wrote the pop
up menu feature, but I can't seem to locate it. Even he says stay away
from them.
Not the answer you probably want, but I hope it helps, nonetheless.
Jim Babbage -
Need help activating Adobe Acrobat XI PRO FOR WINDOWS?
need help activating Adobe Acrobat XI PRO FOR WINDOWS?
Hi jurleana15722686,
Are you working with a subscription version or perpetual (where you bought the software outright)? Are you running into a particular problem or receiving an error message when you try to activate?
For starters, please check out this document: https://helpx.adobe.com/x-productkb/policy-pricing/activation-deactivation-products.html.
If you're still having trouble, please let us know what the exact issue is, including any error messages that you're receiving. It would also be helpful to know what version of Windows you're using.
Best,
Sara
[disucssion moved to Downloading, Installing, Setting Up forum] -
Need help on buying FIREWIRE/USB-compatible for Logic Pro 9.0.2 on my SL
Hi...Im in needs of help in my new OS Mac World.Had my Logic Pro 9(9.0.2) install in my Snow Leopard(10.6.3).Need help on buying FIREWIRE/USB-compatible for Logic Pro 9.0.2 on my Snow Leopard.Just a real basic audio interface that works with my Macbook pro Specification.You're help will be much more appreciated..
Best Regards:RatzyMazzyIn any case I would suggest to get an audio interface which is *Core Audio* compatible. This means that you just need to plug it in and it will work with OS X’s integrated driver. I once had an M-Audio interface which needed its own driver and it had latency problems because of them. I am currently using the EDIROL FA-66 with 10.6.3 on my MacBook Pro. It still works flawlessly and has worked without problems in the past with 10.4 and 10.5, too. Here is how it looks like: http://www.rolandus.com/products/productdetails.php?ProductId=731
I have also heard good things about the FireWire interfaces from Presonus, like the FireBox.
Björn -
Need to display average percent of spend for each vendor in top ten
Hi Friends,
I have to design a query where I need to display top ten vendors and for that top ten vendors need to sum the AMT and I have to calculate the average percentage of each vendor in top ten list from the total. Based and the specified range have to create exceptions.
I am able to display top ten vendors. Now the problem is unable to calculate total of top ten vendors and average percentage of each vendor from total. like the below
spend Spend Ratio Spend Percentage
vendor 4 121987 0.299181333 30% 80% is an A
vendor 10 101103 0.247961917 55%
vendor 8 98723 0.242124806 79%
vendor 9 23456 0.05752742 85% 80-95% is a B
vendor 5 12345 0.030276944 88%
vendor 6 10540 0.02585006 90%
vendor 7 9906 0.024295132 93%
vendor 3 9903 0.024287774 95% 95-100% is a C
vendor 2 9899 0.024277964 98%
vendor 1 9874 0.02421665 100%
Total 407736
Please, suggest me to proceed further.
Thank You.
ManjulaHi manjula
In order to get total for any key figure .... for that key figure at the query level in the calculation tab there will be one box like calculate result as there u give sum or average accroding to ur purpose... then it will display the total or average accordingly....
the key figure when used average for result shows average of all record conrtibutions but
In order to display the percentage of each vendor from total u can use
Percentage Share of Result (%CT)
%CT<Operand>
Specifies how high the percentage share is in relation to the result. The result
means the result of aggregation at the next level (interim result).
%CT Incoming Orders specifies the share of incoming order values of each
individual characteristic value (for example of each customer) in relation to
the characteristic's result (for example, customer of a division).
Regards
vamsi -
Need help startng websphere server in eclipse for debugging porpose
I am using Eclipse Sdk Version: 3.1.2
IBM websphere 6.0
JDK 1.4
I set debug value to "true" in my application.xml
I have a .ear file of my application deployed on the websphere appserver. Currently I can test my application in nobebug mode.
values of environment variables are -
JAVA_HOME - C:\DEV\IBMJDK142; C:\Program Files\Java\jre1.6.0_03
PATH - C:\DEV\IBMJDK142\bin; C:\Program Files\IBM\WebSphere MQ\Java\lib;C:\DEV\IBMJDK142\bin;%SystemRoot%\system32;%SystemRoot%;
I want to test the application in debug mode.
I am using default server on websphere, which is server1.
In Admin-console of webshere I went to
server-->Application server-->choose server1-->Debugging Service ---->checked the checkbox "Enable service at server startup"
Here value of my JVM debug port is 7777.
next In Eclipse env I chose Run---->Debug....--->Remote Java Application ----> created a new application with the name of my application and set the connection properties to -
Host - localhost
port-7777
Eclipse----> Windows----->Preferences---->Server----->Installed Runtime---->Add---->selected values such as -
JRE - default JRE(JDK 1.4)
IBM Websphere Installation Directory - C:/DEV/WebSphere/AppServer
saved it.
Now in debug perspective, I created a new server with selection/values such as -
IBM--->IBM Websphere v6---->
port - 9081
server profile directory - C:/DEV/WebSphere/AppServer/profiles/default
cell - GCWSNTRANode01Cell
node - GCWSNTRANode01
server - server1
Next---->Added the project to configured project ----->FINISH
Closed Eclipse to save env settings.
Started the default server (server1)
opened eclipse - desired project--->debug perspective ---->choose server--->Right Click----Start/Debug
mesg "Starting ServerI BM Websphere 6 - IBM Websphere 6 failed to start"
can some one please tell me what I am missing here.Need help startng websphere server in eclipse for debugging porpose
can some one please tell me what I am missing here. Well for one, you're trying to debug a dolphin
Edited by: redfalconf35 on Jun 19, 2008 4:50 PM
Maybe you are looking for
-
Exchange 2013 CU7 - Frequent Outlook 2013 Disconnections and Delays
We currently have the following environment: Windows 2012 VM on Hyper-V with 24GB of RAM and 4 virtual procs (1 socket) Cisco UCS, B200 M3 Blades Exchange 2013 CU7 Exchange 2007 is in our environment, but public folders have been removed and only a f
-
I've recently purchased a Photosmart B8550 specifically to be able to print larger formats. Running it through a number of test prints, however, the colors in every image are shifted toward the red (photographers would say the pictures are much too '
-
I have items in my Aperture trash that I cannot see.
I do not have any particular metadata chosen. What I am missing
-
Hi All, I want to write a select query where I am passing unicode character and comparing with the Chinese characters in the table. So it is not giving me the correct response. I want to convert the unicode character to chinese character before compa
-
Is there an easier way to draw a shape in 3d to match X,Y, Z of photo?
I usually start a project in 2d and import photos, draw shapes and text in this 2d environment. I find it easier this way because they all start out on the same plane, and when manipulating in 3d later, this initial plane acts as a reference plane th