Solved

Assistance with code needed

Posted on 2007-11-27
4
145 Views
Last Modified: 2010-04-05
Hi Expert,

I am trying to stream some data from the net.

Could someone have a look at this code and tell me where I'm going wrong in creating the stream please?

Data : TMemoryStream; //The Stream
DataString : String;

Data := TMemoryStream.Create;


DataString :=('http://www.AWebsite.co.uk/Ceiling.jpg');

CeilingTex := DJXTextureList1.CreateTextureFromStream(Data,'ceiling');

Thanks

ST3VO
0
Comment
Question by:ST3VO
  • 2
  • 2
4 Comments
 
LVL 10

Expert Comment

by:dinilud
ID: 20358182
Try Like this


Data : TMemoryStream; //The Stream
DataString : String;

Data := TMemoryStream.Create;

Data.LoadFromFile(FileName);
Data.position:=0;


DataString :=('http://www.AWebsite.co.uk/Ceiling.jpg');

CeilingTex := DJXTextureList1.CreateTextureFromStream(Data,'ceiling');
0
 

Author Comment

by:ST3VO
ID: 20358454
Nope still not streaming from URL
0
 
LVL 10

Accepted Solution

by:
dinilud earned 500 total points
ID: 20358645

URLDownload1.OpenRequestEx('http://www.AWebsite.co.uk/Ceiling.jpg', nil, Pointer(liItem.Index));


.......................

procedure TForm1.UrlDownload1UrlComplete(Sender: TObject; ID, TotalMilliseconds: Cardinal; Stream: TStream);
var  liItem:        TListItem;
     f:String;
begin

  CeilingTex := DJXTextureList1.CreateTextureFromStream(Stream,'ceiling');
 

end;
0
 

Author Comment

by:ST3VO
ID: 20358920
I'll give it a try in a bit and let you know!

Looks interesting :o)
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Delphi Form ownership 4 112
Create a path if not exists 7 89
Firemonkey webbrowser scrollbars ? 1 50
How to insert .png images to TClientDataSet .cds file? 2 32
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

837 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question