im43

Q: brush size problem

Hi everyone,

 

Sorry for my poor english,

 

I want to create a pencil with 2 px brush size and a eraser with 45px in a  widget for an ibook?

 

For the pencil, the event is set to  "change brush size drawing view"

 

and the eraser ( i have two events )

 

1- change to eraser drawingView

 

 

2-(Focused In)

Change brush size drawing View

size 45 px

 

 

It's work fine in my ibook on the Mac but in the Ipad, the eraser 45px size don't work...it's only 2 px  like Pencil' drawing View...

 

Can you help me? I'm confused!!

Posted on Feb 26, 2014 9:36 AM

Close

Q: brush size problem

  • All replies
  • Helpful answers

  • by patixa,

    patixa patixa Feb 28, 2014 11:55 AM in response to im43
    Level 3 (597 points)
    Feb 28, 2014 11:55 AM in response to im43

    See my reply regarding Action Lists in another thread:
         https://discussions.apple.com/thread/5926601?tstart=0

     

    In short, Action Lists always start from the page's starting state.

     

    If you want to write a little bit of code to change the sizes, something like this will work:

        this.outlets.drawing.brushColor = "#000000";

        this.outlets.drawing.brushSize = 5;

        this.outlets.drawing.brushCompositing = "source-over"

    …where "this.outlets.drawing" is the path to your drawing view object. Use "destination-out" as the composite type for the eraser.

  • by im43,

    im43 im43 Mar 2, 2014 6:10 PM in response to patixa
    Level 1 (4 points)
    Mar 2, 2014 6:10 PM in response to patixa

    Thank you very much patixa, i forgot to say that i use iad to create a widget for ibook author. Where can i find your suggestion in the iad plateform for widget?

  • by patixa,Solvedanswer

    patixa patixa Mar 2, 2014 6:29 PM in response to im43
    Level 3 (597 points)
    Mar 2, 2014 6:29 PM in response to im43

    It doesn't matter what project type you're using – iAd, iTunes or widget – the JavaScript is mostly the same. Therefore, you can use code, action lists and even pages (of equivalent sizes) between project types.

     

    The Martiangram (iAd) project may be helpful if you want to use only action lists, but the code above will work in a widget project.