Solved

Assistance with code needed

Posted on 2007-11-27
4
144 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

815 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now