Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Hi!
I just tried this method, I get error however,
1061: Call to a possibly undefined method contains through a reference with static type flash.display:SimpleButton.
strange thing is it say 'contains' is undefined but in Flash its text is blue so 'contains' has to be an AS term..
Copy link to clipboard
Copied
Enable debugging in your Publishing options and show the Line of Code that produces the error
Copy link to clipboard
Copied
ok, I tried enable debugging, added back the contains code.
it's the line that has 'contains' produce the error, this is the line, I used a button on stage instead of 'circle'
if (event.target == shopBttn || shopBttn.contains(event.target)){
Copy link to clipboard
Copied
change the whole line
if (event.target == shopBttn || shopBttn.contains(event.target)
to
if(event.currentTarget == shopBttn){
Copy link to clipboard
Copied
Hi,
It runs now, however only clicking on shopBttn works, on stage or anywhere else doesn't work.
Does 'stage' defines just within the movie, or timeline/movieclip regardless, just everything seen in the browser?
I asked because I'm doing this inside a movieclip
Copy link to clipboard
Copied
Copy link to clipboard
Copied
It said these properties are not 'applicable'... My site is pretty heavy on filters and mask, is that why it doesn't work? But this list practically un-applicable everything, it can't be right?
alpha
blendMode
cacheAsBitmap
contextMenu
filters
focusRect
loaderInfo
mask
mouseEnabled
name
opaqueBackground
rotation
scale9Grid
scaleX
scaleY
scrollRect
tabEnabled
tabIndex
transform
visible
x
y
Copy link to clipboard
Copied
var stageref:Stage = this.stage;
//it only means that the stageref-Object that I created above
//can`t be accessed with the properties that are listed, its not a Sprite or a MovieClip
Copy link to clipboard
Copied
Hi, I tried again, on the site it says I dont need the contains check, so I just took it down.
It runs, however the result it will trigger what's inside circle, outside circle function doesn't trigger..
Find more inspiration, events, and resources on the new Adobe Community
Explore Now