PDA

View Full Version : function and var problem!


wickedboy
12-06-2005, 09:22 PM
I used a function as below but only one of either clipboard or getVariable work at a time...
Application.dragdrop.enable = true;
Application.dragdrop.onDragGetData = function ()
{
return Application.clipboard.paste();
}
{
return FlashPlayer.getVariable("_root.currentSentence");
}
So instead I have been suggested to use the variable below, but I'm not 100% sure how to use it...I would be most gratful if someone could explain how I could use it?

var something = Application.clipboard.paste();
trace(something);
return FlashPlayer.getVariable("_root.currentSentence");
Or is it possible to use both somehow?

WickedBoy

sophistikat
12-06-2005, 09:42 PM
what are you writtin here? is this suppose to be an if statement or are they both suppose to perform their duties at the same time?
Application.dragdrop.onDragGetData = function (){
return Application.clipboard.paste();
}
{
return FlashPlayer.getVariable("_root.currentSentence");
}

wickedboy
12-06-2005, 09:56 PM
at the same time (or at least whenever they are called...) now, only one will work...

deadbeat
12-06-2005, 09:59 PM
How do you need to use the values? What are you trying to accomplish here?

K.

wickedboy
12-06-2005, 10:02 PM
Hi again!

One uses the clipboard and the other the registry - both uses a drag function.

1. To type in text that users can drag into their docs (getVar - registry)
2. Users drag symbols into theior docs using btns (clipboard)

deadbeat
12-06-2005, 10:15 PM
And this is a Flash file? Is this a standalone projector?

K.