• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 151
  • Last Modified:

Assistance with code needed

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
ST3VO
Asked:
ST3VO
  • 2
  • 2
1 Solution
 
diniludCommented:
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
 
ST3VOAuthor Commented:
Nope still not streaming from URL
0
 
diniludCommented:

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
 
ST3VOAuthor Commented:
I'll give it a try in a bit and let you know!

Looks interesting :o)
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now