Creating Scenarios for DesktopX

Custom Folders

http://www.cryo64.us/assets/scenarios/index.html
The creation of these "Scenarios" (as I call its) is a total success. I have new ideas but I need to know if it is possible with DesktopX technology or not. By the moment Scenarios are a set where wallpapers and icons are composed in the same 3D environment. So... you will have icons near you (bigger) and far (smaller)... to integrate in the space, the background simulate a floor and each icons have a reflection on it. But the icons (by the moment) are objects with typical targets (My CPU, My Documents, My Music).

I'm very close to finish a new version with Cryo64 Exodo YQ2 icons... but this time all icons have a mouser over animation. It look great!

THis is the new idea.
I would like to make a folder icon and when the user mouse over showing an animation like a (for example 640x480) window opened and with some icons inside (these icons linked to programs.
For example... the folder could be a Mozilla folder and inside the window you will find Firefox, Thunderbird, icons... or imagine a Stardock Folder! it would be great, I think.

Anybody know if this is possible?

Thanks in advance!


This is another sample
13,023 views 28 replies
Reply #1 Top
looks very cool.



I do believe the folder with icons is possible.
Reply #2 Top
You have some amazing ideas Arnaez; definitely seems possible. Hope some of the DX masters will be able to help you out.

(These 640x480 windows...are you talking about drag and drop containers?)
Reply #3 Top
(These 640x480 windows...are you talking about drag and drop containers?)
End of quote


Yeah!!! if that would be possible it would be great! or I could do an icons set or even using the icons that I made and convert it to objects. The only issue is the program location, because for example: typical user user have firefox at c:/Program Files/Mozilla/ but users like me using Windows XP 64 bit the target will be c:/Program Files (x86)/Mozilla

Reply #4 Top
Drag and drop containers:

Create object, set an image.
Go to Properties > General.
Click on 'change' object type.
Check 'Accepts Drag and Drop'.



However, if you want the dropped icons to be custom icons that would require creating(cloning actually) another object inside the container and then applying an image.

A few ideas on how to do this would be to use OnDropFiles and FileSystemObject to get the filepath/filename etc. Have a hidden object in the container that will be cloned and made visible OnDropFiles, and then maybe modify and use Quentin's shortcut method to set the shortcut and image.
I have no idea if this will work but hopefully it's a step in the right direction.
Reply #5 Top
Thanks to your help. However I can't reach the idea because I guess that method is for to give a folder as a target... and to put some shortcuts in that folder.. right?

I did a simple sample in Flash to show you the idea... pease go to This Link
Reply #6 Top
D. Arnaez I love the look of this, gives it the feel of 3d. Nice work, keep it.   
Reply #7 Top
Here's a regular drag and drop container example(that uses a script). Mouse over the folder to show the window (there's a 2 second delay). The window is set to close on any action.

Download LINK

Might try to make an example of the other method I mentioned if I have some time. I'm pretty sure what you want can be done; just haven't figured out how yet. LOL!


Reply #8 Top
Yep, it can be done. Add in a scripted animated png object.

Clicking the folder starts the animation then when the last frame is done or almost done have the container object fade in or whatever you want.

You could leave the animation on the last frame for the background.
Reply #9 Top
Ohhhh ... I see what you are talking about! You call a object "window" that is hidden. Question: dow?

I think we are on the way!!!

Thanks sViz abd SirSmiley!
Reply #10 Top
The one I created in the link consists of two objects the "icon" object and the "window" object.

In the "window" object, in the Properties > General tab, I set it to accept drag and drop like described earlier. Set visibility to 'no'. Then, in the Relation tab set 'Popup' to 'Menu(Close on any action)'.

The script is in the "icon" object. You'll see that I used the OnMouseEnter and OnMouseLeave functions to start and stop a timer that will make the "window" object visible after two seconds.

Like SirSmiley said, if you add a state with an animation to the "window" object, you can set it to that when it is made visible, so it can expand like in your flash.
Reply #11 Top
Ok Great... I'm rendering the window animation... but meanwhile... how should be a button to close the window? I have some experience in Flash but not in these codes... so I haven't idea how make that button appear in the last frame of the animation. The same is with the icons inside. How can I set that??
Reply #12 Top
There are two ways to go about it, after you add the animation state to the "window" object, and create the close button.

Use OnStateChanged. This procedure is called when a state has changed, in other words, after the animation finishes. It should go in the "window" object.


Sub OnStateChanged(state)
If state = "animatedstate" Then
DesktopX.Object("closebutton").visible = True
End If
End Sub


Then there's using scripted animations; it's a little more complicated.
Following the directions in the tutorial link, with a few modifications, you would simply check when the last frame is shown and then show the close button.


The same is with the icons inside.
End of quote


