Copy link to clipboard
Copied
Hi,
I'm using stagewebview > Flash Builder 4.6
I have a stagewebview and I load an url in it. I want to show sometimes a slide panel on top of the stagewebview. I tried it, but the panel is always behind the stagewebview. I know that stagewebview isn't a display object, but does anyone know if there is any way I can do it?
Thanks in advance
Hi.
You need to take a picture of the stagewebview, add the picture to the stage, hide the real stagewebview and THEN you can add your slide panel over the top of the pic. A bit of trickery, yes, but this is how everyone makes do.
Otherwise, no, you cannot add objects over the top of a stagewebview.
Cheers,
Copy link to clipboard
Copied
Hi.
You need to take a picture of the stagewebview, add the picture to the stage, hide the real stagewebview and THEN you can add your slide panel over the top of the pic. A bit of trickery, yes, but this is how everyone makes do.
Otherwise, no, you cannot add objects over the top of a stagewebview.
Cheers,
Copy link to clipboard
Copied
Thanks for your answer. It works correctly, but I have a little problem.
When I hide the real stagewebview, I see on the iPad, a little blinking before I can see the picture.
Is there any way to solve it?
Thanks,
Copy link to clipboard
Copied
I'm thinking this could be one of two issues (or both?);
1. You're adding the picture after removing the swv. Remember to add it before you remove the swv.
2. There might be a slight delay between capturing and processing the pic for display. (ie. AIR hasn't finished drawing the pic before your add the bitmap and take away the real swv) To get around a similar issue, I added a slight delay of a couple hundred milliseconds or so after capturing the pic to allow AIR to process the screen capture.
Copy link to clipboard
Copied
I think it could be the second issue.
Could you please give me an example of how to add the slight delay?
Sorry, I'm new at flash builder.
Thank you very much,
Copy link to clipboard
Copied
I used the first example from this post:
http://www.stimuli.com.br/trane/2007/nov/07/tweener-tips/
Tweener.addTween(this, {time:0.3, onComplete: myFunction});
I placed this at the end of my screen capture function and then carry out the rest of the process via a new function ("myFunction") in the example above. You may need to experiement with this arrangement, along with the specific delay time, for your own situation.
But I'm new to AIR dev myself, so there may be better ways. This does work for me, though. (again, not sure if this will definitley solve your "blinking" issue though)
Good luck!
JP
Copy link to clipboard
Copied
Thanks, it works!