onmouseDown or onRelease ?????

My mouse action is not working. (flash 8)
I do not even get the mouse hand on test play.
It is like the mc has no code at all.
Can you please help?
I tried this on the actions frame:
 
gallery1.onRelease = function (){
	gallery1.gotoAndPlay(56);
	kid1.gotoAndPlay(56);
}
 
or I tried on the mc
 
onClipEvent(mouseDown) { 
var MouseListener:Object = new Object();
 gallery1.onRelease = function() {
  kid1.gotoAndPlay(56);
};
}

Open in new window

lbuscheAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

crittle1Commented:
make sure the mc instance name is gallery1

or you can try

on(release){
   this.gotoAndPlay(56);
        kid1.gotoAndPlay(56);

}

You will probably need to use the code this. in place of gallery1 since you are
referring the same movie clip.

Post back to see if it worked.. if not, I'll try look into it further.
0
crittle1Commented:
Use that code on the actual movieclip. It is Actionscript 2 which I'm assuming you are using.
0
Antonio EstradaTech Leader / Senior Web DeveloperCommented:
Although what crittle1 suggests will work, it's not ActionScript 2. It can be used while exporting for ActionScript 2, but it's a relic from AS1, the on(ACTION) statement is not recommended at all because it makes your code illegible soon after.

You should try to use this syntax at all times:

gallery1.onRelease = function (){
        gallery1.gotoAndPlay(56);
        kid1.gotoAndPlay(56);
}

If it didn't work there's probably an issue with the name of the instance object. Would you mind posting your *.fla?

-V
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

crittle1Commented:
ah, thanks for the clarification :)
0
lbuscheAuthor Commented:
Hey ,
Thanks a bunch.

In the meantime I found that this works.

      kid1.onPress = function (){
gotoAndStop(56);
      }

Where kid1 is the  mc instance.
gallery1 is the mc name.

Should I change something?
0
lbuscheAuthor Commented:
hey do either of you know:

I want the code to print an external .jpg from my pic folder that is currently displayed in the mcLoader (a movie clip Loader). I know how to print from just a mc_thumbnail. That is not what I want.

extLoader_mc.

Thanks,
me
0
Antonio EstradaTech Leader / Senior Web DeveloperCommented:
Do you mean actually printing what's shown on the Flash file to paper?

If so, take a look at the PrintJob class:
http://help.adobe.com/en_US/Flash/10.0_UsingFlash/WSB7FB8B27-9DF4-4089-9434-8AFF31584DA4.html
http://www.actionscript.org/resources/articles/206/1/The-PrintJob-class/Page1.html

-V
0
lbuscheAuthor Commented:
No not the flash file. External links of a picture image........jpg.
Like this girls site.
http://www.edytajordan.com/galleries/ltcomfort/
I want the user to print the 300 res picture from my file of the picture they are viewing in the mc Loader.
Which is only a 72 res.
I just my print button to work.
My test site is: http://www.lynettesdesigns.com/
Let me know if you have a clue.
Thanks,
me
0
Antonio EstradaTech Leader / Senior Web DeveloperCommented:
Yeah well, that's pretty much what I meant.

You can use the PrintJob class for that. You add MovieClip references to that class. Something like:

printButton.onRelease = function() {
    var my_pj = new PrintJob();
    var myResult = my_pj.start();
    if(myResult) {
        myResult = my_pj.addPage ("myMovieClip", {xMin : 0, xMax: 400,
            yMin: 400, yMax: 800},{printAsBitmap:true}, 1);
        my_pj.send();
    }
    delete my_pj;
}

Honestly I haven't used the PrintJob class in a long time, but there are some nice examples over here:
http://help.adobe.com/en_US/Flash/10.0_UsingFlash/WSB7FB8B27-9DF4-4089-9434-8AFF31584DA4.html
http://www.actionscript.org/resources/articles/206/1/The-PrintJob-class/Page1.html

