swftools-common
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Swftools-common] object instantation?


From: Jesse Andrews
Subject: [Swftools-common] object instantation?
Date: Fri, 14 Jan 2005 01:30:05 -0500

Hi, I am trying to build a simple quiz in swfc...  My stumbling point
thus far is how to create the buttons so they are not all the same
object....

My source:

    .flash name="quiz.swf" fps=50
    
    .box box1 color=white fill=#336633 width=50 height=50 
    .box box2 color=white fill=#99cc99 width=100 height=100
    
    .font Arial filename="Arial.ttf"
    .text question font=Arial text="How many inchs in a foot?"
    .text a1 font=Arial text="6"
    .text a2 font=Arial text="12"
    
    .button mybutton1
        .show box1 as=shape x=25 y=25
        .show box2 as=hover x=0 y=0
        .on_press:
            this.geturl('javascript:alert(\'You are '+this.url+'\')');
        .end
    .end
    
    .frame 0
        .put question          y=100   x=50
        .put b1=mybutton1 y=150
        .put a1                  y=225 x=120
        .put b2=mybutton1 y=250 red=+255
        .put a2                  y=325 x=120
        .action:
           a1.url = 'wrong';
           a2.url = 'right';
        .end
    .end

Obviously b1,b2 are just names for the same object mybutton1.  How
should I go about having a button and creating copies of the button
that will have their own "properties" or "attirbutes" or "members"
(not sure what they are called in actionscript....)

Thanks,
Jesse




reply via email to

[Prev in Thread] Current Thread [Next in Thread]