?
Solved

Assistance with code needed

Posted on 2007-11-27
4
Medium Priority
?
149 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses
Course of the Month11 days, 5 hours left to enroll

770 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