-V
0
lbuscheAuthor Commented:
Ok this is what I have now. The print box opens. Some thing is printing but I am out of black ink. It was a picture of an example picture from my printer. The save and close do not work. But they at least look like they are a movie clip button now.

print_pic.onRelease = function() {
    var my_pj = new PrintJob();
    var myResult = my_pj.start();
    if(myResult) {
        myResult = my_pj.addPage ("myMovieClip", {xMin : 0, xMax: 400,
            yMin: 400, yMax: 800},{printAsBitmap:true}, 1);
        my_pj.send();
    }
    delete my_pj;
}

save_pic.onRelease = function() {
    var my_sj = new SaveJob();
    var myResult = my_sj.start();
    if(myResult) {
        myResult = my_sj.addPage ("myMovieClip", {xMin : 0, xMax: 400,
            yMin: 400, yMax: 800},{saveAsBitmap:true}, 1);
        my_sj.send();
    }
    delete my_sj;
}



close_pic.onRelease = function() {
close_pic_mc.gotoAndPlay("family");
}

my buttons instances are print_pic, save_pi, & close_pic.
mc are printer, save_picture, and close_pic_mc
0
lbuscheAuthor Commented:
sorry for got the c

my buttons instances are print_pic, save_pic, & close_pic
mc are printer, save_picture, and close_pic_mc
0
Antonio EstradaTech Leader / Senior Web DeveloperCommented:
Uhh well, I think I'll have to take a look at the file to see what's going on. Can you upload it please?

-V
0
lbuscheAuthor Commented:
0
Antonio EstradaTech Leader / Senior Web DeveloperCommented:
Ok, the following code should do the trick:

<code>

-V
print_pic.onRelease = function() {
    var my_pj = new PrintJob();
    var myResult = my_pj.start();
    if(myResult) {
		myResult = my_pj.addPage("picViewer_mc");
        my_pj.send();
    }
    delete my_pj;
}
 
save_pic.onRelease = function() {
	getURL(picViewer_mc.picLoader._url);
}
 
 
 
close_pic.onRelease = function() {
	var mcLoader:MovieClipLoader = new MovieClipLoader();
	mcLoader.loadClip("",picViewer_mc.picLoader);
	_parent.gotoAndPlay("family");
}

Open in new window

0
lbuscheAuthor Commented:
Vulturous, you are great.
I have been pulling my hair out.
I luv u.........one thing though the close just closes the current picture.
I suppose that is cool also. But i know the code is trying to tell it to go back to frame "family"
Am I right?
Do I have a stop somewhere that I should not?
I wish I were a pro like you.
I think I can actually sleep tonight.

0
Antonio EstradaTech Leader / Senior Web DeveloperCommented:
Actually I didn't know what the close button had to do, so I just assumed that it had to "close" the picture and go back to the "family" frame. I didn't try clicking on the other buttons so I'd never have to return to the "familiy" frame, so it was bugged - my apologies for that.

Here's the fixed code for that part:

<code>

And I'm glad to help.

-V
close_pic.onRelease = function() {
	var mcLoader:MovieClipLoader = new MovieClipLoader();
	mcLoader.loadClip("",picViewer_mc.picLoader);
	this._parent.gotoAndStop("family");
}

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
lbuscheAuthor Commented:
You are a life saver.
I want to thank you so much.
It all works. xxxooo
I would love to get a hold of you again if I may.
I put my email up on my site. I will keep it there for a day.

Happy 4th to you.
Again thanks so much for sticking by your computer and helping me. I owe you.
I went to get my ink and love it. I may need to change the res on some photos, but all is ok.

me
0
lbuscheAuthor Commented:
He is the greatest.
Thanks
0
Antonio EstradaTech Leader / Senior Web DeveloperCommented:
I'm extremely glad you got it working, in the end we're here to help and comments like yours are exactly what keeps us going :).

Yep, you can get a hold of me anytime, my contact information is in my profile (though, if it's a question, it'll have to be here first so if someone else runs into the same issue, they can read from here).

Happy 4th to you too, and again; I'm glad it's all working fine now :).

-V
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.