Hi
I've a requirement for an Air Application.Which include Drag image from System DeskTop and Drop Directly on WhiteShareBoard.
Will you pls inform me is that possible?I've studies Custome Shape Example.In which user need to upload the image and Then Select the image and use it.
Can't we shorten entire Process?
Rajiv
Solved! Go to Solution.
Views
Replies
Total Likes
Hey Rajiv,
Yes it is possible to do the scenario you mentioned. So we use FilePublisher.browse api to upload images in WhiteBordCustomShapes. Instead you can use FilePublisher.uploadFileReference to pass the file publihser the file reference of the file that is dragged in.
I am sure the new AIR file API's would allow you to drag a file from desktop and get the files FileReference.
Thanks
Arun
Views
Replies
Total Likes
Hey Rajiv,
Yes it is possible to do the scenario you mentioned. So we use FilePublisher.browse api to upload images in WhiteBordCustomShapes. Instead you can use FilePublisher.uploadFileReference to pass the file publihser the file reference of the file that is dragged in.
I am sure the new AIR file API's would allow you to drag a file from desktop and get the files FileReference.
Thanks
Arun
Views
Replies
Total Likes
Thanks Arun
I can achive my target.
Can you pls give me guide line that how can i add Images to white share board.Currently i need to use Drag the Mouse on the White share board?
Here is the code for adding shape on the fly.
var ellipseDesc:WBEllipseShapeDescriptor = new WBEllipseShapeDescriptor();
ellipseDesc.x = _lastMouseX;
ellipseDesc.y = _lastMouseY;
ellipseDesc.width = ellipseDesc.height = 100;
sharedWB.model.addShape(ellipseDesc);
How can i apply this logic to Image?
Becuase if i use following code it's give me error.
var ellipseDesc:WBShapeDescriptor=new WBShapeDescriptor();
var propObject:Object = new Object();
ellipseDesc.factoryID = "com.adobe.coreUI.controls.whiteboardClasses.shapes::WBCustomShapeFactory:UserWindow.Scripts::WBFileImageShape";
ellipseDesc.shapeID="420";
ellipseDesc.rotation=0;
ellipseDesc.x = 50;
ellipseDesc.y = 50;
ellipseDesc.width = ellipseDesc.height = 100;
propObject.imageName = "mountain-and--lake-wallpapers-6.jpg";
ellipseDesc.propertyData=propObject;
sharedWB.model.addShape(ellipseDesc);
Rajiv
Views
Replies
Total Likes
Hi Rajiv,
We never tried adding customShapes programatically on the fly. But it should be possible to do that if the ShapeDescriptor you are using has all the parametres that a sharedWhiteBoard is expecting.
In your code, I see that you are mentioning just a file name. May be the definition data and property data are not properly constructed.
Can you tell us the error you are getting.
Thanks
Arun
Views
Replies
Total Likes
Also Rajiv,
Please explore the SDK source to get a better understanding of WhiteBoard. It might take some time, but would help you build robust apps. The other thing you might have to do is
1) Define a WBImageShapeDescriptor that would extend WBShapeDescriptor
(Explore files such as WBRectangleShapeDescriptor inside the package
com/adobe/coreUI/controls/whiteboardClasses/shapeDescriptors)
2) Define WBFileImageShape that would extend WBShapeBase
(You could modify WBFileImageShape inside WhiteBoardCustomShapes app)
3) Instantiate a base WBFileImageShape inside WBImageShapeDescriptor and then add to the model like you did
Please do let me know if you need more help. Files that might help you understand how a shape is added to WhiteBoard
WBRectangleShapeDescriptor.as in src/com/adobe/coreUI/controls/whiteboardClasses/shapeDescriptors
WBSimpleShape.as in src/com/adobe/coreUI/controls/whiteboardClasses/shapes
SharedWBModel.as (onItemReceive method) in com/adobe/rtc/pods/sharedWhiteBoardClasses
WBFileImageShape.as in WhiteBoardCustomShapes sampleApp
WhiteBoardModel.mxml in WhiteBoardModel sampleApp
I know its a lot of files, but it should help you in what you want to do.
Thanks
Arun
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies