Dynamically loaded images cached?
We have an xml feed that is refreshed every hour. According
to the xml file, we dynamically load an image into an html text
field each time someone hits our page. All of the images have been
recently updated, but the old ones are still appearing? We use the
swf?nocache=randomnumber convention to make sure the swf file
itself isn't cached, but is there anything we can do to clear out
the cache of dynamically loaded images? If there isn't anything we
can do, will these all eventually refresh themselves? This is how
the html is generated where "twcImage[0]" is the image in question.
Thanks!
Do the same random number for the images.
twcImage[0] + randomnumber
Dan Smith > adobe community expert
Flash Helps >
http://www.smithmediafusion.com/blog/?cat=11
http://www.dsmith.tv
"Wolli World" <[email protected]> wrote in
message
news:fvvcrc$k9o$[email protected]..
> We have an xml feed that is refreshed every hour.
According to the xml
> file,
> we dynamically load an image into an html text field
each time someone
> hits our
> page. All of the images have been recently updated, but
the old ones are
> still
> appearing? We use the swf?nocache=randomnumber
convention to make sure
> the swf
> file itself isn't cached, but is there anything we can
do to clear out the
> cache of dynamically loaded images? If there isn't
anything we can do,
> will
> these all eventually refresh themselves? This is how the
html is
> generated
> where "twcImage[0]" is the image in question. Thanks!
>
> twcTarget.text = "<img align='left' hspace='5'
vspace='0' src='
http://" +
> _root.server + "/rss/weather/images/" +
> twcImage[0] + "'>" + "<condition>" + ... and so
on
>
Similar Messages
-
Dynamically loading images: UI Loader issue
I posted this last week, but did not show good examples to get help. Admittedly, I am new to flash, so this may be a bit elementary, so my apologies in advance. I am trying to dynamically load images through the UI Loader component. Attached are the errors I get, and although I think that the coding is close to correct, when I publish, it just flashes up then restarts the movie... any ideas? Thanks in advance.
there's a problem attaching things to this forum. so, nothing is attached.
can you copy and paste your error messages to this forum? -
How to dynamically load images into Flash
I have a movie clip on the stage that I want to dynamically
load images into (that constantly change), how would I go about
doing this? Thanks.Use the Loader class to load in images.
Then use addChild to add the Loader class into your MovieClip
on the stage.
As far as &quot;constantly change&quot; what
do you mean by that? You could use setInterval, ther enterFrame
event, or any other means to trigger a new image to be loaded into
the Loader instance.
Finally, you can use the Tween class to create some nice
effects for the images (fade it, blur in, photo blend, masks,
etc) -
Get width and height of a dynamically loaded image once it's done loading?!
hello : :
well... i'm taking my first shots at flex after programming
in flash for a year now. it's been fun and i've been picking up on
things pretty well (or so i think), but i come across something
today that i used to be able to do in my as2 programming and don't
know how to do in as3...
in flex, i'm loading an image into an image control (by using
"myImgControl.load(urlString)"). i have a "complete" parameter on
the image control that calls a function just fine after the image
is loaded, but if i try and check the hight and width of the loaded
image once it loads, it comes back as zero. how can i get the
height and width of the image after it's loaded?!
in flash/as2 i used to do this little trick/work-around i
found in a forum (kirupa.com, i think) to find out the width and
height once the loaded image listener checked the loading process
and came back "complete"... in the code below, "imgLoader" is the
movieClip the image was loaded using
imgLoaderListener.loadClip(urlString, imgLoader).
quote:
iTot = imgLoader.getBytesTotal();
iLoad = imgLoader.getBytesLoaded();
if (iLoad == iTot && iTot > 4) {
imgH = imgLoader._height;
imgW = imgLoader._width;
that all make sense?!
basically, it's as simple as this: i need to find something
similar to the above for as3 that will tell me the width and height
of a dynamically loaded image after it's done loading...
so there ya have it. i appreciate any help any of you can
throw my way! thank you so much for even reading this!
: : michaelI assume you have probably already figured this out, but just
in case, there should be an event to listen for after which you can
get the height and width information successfully. I can't remember
the exact name, however. Experiment and see which one works
time-wise. -
Alpha transparency borders on dynamically loaded images for use with textures
Hi there folks. Well, I have been beating my head over this
and am hoping one of you can help me out.
Essentially I have 16bit images that are loaded into my
shockwave application at run-time. These images are user defined
which means that I will not know their size ahead of time. Once the
images are loaded I then create textures and apply them to various
shaders. Ok, all of this works just fine. What I need to do though
is create an alpha transparent border around the images, so when I
apply them to their surfaces I only see the image and nothing
around it. I am doing this because these images will only appear at
specific parts on a surface, textureRepeat will be false, and many
models will be stacked in the same exact location using the same
model resource. I have everything working, but I cannot figure out
the alpha part for the life of me. Also, when I test the alpha
based image by itself it works just fine. It is not until I try and
combine the 16bit (converted to 32bit at run-time) image that I run
into problems.
I have tried:
- Creating a 32bit alpha image in Fireworks with a
transparent border and a black rect for the inside. I then copy the
dynamic image over the alpha image (only after going from 16bit to
32bit in imaging Lingo) and leave a little room at the edges for
the transparency. Well, I get a crazy amount of streaks here even
when I try to up the trans border by around 24 pixels on each side.
- Using another similiar alpha based image as a mask with
copyPixels and extractAlpha/setAlpha like this... (code is a little
rough here)
newImage = new(#bitmap)
newImage.name = "place_Test"
newImage.image = member("place").image
newAlpha = new(#bitmap)
newAlpha.name = "AHH"
newAlpha.image = image(newImage.image.width + 24,
newImage.image.height + 24, 32)
newAlpha.image.useAlpha = true
newAlpha.image.copyPixels(member("vase").image,
newAlpha.image.rect, member("vase").image.rect)
newAlphaInfo = newAlpha.image.extractAlpha()
newAlpha.image.useAlpha = false
--reverse dark to light
iAlphaReverse = image(newAlpha.image.width,
newAlpha.image.height, 8, #grayscale)
iAlphaReverse.fill(iAlphaReverse.rect, rgb(0,0,0))
iAlphaReverse.copyPixels(newAlphaInfo, iAlphaReverse.rect,
newAlphaInfo.rect, [#ink : #reverse])
--newAlphaInfo.copyPixels(iAlphaReverse, newAlphaInfo.rect,
iAlphaReverse.rect, [#ink:#subtractpin])
newAlphaMask = iAlphaReverse.createMask()
rescaleAbs(newImage, newImage.image.width,
newImage.image.height, "place_Test", 32)
destImage = member("place_Test").image.duplicate()
destImage.fill(destImage.rect, rgb(0,0,0))
newAlpha.image.useAlpha = false
destImage.copyPixels(newImage.image, newImage.image.rect,
newImage.image.rect, [#maskImage:newAlphaMask, #ink:#add])
destImage.setAlpha(iAlphaReverse)
destImage.useAlpha = true
member("place_Test").image = destImage
I apologize for the messy code. I have cut and pasted from
all over the place and am getting confused. In any case, I think I
am making this harder then it needs to be and hope someone can
help.
Thank you in advance,
DaveHi, you can try using other texture layer as mask on the same
shader. As usually you create the texture from a dynamic loaded
image, then apply this texture to the shader on the texture list
index 1 (textureList[1]). Next part does the job, create other
texture from a 32 bits image with the alpha information and fill
all pixels with white color, this is very important because the
second texture layer will be multiply with the first texture layer.
This texture set its render format to rgba8888. Apply the mask
texture to the same shader at texture list index 2, verify that the
blendFunctionList index 2 is #multiply.
I include the code of a project that use this masking
approach:
property pMember
property pEarthSphere
property pNightSphere
property pLastTransform
on beginSprite me
pMember = sprite(me.spriteNum).member
me.setupWorld()
end
on setupWorld(me)
pMember.resetWorld()
repeat with i = pMember.light.count down to 1
pMember.deletelight(i)
end repeat
vEarthModelResource = pMember.newModelResource("EARTH MODEL
RESOURCE", #sphere)
vEarthModelResource.radius = 50.000
vEarthModelResource.resolution = 20
vEarthTexture = pMember.newTexture("EARTH TEXTURE",
#fromCastMember, member(3,1))
vEarthShader = pMember.newShader("EARTH SHADER", #standard)
vEarthShader.emissive = color(255,255,255)
vEarthShader.flat = TRUE
vEarthShader.transparent = FALSE
vEarthShader.textureList[1] = vEarthTexture
pEarthSphere = pMember.newModel("EARTH MODEL",
vEarthModelResource)
pEarthSphere.shaderList = vEarthShader
vNightModelResource = pMember.newModelResource("NIGHT MODEL
RESOURCE", #sphere)
vNightModelResource.radius = 50.2000
vNightModelResource.resolution = 20
vNightTexture = pMember.newTexture("NIGHT TEXTURE",
#fromCastMember, member(4,1))
vNightTexture.quality = #lowFiltered
vNightTexture.nearFiltering = FALSE
vNightTexture.renderFormat = #rgba8880
vNightShader = pMember.newShader("NIGHT SHADER", #standard)
vNightShader.emissive = color(255,255,255)
vNightShader.flat = TRUE
vNightShader.transparent = TRUE
vNightShader.textureList[1] = vNightTexture
vMaskNightTexture = pMember.newTexture("MASK NIGHT TEXTURE",
#fromCastMember, member(6,1))
vMaskNightTexture.renderFormat = #rgba8888
vNightShader.textureList[2] = vMaskNightTexture
vNightShader.textureModeList[2] = #wrapPlanar
pNightSphere = pMember.newModel("NIGHT MODEL",
vNightModelResource)
pNightSphere.shaderList[1] = vNightShader
pNightSphere.parent = pEarthSphere
end
on exitFrame(me)
pEarthSphere.rotate(0.0,0.1,0.0)
me.moveMaskNightTexture()
end
on moveMaskNightTexture(me)
vRotationVector = - pEarthSphere.transform.rotation
pNightSphere.shaderList[1].wrapTransformList[2].rotation =
vRotationVector
end -
How do you size dynamically loaded images?
Hi,
I am loading images from mysql into flash using php, I need
to make thumbnails out of these images, so they need to be resized
as they are loaded in and then displayed to one set size. Does
anyone have any ideas?
thanks
GavinJan-Paul K>
i thought it was _xscale & _yscale?
thahip>
if what you need is "one set size", then use _width &
_height. -
Sizing Dynamically loaded images
I've loaded images into a project at runtime they show, but
when I try to resize them they are set as a percentage of the
original size and not the pixel size. I've tried using setProperty
and object._width= and object._height=. Every place I've read
anything about the _width and _height properties says it should set
those values in pixels, but for some reason it's percentage for me.
I'm loading .jpg images
have flash 8 pro
How can I set the picture width and height in pixels?you need to ensure that the picture is loaded(preferably
using MovieClipLoader.onLoadInit) before resizing. -
Dynamically loading images?One at a time :(
codeworld....help...sos.....send in more troops....the titanic is sinking.....
The problem:
I am trying to load dynamic images in order without all of them attempting to load at once....
I have an array of images that I loop through depending on the gallery that will load up....but when i loop through the images all of them try to load.
What i need to happen is somewhere in the loop i guess....each image fully load....then goto the next image and fully load.....etc.....
Basically each image load one at a time in order......and the list is dynamic so uhhhhh HELP ......????
save narnia....save tinseltown.....awww hell sacrifice yo self and just save me .....ok ok......one of these i'm going to make work
....thanx for all the help....
this is kinda the basics of how i got the method looking that i will change
for(var i=0; i<listArray.length; i++)
//picListLoader is a custom class......its just the loaded picture and some variables attached to it.....
var picture:picListLoader = new picListLoader(pID, ptitle, pdesc, picURL, i );
picArray.push(picture);
addChild(picture);
i think instead of calling the class to create the individual objects......
i'm going to create a gallery object......and send in the info....and once all of the picture's urls and info is loaded into the object tell the gallery object to load each one of the pictures using one of the methods above......and that should cure my ills
smallville was saved once again................byMe... ...selfGlory..... .......(ok....saved by yall) thx a million
thelegendaryghost -
How To Dynamically Load Images in Crystal Reports?
Post Author: philips
CA Forum: General
What I want is to have image files saved on a local drive and the images to be loaded into a picute/image frame based on a certain condition - same way it's (easily) done with VB.Net or ASP.Net image objects.
Can you help?Not in Crystal Reports Basic for Visual Studio 2008. You'll have to upgrade to CR 2008 (12.x). Then use kbase [1320507|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes.do] as a guide on how to do this.
Ludek -
PrintJob() not displaying dynamically loaded images
Hi all,
I have an image-loading function given to me by a coworker
that I'm using to load and smooth external images. It works great.
However, when I go to print the slideshow I've created, I cannot
figure out how to get these images to display. I'll post some code
below, and I'm really hoping that there is a way to get this to
work. It's been driving me nuts for about two hours!
Thanks in advance!Hi,
Thanks for the reply.I didn't really understand your reply.I am using commons.fileupload for uploading the image.Attaching teh code fragment for that.Could you please go through itFileItemFactory factory = new DiskFileItemFactory();
ServletFileUpload upload = new ServletFileUpload(factory);
List items = null;
try {
items = upload.parseRequest(req);
// Create a factory for disk-based file items
System.err.println("items: " +items);+
+} catch (FileUploadException e) {+
+e.printStackTrace();+
+}+
+Iterator itr = items.iterator();+
+while (itr.hasNext())+
+{+
+FileItem item = (FileItem) itr.next();+
+if (item.isFormField())+
+{+
+if(item.getFieldName().equals("First Name"))+
+fName = item.getString();+
+}+
+else+
+{+
+try+
+{+
+String itemName = item.getName();+
+Random generator = new Random();+
+int r = Math.abs(generator.nextInt());+
+String reg = "[.*]";+
+String replacingtext = "";+
+System.err.println("Text before replacing is:-"+ itemName);
Pattern pattern = Pattern.compile(reg);
Matcher matcher = pattern.matcher(itemName);
StringBuffer buffer = new StringBuffer();
while (matcher.find())
matcher.appendReplacement(buffer, replacingtext);
int IndexOf = itemName.indexOf(".");
String domainName = itemName.substring(IndexOf);
System.err.println("domainName: " +domainName);+
+String finalimage = buffer.toString()+ "_" +r+ domainName;
System.err.println("Final Image===" +finalimage);+
+//Writing file to disk+
+File savedFile = new File("C:/Zach_Academic/Code/web/Images/Actors/"+ finalimage);
item.write(savedFile);Hope this time my keyboard didn't made any issue.
Thanks,
Zach. -
What is the BEST way to do a dynamically loading image slideshow?
Hey guys!
I know a little Flash, a little Dreamweaver, a little PHP,
pretty much a little of everything. I'm an artist and would like to
publish a slideshow, which I would update often, smack on the front
of my personal website. What is the easiest, most painless, least
complicated, and most easy to update way to do it? And why? I've
found a lot of tutorials and posts on this, but which do you think,
as a matter of opinion, would be the best?
If anyone could link to tutorials especially, that would be
FANTASTIC.
Thank you!
AleccOn Wed, 9 Aug 2006 08:30:15 +0000 (UTC), "letsjumpnow"
<[email protected]> wrote:
> I know a little Flash, a little Dreamweaver, a little
PHP, pretty much a
>little of everything. I'm an artist and would like to
publish a slideshow,
>which I would update often, smack on the front of my
personal website. What is
>the easiest, most painless, least complicated, and most
easy to update way to
>do it? And why? I've found a lot of tutorials and posts
on this, but which do
>you think, as a matter of opinion, would be the best?
See
http://www.slideshowpro.net/product_ssp.php
It will be the best $20 you ever spent. It displays images
based on an
XML file, which you can generate dynamically with PHP. All
you'd need to
do then would be to upload a new image and it could
automatically be
added to the show.
Gary -
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! -
Dynamic load of images in to established Timeline effect
Is it possible to dynamicly load images in to an already
established timeline effect?
Steps I've done.
Stuffed a JPG in to the library by draging and dropping it in
to the SWFs library.
Dropped the JPG on to the main stage
Right clicked the image then going down to Timeline effects
and choosing an effect.
Completing any changes in effects dialogue box and then
clicking OK.
Play the movie, and pat myself on the back that it worked.
So then, how can I get Actionscript to load an image
dynamically in to that same Timeline effect and have it do the
effect to that instead of the one found in the library?
I'm using Flash MX Professional 2004.hii
Can u mention the error message getting while the status become RED??
As what I understand, this may be the issue of invalid characteristics inPSA Data Records or also there may be records that does not support the lower case or upper case data.
So just check the data in PSA Level
Thanks
Neha -
Swapping xml loaded Images to scene elements?
Hi there!
I have a small quick question about xml loaded images.
Can you append/attach/swap the images to elements in your scene?
I would like to manually animate a movieclip using keyframes and motion tweens. For example, to have a movieclip FLY! accross the screen! lol But I want the image on it to be of one that has been dynamically loaded.
I can't seem to work out how to replace an image on a movieclip from a dynamically loaded image.
Is it even possible?
Thanks heaps for your time you guys!If the original image is the only object within the movieclip, you can use removeChildAt(0) to get rid of it, and use addChild(your_new_image) to replace it.
-
Hi, I know that I can dynamic load images, like:
<mx:Image source="myImage.png"/>
How can I do this with LinkButton ?
Note that the image path come from a webservice, so I
can´t use Embed Class trick(Can I ?)
Thanks.Adobe Newsbot hopes that the following resources helps you.
NewsBot is experimental and any feedback (reply to this post) on
its utility will be appreciated:
Flex 3 - Developing applications:
The following image shows an example Flex application that
contains a List control on the left .... WebService provides access
to SOAP-based web services.
Link:
http://livedocs.adobe.com/flex/3/html/mxml_3.html
[#SDK-13968] Web service array marshalled correctly in Flex 2
not:
Switch to Flex 3 Beta 2 using same source as in #1, rebuild
and run .... <data
xsi:type="xsd:string"><image-row
align='left'/></data>
Link:
http://bugs.adobe.com/jira/browse/SDK-13968
W (Flex 3):
The WebService class provides access to SOAP-based web
services on remote servers. ..... Wraps the displacement value to
the other side of the source image.
Link:
http://livedocs.adobe.com/flex/3/langref/all-index-W.html
Mitiâs Blog » Blog Archive
» Using Import Web Service wizard to:
Jul 28, 2008 ... NET Web Service project using VWD:. image
... Choose Data -> Import Web Service (WSDL) from the Flex
Builder menu.
Link:
http://miti.pricope.com/2008/07/28/using-import-web-service-wizard-to-connect-flex-to-net/
Flex 3 - Creating inline item renderers and editors:
Adobe Flex 3 Help .... Album}"/> <mx:Image
id="albumImage" height="45"
source="{data. .... For example, you can use a web
service, or other mechanism,
Link:
http://livedocs.adobe.com/flex/3/html/cellrenderer_6.html
Disclaimer: This response is generated automatically by the
Adobe NewsBot based on Adobe
Community
Engine.
Maybe you are looking for
-
I m using ms access as database and i want to create a login page in java
hye frnz... plz help me m new to java m using ms access as database and try to create a login page where user type username and pw i had enter valid user entries in database i checked connectivity is working i want as user login the main window must
-
Using VMWare Fusion and Vista for NetFlix Watch Now
Hi, I have installed Fusion and Vista in order to use NetFlix's Watch Now feature on my MBA. The installation was easy and Vista seems to be working fine. However, I can't get the Watch Now movie going. The film will start (after NetFlix determines m
-
How to apply 3 way color correction to multiple clips in Final Cut Pro?
I have multiple clips from the same time and space footage that need color correction. I have worked on one of the clips and found the settings I like. Is there a way to apply that correction to other clips without starting from scratch on each one?
-
Airport wifi won't connect devices
I've been reading through these forums but none of the solutions have worked for me. I have comcast internet and an airport extreme base station. Wired connections through the base station work fine. But we've been having wireless problems for months
-
Patch In Place installation of JRE8 (update 25)
How can we do a silent/unattended Patch In Place installation of Java Runtime Environment 8? The installation defaults to a static installation even if we specify the STATIC=0 command line option. Also we would like to download the Enterprise Install