Progress indicator with currently loading images
I want to add a progress indicator (indeterminate) that is governed by the completed loading of an image from a URL.
Is there a way in JavaFX to tell whether or not an image has completed loading, which would be useful in controlling a progress indicator control.
An example use would be a picture album that loads a number of images and the progress indicator disappears once all images are loaded.
Cheers and happy holidays :)
You could bind the read only attribute Image.progress to the variable ProgressIndicator.progress. Note that Image.progress varies between 0-100%, but ProgressIndicator.progress takes value between 0-1. So you need to scale the value of Image.progress.
Also don't forget to set Image.backgroundLoading to true
Here is a code snippet
var image = Image {
backgroundLoading: true
url: "http://www.sagarmatha.com/images/yosemite.gif"
var progress = bind image.progress on replace {
println(progress);
var progressIndicator = ProgressIndicator{
progress: bind progress / 100.
}
Similar Messages
-
This does not happen in other browsers and it happens on a variety of computers I have access to and would seem to be a common problem but I can find no identical cases in my searches of
Firefox , Facebook or windows help or Google search. My home machine is only a P2 with WINXPCORP but works fine and I have done all updates but still have this continuing problem every time I try to use Firefox
to access Facebook chat but it does not happen with IE or chrome
The response to clicking on chat button or friend chat is a black screen with small center square box with blue title bar that says
'' VIEW IMAGE FULL SCREEN - (42) FACEBOOK X""
center of box is ""! "" mark in yellow triangle and wording
"" CANNOT LOAD IMAGES ''' OK
clicking on OK returns to facebook page but no chat opens.
Some times |VERY RARLEY if as the page loades you click on
chat button with 1/2 second of it appearing chat will open.Hi,
Please also see [https://support.mozilla.org/en-US/kb/Problems%20using%20Facebook%20in%20Firefox this.] -
Problem with Current Tab Image property of tabs
Hello. I am having trouble changing my tab entries to appear as images. When editing a standard tab I went to the section labeled "Images". Then I put values in for "Current Tab Image" and "Non Current Tab Image", and after running the page the images do not appear. The tabs still appear as text. Does anybody know what the problem is?
The paths that I tried to use for the images are:
button.gif
#WORKSPACE_IMAGES#button.gif
Any help would be greatly appreciated.
Thank you,
-JasonNever mind, I figured out the solution.
I'll explain what needed to be done for those of you that come across the same problem.
I had to edit the Page Template, and go to the section "Standard Tab Attributes". All I had to do was change the text "#TAB_LABEL#" to "#TAB_IMAGE#" -
MyButton with dynamically loading images
Hello!
I've tried to write my own button based on MovieClip. So I created a new MovieClip called MyButton. It has 3 main frames (or clue frames or... I don't know how it's called in English ): the first is for button's upState, the last two are the start and the end of press animation (I need a long animation - not just one frame). All the frames are empty.
Then I created a class MyButton.as:
package {
import flash.display.MovieClip;
import flash.display.Loader;
import flash.display.Bitmap;
import flash.net.URLRequest;
import flash.display.LoaderInfo;
public class MyButton extends MovieClip
public var upState:Bitmap;
public var downState:Bitmap;
public var currState:Bitmap;
public function MyButton(_upState:Bitmap, _downState:Bitmap)
upState = _upState;
downState = _downState;
currState = upState;
gotoAndStop(1);
addChild(currState);
public function pressed()
gotoAndStop(2);
removeChild(currState);
currState = downState;
addChild(currState);
play();
public function unpressed()
gotoAndStop(1);
removeChild(currState);
currState = upState;
addChild(currState);
and my main class is:
package my
public class Main extends MovieClip
var button_up:Loader = new Loader();
var button_down:Loader = new Loader();
var up : Boolean = false;
var down : Boolean = false;
var btn : MyButton;
public function Main()
button_up.contentLoaderInfo.addEventListener(Event.COMPLETE, compUp);
button_up.load(new URLRequest("C:\\images\\back_up.png"));
button_down.contentLoaderInfo.addEventListener(Event.COMPLETE, compDown);
button_down.load(new URLRequest("C:\\images\\back_down.png"));
function compUp(event:Event)
up = true;
if (up && down)
btn = new MyButton(Bitmap(button_up.content), Bitmap(button_down.content));
addChild(btn);
btn.addEventListener(MouseEvent.CLICK, my);
function compDown(event:Event)
down = true;
if (up && down)
btn = new MyButton(Bitmap(button_up.content), Bitmap(button_down.content));
addChild(btn);
btn.addEventListener(MouseEvent.CLICK, my);
function my(event:MouseEvent)
btn.pressed();
And the last main frame of MyButton timeline has: unpressed();
It all works as I want, but I know, that it's a bad solution... especially calling unpressed() from the frame... So maybe someone could give me some advice about writing my own button class?
PS and I'm sorry for my Endlish =)OK, I got it, thanks )
But for now I'm afraid I have no time to learn it... but I really got it, I think )
That's what I get for now:
package {
import flash.display.MovieClip;
import flash.display.Loader;
import flash.display.Bitmap;
import flash.net.URLRequest;
import flash.display.LoaderInfo;
import flash.events.MouseEvent;
import flash.events.Event;
public class MyButton extends MovieClip
public var upStatePath:String;
public var downStatePath:String;
public var l:Loader = new Loader();
var b:Boolean;
public function MyButton(_upState:String, _downState:String)
upStatePath = _upState;
downStatePath = _downState;
unpressed();
addEventListener(MouseEvent.CLICK, pressed);
addFrameScript(totalFrames-1, unpressed)
public function pressed(event:MouseEvent = null)
b = true;
l.contentLoaderInfo.addEventListener(Event.COMPLETE, showPic);
l.load(new URLRequest(downStatePath));
public function unpressed()
b = false;
l.contentLoaderInfo.addEventListener(Event.COMPLETE, showPic);
l.load(new URLRequest(upStatePath));
gotoAndStop(1);
function showPic(event:Event)
try {
removeChildAt(0);
catch(e:Error) {}
addChild(Bitmap(l.content));
if (b) play();
It works as I want, no code in the frames, quite independent I guess ))
That's enough for me for now )
Thanks for help! -
Pre Loaded Images!!!
I am new to the BlackBerry world and I just had my Pearl a couple of days now and I updated it and now my Preloaded images that came with my phone are gone is there anything that can be done to get them back???
I really like my Pearl alot I think it is the best phone I have ever owned!! Any help would be appreciated.
Thank you so much,
Lisa
LisaUnfortunately the OS version that you've update doesn't come with pre-loaded images. If I'm not wrong then you're using .55. You can get tons of images by just having a google search.
tanzim
If your query is resolved then please click on “Accept as Solution”
Click on the LIKE on the bottom right if the post deserves credit -
Spry Tabbed panels + Progressive Enhancement and Dynamic Loading of Content With Spry
Is there any way to combine tabbed panels together with "Progressive Enhancement and Dynamic Loading of Content With Spry"?
Visit: http://labs.adobe.com/technologies/spry/articles/best_practices/progressive_enhancement.ht ml#updatecontent
And click on the "Using Spry.Utils.updateContent()"
The 3rd example shows how to use a fade transition whenever the content changes.
I already have tabbed panels. My menu contains buttons (on tabs) and my Content div contains the panels.
Tabs code;
<ul class="TabbedPanelsTabGroup">
<li class="TabbedPanelsTab">
<table class="Button" >
<tr>
<td style="padding-right:0px" title ="Home">
<a href="javascript:TabbedPanels1.showPanel(1);" title="Home" style="background-image:url(/Buttons/Home.png);width:172px;height:75px;display:block;"><br/></a>
</td>
</tr>
</table>
</li>
etc
etc
etc
and the panel code:
<div class="TabbedPanelsContent" id="Home">
CONTENT
</div>
I hoped i can use the example code from the link into my tabbed panels.
I thought this code:
onclick="FadeAndUpdateContent('event', 'data/AquoThonFrag.html'); return false;"
could be added to the tab code like this:
<a href="javascript:TabbedPanels1.showPanel(1);" onclick="FadeAndUpdateContent('event', 'data/AquoThonFrag.html'); return false;" title="Home" style="background-image:url(/Buttons/Home.png);width:172px;height:75px;display:block;"><br/></a>
But the content doesnt fade...
I know i need to change the header etc.
The following is from the link:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Aquo Events</title>
<script src="../../../includes/SpryEffects.js" type="text/javascript"></script>
<script src="../../../includes/SpryData.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
function FadeAndUpdateContent(ele, url)
try {
Spry.Effect.DoFade(ele,{ duration: 500, from: 100, to: 0, finish: function() {
Spry.Utils.updateContent(ele, url, function() {
Spry.Effect.DoFade(ele,{ duration: 500, from: 0, to: 100 });
}catch(e){ alert(e); }
-->
</script>
<style type="text/css">
/* IE HACK to prevent bad rendering when fading. */
#event { background-color: white; }
</style>
</head>
So i changed my header etc, put the SpryEffects.js and SpryData.js into position and nothing changed...
Is there a way to keep my tabbed panel (or change as less as possible) and let
A. The fade work
B. The loading work.
The problem now is that it loads all pages instead of only the home. Therefore i wanted this Progressive Enhancement.
And the fading part is just because its nice...It doesnt show in the post but off course i changed this link;
"data/AquoThonFrag.html"
into;
"javascript:TabbedPanels1.showPanel(1);"
I must say i dont know if this even works... -
Flashing folder with "?" instead of startup progress indicator
My computer froze and starting making a clicking noise yesterday. The clicking noise is mechanical, not from the speakers (I'm thinking from the drive heads?). After waiting for about a minute, I held down the power button to turn the computer off. When I turned it back on the clicking noise was still there and instead of the startup progress indicator circle there was a large gray folder with a question mark on it. The computer remains on this screen without loading any further.
Possibly relevant information:
- The computer had not been moved or dropped preceeding this occurrence. It was just sitting there as it had been for the last hour or so.
- Earlier in the day I was attempting to stream a video over the internet but accidently clicked the download icon (it was right next to the streaming one). I tried to stop the download as soon as I noticed (maybe 10 seconds) and do not think I ran anything from it.
Any thoughts would be much appreciated!Thanks for the welcome and thanks especially for the help!
I tried to boot while holding down the Option key. The background color changed from grey to blue and the pointer appeared, but the Startup Manager never came up.
I tried to run the Apple Hardware Test from my install disk by following the directions you provided. The computer began reinstalling OS, but I was never prompted to run the Hardware Test. At the point when I was asked where to locate the OS the computer did not find any locations in which to put it, i.e. I don't think it recognized the harddrive.
When the above didn't work I tried to run the Apple Hardware Test from the support disk that came with my AppleCare Plan (as per instructions). Nothing happened. The Test never came up.
I bought my Mac new in March of 2007. I do have AppleCare. Should I bring it in to an AppleStore to be looked at? Or is there something else I should do?
Again, thanks so much! -
Problem with loading image to Applet.
Hello. Im preety new to Java, and currently ive got problems with adding an image to my applet. I tried to make game, similar to Mario - a platform based one. I found a source code of something close to that, and wanted to test but i couldnt get images loading. Here's the code :
Main class :
package pl.wat.edu;
import java.applet.*;
import java.awt.*;
public class Main extends Applet implements Runnable{
Thread th;
private final int speed = 15;
private Level obecny_poziom;
private Image dbImage;
private Graphics dbg;
MediaTracker mt = new MediaTracker(this);
private Image ziemia1;
@Override
public void destroy() {
// TODO Auto-generated method stub
super.destroy();
@Override
public void init() {
// TODO Auto-generated method stub
super.init();
setSize(stale.wielkosc_apletu_szerokosc, stale.wielkosc_apletu_wysokosc);
//setBackground(Color.blue);
//ziemia1 = getImage(getCodeBase(), "g1.GIF");
obecny_poziom = new Pierwszy(this, this);
@Override
public void start() {
// TODO Auto-generated method stub
super.start();
// create new thread
th = new Thread (this);
// start thread
th.start ();
@Override
public void stop() {
// TODO Auto-generated method stub
super.stop();
// Thread stop
th.stop();
th = null;
public void run() {
// TODO Auto-generated method stub
while (true){
repaint();
try
Thread.sleep(speed);
catch (InterruptedException ex)
// do nothing
@Override
public void paint(Graphics arg0) {
// TODO Auto-generated method stub
super.paint(arg0);
//arg0.drawImage(ziemia1,10,10,this);
obecny_poziom.paintLevel(arg0);
public void update (Graphics g)
if (dbImage == null)
dbImage = createImage (this.getSize().width, this.getSize().height);
dbg = dbImage.getGraphics ();
dbg.setColor (getBackground ());
dbg.fillRect (0, 0, this.getSize().width, this.getSize().height);
dbg.setColor (getForeground());
paint(dbg);
g.drawImage (dbImage, 0, 0, this);
}and Level class that have draw levels from String rows :
package pl.wat.edu;
import java.applet.Applet;
import java.awt.*;
public abstract class Level {
//private LevelElement [] elements;
private WorldTile [] tiles;
private WorldTile[][] tablica_kolizji;
private Color [] colors;
private Component parent;
private int lewa_granica;
private int prawa_granica;
private int dlugosclevelu;
private Image ziemia = null;
private Image titi;
private Applet applet;
public abstract void resetLevel();
public Level(Component parent, Applet applet) {
super();
this.parent = parent;
this.applet = applet;
ziemia = applet.getImage(applet.getCodeBase(), "g1.GIF");
public void initializeLevel(String [] definitions){
tablica_kolizji = new WorldTile [stale.dlugosclevela] [definitions[0].length()];
lewa_granica = 0;
prawa_granica = stale.wielkosc_apletu_szerokosc;
int licznik_kratek = 0;
for(int i=0; i<definitions.length; i++){
char [] definition_line = definitions.toCharArray();
for(int j=0; j<definition_line.length; j++){
if (definition_line[j] == ':')
tablica_kolizji[i][j] = null;
else if (definition_line[j]== 'g'){
Ziemia tile = new Ziemia(j*stale.szerokoscTile, i*stale.wysokoscTile, stale.ziemia_id, ziemia, parent);
tablica_kolizji[i][j] = tile;
licznik_kratek = 0;
tiles = new WorldTile [licznik_kratek];
int licznik = 0;
for (int i = 0; i<tablica_kolizji.length; i++){
for(int j=0; j>tablica_kolizji[i].length; j++){
if (tablica_kolizji[i][j] != null){
tiles[licznik] = tablica_kolizji[i][j];
licznik++;
public void paintLevel(Graphics g)
try
// draw background
// draw all elements in elements array
for(int i=0; i<tiles.length; i++)
tiles[i].rysujTile(g);
catch(Exception ex)
// do nothing
Any ideas why this Image doesnt show up ?michali7x4s1 wrote:
Thats a code i found somewhere, tried to check how some things work.Have you used exceptions before? If not, please read the sun tutorial on them as they are very very important. Also, whether this is your code or someone else's doesn't matter as it's yours now, and you would be best served by never throwing out exceptions as is done in this code. It's like driving with a blindfold on and then wondering why you struck the tree. It's always best to go through the tutorials to understand code before using it. If it were my project, I'd do it in Swing, not AWT. Fortunately Sun has a great tutorial on how to code in Swing, and I suggest you head there as well. Best of luck. -
Loading images with properties in Forms6
Hello !
I would like to use Mmix32.ocx with Forms6 to have properties and
methods of loaded images !
But I don't know how , cause I imported Ole library interfaces MMix control without results !
I need an exemple !
thanks !Me too !
I would like to use Mmix32.ocx with Forms6 to have properties of images !
I imported Ole library interfaces MMix control !
I have an error:
FRM-41344:ole object not defined for <item name> in current record ! -
Loading images flash with white outline.
My website is loading images flashing brieflt with a white box outline, can I remove this ? Or import images to eradicate this?
Thanksmacbook7:
Try download and run BatChmod on the iPhoto Library folder with the settings shown here, substituting your account name for mine. You can either type in the path to the folder or just drag the folder into that field. See if that will let iPhoto find those files correctly.
If not I suggest you use iPhoto Library Manager to rebuild the library. It creates a new library and leave the current one untouched. Here's how:
Using iPhoto Library Manager to Rebuild Your iPhoto Library
Download iPhoto Library Manager and launch.
Click on the Add Library button, navigate to your User/Pictures folder and select your iPhoto Library folder.
Now that the library is listed in the left hand pane of iPLM, click on your library and go to the File->Rebuild Library menu option
In the next window name the new library and select the location you want it to be placed.
Click on the Create button.
Note: It can take some time to create the new library if you have a lot of photos. One user reported that with a library of about 5,000 images it took about 12 hours so plan ahead. (That's the only instance of the length of time it took to do the rebuild so I can't confirm or deny it. If you do rebuild successfully please post back with the time and no. of photos) -
I am trying to load and display multiples images with a Loader, one after another. The program only displays the last image to be loaded and added to the stage. What is wrong? Here is my code..
---START OF CODE---------------------------------------
import flash.events.MouseEvent; //Package needed for mouse events
btnGenerate.addEventListener(MouseEvent.MOUSE_DOWN, buttonPressed); //Button click listener
chkSeal.addEventListener(MouseEvent.MOUSE_DOWN, chkTriggered); //Check box click listener
//If the check box is toggled, switch to 8 or 9 max characters
function chkTriggered(event:MouseEvent):void
if (chkSeal.selected == false)
txtInput.maxChars = 8;
else
txtInput.maxChars = 9;
function buttonPressed(event:MouseEvent):void
var pictureLoader:Loader = new Loader(); //Picture loading variable
var plateText:String = txtInput.text; //Plate text string
var filename:String; //Filename for each character's associated picture
var currentX:int = 10; //Current x position
var i:int; //Counter to use in for loop
plateText = plateText.toUpperCase(); //Convert plate text to upper case
//For every character in the sequence
for(i = 0 ; i < txtInput.length ; i++)
filename = "/Numbers and Letters/" + plateText.charAt(i) + ".png"; //Generate filename
pictureLoader.load(new URLRequest(filename)); //Load the picture
addChild(pictureLoader); //Add picture to the stage
pictureLoader.x = currentX; //Move picture into position
pictureLoader.y = 366; //Constant y position for all images
currentX = currentX + 52; //Increase the current x (by the size of the images)
txtInput.text = "Done!"; //Display done in the text box
-------------END OF CODE----------------------------You appear to only have one Loader instance working for you. A Loader can only hold one load at a time. Try creating new Loaders within the loop.
-
When loading a page with many hires images, Firefox becomes really slow and scrolling becomes jumpy then eventually becomes completely unresponsive. Unusual high memory usage of up to 2gigs just for firefox when loading these pages. This was never a problem with v3.6.
I encountered the same type of problem. Firefox running terribly slowly and slowing down my entire machine (Core i5 with 256GB SSD). Searching the forums, I found a couple of things about troubleshooting performance issues, one of which was to use '''hardware acceleration''', that is on by default. It was turned on on my PC, '''so I tried deactivating it, and it worked!'''
So doing the exact opposite as Mozilla support said solved the problem. It is really a pain now to work with Firefox. I'm using it because I have no choice, but I'd recommend IE and Chrome over Firefox... Whatever, the market will decide once Firefox has become to crappy... -
Can't get past gray screen with progress indicator... Help
I can't turn on my Macbook. It starts but won't go past the gray screen with the progress indicator (spinning circle).
I have tried:
1. turning off, removing battery, holding start for 5+ seconds, replacing battery and then turning on.
2. Holding command + option + R + P while staring up, waited for 3+ chimes.
3. holding Shift down while starting up
none of these things are working.
I've been on hold with apple service/support for almost an hour now.
I have an assignment on the computer that is due by midnight.
HELP!
I'm not very computer savvy and this is my first mac.
Any ideas folks??
Thanks.
Macbook Mac OS X (10.4.7)You've done all the standard procedures. If you have any peripherals attached, disconnect them.
This describes resetting the PMU:
http://docs.info.apple.com/article.html?artnum=303319
Did you have the AC disconnected when you did it? I don't have any other ideas.
These are the startup key options:
http://docs.info.apple.com/article.html?artnum=303124
Edit: If you have the install disc stuck in it anyway, can you get the hardware test to work? (Reboot while pressing the D key.) -
some pictures(jpeg or gif) come as part of email if i use IE9 these images open as part of the mail, but with firefox i have to download them separately and then they don't appear in email. i have been in the options menu and allowed yahoo.com to automatically load images but this has had no effect, thanks
Sounds like you did this on the fly.
MM is supposed to open the Marker Panel Dialogue
M just sets a marker
Not sure if either are intended for on the fly during playback .
There is also a Marker Icon on the Source Window Pane >> -
I switch the load images automatically selection back and forth in order to save on my 5GB monthly data plan. Is there a utility that would allow me to create a macro of multiple keystrokes to do this with one action? Something like the macro function in Excel? Or is there another way to do this more easily than going to tools, options and clicking on the box? I don't see a shortcut for this item in the standard keyboard shortcuts list
Hi,
You could try [https://addons.mozilla.org/en-US/firefox/addon/image-block/?src=search Image Block]. Please also go through the reviews, help and ratings. You can also try to search for similar add-ons via Firefox '''Tools''' ('''Alt''' + '''T''') > '''Add-ons''', Search box on the top right corner, or via the official [https://addons.mozilla.org/ AMO].
Maybe you are looking for
-
Anybody who can help me? I really need your help
I've tried to execute J2ee tutorial examples. I don't know why this sample didn't execute...I've already finished to set up J2EE and enviornment variables. I was trying this part from j2ee tutorial titled as "Packing Web modules". Whenever I type "as
-
Preview issue (native and embedded via Safari) wth cut-paste and nested curly braces
Environment: OS X 10.6.8 Preview 5.0.3 (504.1) Updates: current as of 0800 CDT 24 Jul 2011 -- updates issued on 24 Jul 2011 are being applied but the changelog(s) do not mention this issue Any PDF document containing code fr
-
How do I start to make a file into a PDF file?
-
Fastest/simple way to burn DVD- no menu?
To burn DVD's at work - I normally use an external DVD recorder at work- Play down clip, hit record, done. At home I only have the Quad and FCP studio. I have a simple 3 minute clip in FCP. I exported a QT to the desktop. I want to burn a DVD. No men
-
Final Cut Problem - Duplicate frames when using add composite
I have a problem with Final cut hopefully someone will be able to help. Clip A & Clip B on one layer and Clip C on another, being used as a transition between the two. Composite mode 'Add' being used on Clip C When Clip C overlaps both clips in the t