The one I made used drag and drop so it would all appear once the window appears. However, if you are putting your own icons(seperate objects) in the window, you'd want to make sure they are either child objects or grouped. That way you could set the visibilty of them all using a loop.


Sub OnStateChanged(state)
If state = "animatedstate" Then
For each elem in DesktopX.Object("window").Children
elem.visible = True
Next
End If
End Sub




Reply #14 Top
Sorry to bother you again... but I don't know what I'm doing wrong. I put the animation replacing the White.png in the Window object. But when I make double click it open the "Desktop" folder... I know why but even leaving a white space in Location section... it open any folder system.

Please if you can help me would be great. Here I uploaded the .dxpack and the png files in a zip so please download it here

Thank you so much... I promise send you the DX theme when it will be ready... (if you want.. of course.. lol)
Reply #15 Top
I see the problem. You made the icon the child of the window. The window is set to close on any action so all of its children will inherit the 'close on any action' property, too. I cleared the Parent/Owner field as well as the group field, so the icon is unaffected.

I was re-reading your posts to get a better understanding of how you want this to function. I made several modifications and eliminated the complication of using a script. I just used state messages instead.

For the icon object:
-I added a mouse up state.
-The mouse up state has a message to set the window to the animation state

For the window object:
-I created an 'animation' state instead of using the default state.
-The animation state has a message to show the close button
-Also created a 'hide' state (which reverses the animation but you don't have to do that if that's not what you want)

For the close_window object:
-Added a mouse up state
-The mouse up state has messages to hide itself and the window.


So, a single click on the icon will open the window and close_window button. (A double click will open the folder shortcut.) A click on the close button will hide the button itself as well as the window.


DOWNLOAD LINK


Let me know if I'm misinterpreting your goal here.


I promise send you the DX theme when it will be ready... (if you want.. of course.. lol)
End of quote


I'd be honored!
Reply #16 Top
It should work... however it continue opening the "favorites folder" and the window animation doesn't appear... or do it sometimes. I don't know. We are very close. And the concept is like a normal function of a window... with the only difference that this is a 3D system. So the window is open when you make double click in the icon and the window have a close button to close it. Simple! lol.

The big difference is that we will see the contained icons with its perspective and shadow.

Here I upload what I did folowing your instructions.

WWW Link
Reply #17 Top
Ohh, I see, the window opens on double-click. Sorry, I misunderstood you. Since we're using double-click to open the 'window' we have to change the icon to an Object Controller.

Group the window and the close button, and then set the icon to toggle the group.

The window needs to have a default state and image otherwise it'll be stuck on animation. Had to use a script in the window object to start the animation as soon as it is visible.

UPDATED VERSION
Reply #18 Top
Excellent!!!!!!!!!!! That is exactly the idea. Now I'm seeing the minor details.
The issues is... the animation have 7 frames... but the close button appear from the first one. And the same will be with the icons inside the folder... right? I need to make a new animation because this one show the folder coming from so far in the back. Ok.. now... the objects should to be new objects that could have a mouse away and over... right?

Thank you so much to help me with this. I think the concept of the Cryo64 Operative system is taking shape! Now we only need thousands of programmers for to do it reallity! lol.
Reply #19 Top
The issues is... the animation have 7 frames... but the close button appear from the first one.
End of quote


Alright, some more adjustments are needed to make the button appear after the animation.
Set the icon to toggle only the window.
Make sure the close button visibilty is set to 'no'.
Then in the window script we add this code to show the close button after the animation finishes:


'Called while object's state is changing
Sub Object_OnStateChanged(state)
If state = "animation" Then
Desktopx.Object("close_window").visible = True
'List other objects here
End If
End Sub


UPDATED


Ok.. now... the objects should to be new objects
End of quote


I think that would be best. Even more adjustments are needed to accomodate the container objects. Make the objects in the container seperate objects, set their visibilty to 'no', set parent to the window object, and group with 3DWindow Container1.

Next, we remove the mouse up state from the close button. Instead we'll use a little more scripting to handle closing the window and its contents. Check it out:

UPDATED WITH CONTAINER OBJECTS


Reply #20 Top
Great collaboration!
I love this place!!!
 
Reply #21 Top
agree with Zubaz
nice work

Quentin94 wish he can be good in scripting
Reply #22 Top
Yeah!!!! Amazing!!! Now is working great!!!! Good job Master sVisz!!! Now just need make my freaking graphics.. lol. If you have a new idea or a variation... please let me know! ... I have ideas but my limitations are the knoledge about VS Scripting.

Thanks again!
Reply #23 Top
My pleasure. Any more questions/ideas ask away and I'll do my best. Good luck!

Reply #24 Top
Can y'all make the 'close' do a reverse animation instead of just disappearing?
Reply #25 Top
Can y'all make the 'close' do a reverse animation instead of just disappearing?
End of quote


Yep. Add another state with reverse animation, a few new lines of code and here you go: UPDATED