Member
Last active last week
Found a way out: using the vanilla javascript mouse events:
let el = document.getElementById("obj140"); let slide = document.getElementById( "obj98" ); let azul = document.getElementById( "obj132" ); let isMoving = false; let x = 0, y = 0; el.addEventListener("mousedown", (e) => { console.log(e.offsetX, e.offsetY); y = e.offsetY; x = e.offsetX; isMoving = true; }); el.addEventListener("mousemove", (e) => { if (isMoving) { let vol = 1 - (e.offsetY) / 144 ; console.log( e.offsetY, vol ); slide.style.top = e.pageY + "px"; azul.volume = vol; } }); el.addEventListener("mouseup", (e) => { console.log(e.offsetX, e.offsetY); y = e.offsetY; x = e.offsetX; isMoving = false; }) window.addEventListener('mouseup', function(event){ isMoving = false; })
Hi,
I'm tinkering a way to control an audio file volume while sliding an object. I think the best way is to attach a mouse move or drag event to a function that changes the audio file volume.
I started trying to make the slider object (its an image) draggable,
$( "#obj98" ).draggable({ drag: function( event, ui ) { console.log( ui.position.top ); } });
but the drag event never triggers, and I gives an error "TypeError: undefined is not an object (evaluating 'a.browser.msie')"
Then I tried to use jQuery mousemove, but I'm unable to get it work
$("#obj140").mousemove(function( event ) { console.log(event.pageX + ", " + event.pageY); });
#obj140 is an interactive area.
Any suggestions to achieve this?
You have to edit the text and insert a "read aloud splitter" wherever you want to split.
NilObjectException in SCAndroidAppCompiler.buildXPUBContainer:
Pubcoder 4.2.1 (1172)
Mac OS Ventura
I tested first with a sample project, and then with a blank one just with one page and a text box.
On every test it gives that error on the beginning.
I've already uninstalled Pubcoder. The issue remains.
Thanks for your support.
Humberto Neves
Hi Zahir, thanks for your reply. In fact I have the font embedded. The font is always showing correct, the slight difference seems to be in the spacing or boldness of the paragraph.
Hi,
I'm finding some text boxes with custom font that are being displayed different from what we define in pubCoder.
When quick preview it's ok, but when previewing on browser it shows a bit different, it wraps the text differently in some lines.
I'm using classes defined at project CSS and I'm using them on the text.
An example:
<p><span class="red">A fábrica superou as suas dificuldades e passou a ser um exemplo de produção de energia ecológica, produz energia hídrica, através de uma pequena central nas margens do rio, </span></p>
Maybe you can implement a timer with a counter that when reaches some value, for example 60, it hides the memory game. Put the counter increase in the game start event of the memory game. For the message at the end of the game you have the Game Completed event.
Hi,
What's the best strategies you are using to have a smooth page transition?
Since we can have different images sizes, layers and transparencies, sometimes we can have weird loading behaviours like having an image being visible during a few milliseconds on the page loading that was supposed to be partially hidden by another one.
How are you workaround this kind of behaviour?
Humberto.
Hi Van, that would be great. I usually "group" this kind of actions with an action list that I run on a trigger object.