Sign in to follow this  
evan

Delete [SOLVED]

Recommended Posts

--------------------------------Update Delete DOES work, but for me it works only on "ctrl-delete"--wierd any reason why? :?:

 

As with my last question, It's simple.

 

The AS3 demo seems to work sporadicaly -with delete enabled, it works only after the text box is slected.

 

I tried it myself:

Here is some sample code with delete enabled(using delete key)

 

var manager:TransformManager = new TransformManager({targetObjects:myTargets

//this works

,bounds:new Rectangle(0, 0, 550, 365)

//this works

,forceSelectionToFront:true

//this didn't take

,allowDelete:true}

 

);

 

 

Any sugestions?

Share this post


Link to post
Share on other sites

Are you just testing it in the authoring environment? Or are you testing it in a browser? Keep in mind that if you want to test that kind of stuff in the authoring environment (test movie), you need to disable keyboard shortcuts. People make that mistake all the time. If you don't do that, Flash intercepts the special keys (like DELETE).

Share this post


Link to post
Share on other sites

Yes, I'm working in the authoring environment .

I'm glad I'm not the only one who had that happen.

 

Intresting.

Share this post


Link to post
Share on other sites

So it's workin' for you now, right? (once you disabled keyboard shortcuts)

Share this post


Link to post
Share on other sites

That does the tick.

Is there a way I can set it up to get textboxes to delete?

Regular objects work great (BTY love the grouping and moving with arrows.)

Share this post


Link to post
Share on other sites

Glad to hear it's workin' for you.

 

As far as deleting TextFields, that's a tricky situation because the user must be able to use their BACKSPACE/DELETE key to interact with the text, so how would you know, for example, if when they hit the DELETE key that they wanted to delete the entire TextField as opposed to just a character inside the TextField? In my opinion, you'd need to create a separate button that the user would click to remove the TextField altogether.

Share this post


Link to post
Share on other sites

That's what I needed to know. ;)

Share this post


Link to post
Share on other sites

Is there an easy way to change the keyboard asisgnment of delete.

 

Namely I would like to set "delete" to delete text only using backspace as backspace.

 

I would also like to disable "backspace" as a delete with shapes and gifs.

Share this post


Link to post
Share on other sites

It's easy to disable TransformManager from handling DELETE/BACKSPACE stuff - just set the allowDelete property to false. Then you can handle all that stuff manually. I'm not sure you can disable the DELETE key inside TextFields - I've never tried that. Seems like it'd be really frustrating for users though. You sure you want to do that?

Share this post


Link to post
Share on other sites

The reason why I wanted to know about this is -I though that if I dissabled delete with textboxes I could enable delete to remove the whole box -rather than backspace over text.

 

If I created a button to remove a text box -would it remove the last one I added or delete selected text boxes.

Share this post


Link to post
Share on other sites

If you prefer not to use the built-in delete functionality, you can manually do it by removing the DisplayObject (removeChild()) and then call the removeItem() method on the TransformManager for that particular item that you deleted.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.