A course on the Development method of scratch Music in Wechat Marketing platform
This article mainly introduces the "Wechat marketing platform system scratch music development method tutorial". In the daily operation, I believe that many people have doubts about the Wechat marketing platform system scratch music development method tutorial. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about the development method tutorial of scratch music in Wechat marketing platform system. Next, please follow the editor to study!
The copy code is as follows:
("# wScratchPad3") .wScratchPad ({
Cursor:'', / / set the mouse style
Color:'gray', / / sets the color of the cover, which is mutually exclusive with the image2 function
Width: 300
Height: "100"
Image: "" / / the picture at the top
/ / for more configuration-related options, please see the source code.
ScratchUp: function (e, percent) {
If (percent > 60)
{
Alert ("sss")
}
}
});
From the above code, we can see that this is different from the so-called tutorials on the Internet. Here, the function used to get the scraped range is not
ScratchMove ()
But
ScratchUp ()
Why is that? Look at the source code
The copy code is as follows:
ScratchFunc: function (e, $this, event)
{
E.pageX = Math.floor (e.pageX-$this.canvas_offset.left)
E.pageY = Math.floor (e.pageY-$this.canvas_offset.top)
$this ['scratch' + event] (e, $this)
If (this.settings.realtimePercent | | event = = "Up") {
If ($this.settings ['scratch' + event]) $this.settings [' scratch' + event] .apply ($this, [e, $this.scratchPercentage ($this)])
}
}
Here this gets the UP bound by the function instead of move
At this point, on the "Wechat marketing platform system scratch music development method tutorial" is over, I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!