Visual representation if one is "inside" a movie clip

This commit is contained in:
Skyler Lehmkuhl 2013-01-04 22:08:56 -05:00
parent b2e6b88f5e
commit 4169bb16c8
2 changed files with 9 additions and 3 deletions

View File

@ -166,7 +166,8 @@ def onMouseDownText(self,x,y,button=1,clicks=1):
def onMouseDownFrame(self, x, y,button=1,clicks=1):
pass
def onMouseDownMC(self, x, y, button=1, clicks=1):
print clicks
if clicks==2:
self.obj.level = True
def onMouseUpGroup(self, x, y,button=1,clicks=1):
self.clicked = False
if svlgui.MODE in ["r", "e"]:
@ -429,8 +430,8 @@ def run_html(self=None):
except IOError:
svlgui.alert("Couldn't copy base.js to "+os.getenv('HOME')+"/base.js!")
webbrowser.open("file://"+os.getenv('HOME')+"/test.html")
def box(x, y, width, height, fill=None):
global objects

View File

@ -2510,10 +2510,14 @@ class Group (object):
self.dragging = False
self.selecting = False
self.tempgroup = None
self.is_mc = False
self.name = "g"+str(int(random.random()*10000))+str(SITER)
if "onload" in kwargs:
kwargs["onload"](self)
def draw(self,cr=None,transform=None,rect=None):
if self.is_mc and self.level:
cr.fillcolor = Color([1,1,1,0.5]).pygui
cr.fill_rect([0,0,1000,1000])
for i in self.layers:
if not i.hidden:
i.x = self.x
@ -3152,6 +3156,7 @@ class ConvertToSymbolWindow:
symbol = Group()
symbol.add(self.root.descendItem().activelayer.currentselect.obj)
symbol.name = self.ntry.text
symbol.is_mc = True
self.root.descendItem().activelayer.delete(self.root.descendItem().activelayer.currentselect)
print self.root.descendItem().activelayer.currentFrame()
self.root.descendItem().activelayer.add(symbol)