Simple Photo App + help needed
Posted: 18 July 2008 04:04 PM   [ Ignore ]
New Member
Avatar
Rank
Total Posts:  3
Joined  2008-07-18

Hi All,

I am new to multitouch apps and AS3 but I’ve been trying to understand how apps like the Photo app work. With some help from other examples, I have put together a simple photo app that rotates and scales internal images.  I have attached the file (Gallery.fla) to this message, I hope that this example helps out beginners like mesmile

I am extending this example now and I will post me updates here.

I do need some help with the other file that is included in the zip, I have embedded a movie clip into one of the images and I want to trace a message when I ‘fingerdown’ but I keep getting errors when I compile the swf (Gallery2.fla).  Could someone who is more adept with AS3 please have a look at the file and maybe suggest where I’m going wrong.

T

File Attachments
gallery.zip  (File Size: 664KB - Downloads: 98)
Profile
 
 
Posted: 24 July 2008 04:20 PM   [ Ignore ]   [ # 1 ]
New Member
Rank
Total Posts:  18
Joined  2008-06-23

Interesting. I’ve been working on a photo album app too!  I guess everyone wants to scale and rotate images with their hands.  My version loads local, but external images via XML. 

I looked at your code for gallery2.fla.  I figured a way to fix this.  First. go to the library of your flash file open your “t1” movieclip.  Give the “hello” and “goodbye” movieclips instance names of “hello” and “goodbye” respectively. Then remove the code on your main timeline that sets the event handler (all of the code from line 30 down.  Then in your loadImagesB.as file do the following.

private function arrange() 
        
{    
            tr1 
= new t1(); this.addChild(tr1); tr1.400.8-75 tr1.234.8;
            
// Add event handlers here
            
tr1.hello.addEventListener(TUIOEvent.DownEvent,helloHandler,true);
            
tr1.goodbye.addEventListener(TUIOEvent.DownEvent,goodbyeHandler,true);

        
}
        

        
// Add your functions here
        
private function helloHandler(e:Event):void
        {
            trace
("Hello");
        
}

        
private function goodbyeHandler(e:Event):void
        {
            trace
("Goodbye");
        
}

Profile