Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Printjob Nightmare



Hi I am a newbie to this forum. So 'hello everyone'. I am having a bit of a crisis at the minute with a deadline coming up and I am wondering if anyone can help.

I am trying to get a print button to work dynamically. when the button is pressed an image is downloaded into an MC and when complete it should print. Which would be nice. Not the case though.

In principle it works. the print dialog will appear when the images have completely downloaded but it also appears throughout the downloading process. from the start to the finish. The dialog box can appear tons of times depending on the download time.

What is happening is the print dialog box comes up straight away and even though you press print or cancel it continues to come up until the entire image is downloaded. As the swf stalls each time the print dialog box appears it can take some time for the image to load.

I have been stuck on this for weeks. I have listed the code below and would be eternally grateful to anyone who could help me get passed this hurdle.

Cheers !!!


//button code
on (release){
_root.startingPrinting();
}

function startingPrinting(){
var printFirst = page;
var printSecond = page +1;
// Using ZoomifyViewer to render images - printing 2 pages at a time
_root.print1.print1.setImagePath(printFirst);
_root.print1.print1.updateView();
_root.print2.print2.setImagePath(printSecond);
_root.print2.print2.updateView();
_root.initCheck();

}

function initCheck(){
myInterval = setInterval(startChecking, 1000);
}
function startChecking(){
var print2IsReady = _root.print2.print2.checkTileQueue();
if(print2IsReady==false) {
clearInterval(myInterval);
trace("It's finally loaded! Print now!");
_root.readyToPrint();
}
}
function readyToPrint (){
printJob = new PrintJob();
if (printJob.start())
{
printJob.addPage(_root.print1,{xMin:0,xMax:583,yMi n:0,yMax:763},{printAsBitmap:true},"");
printJob.addPage(_root.print2,{xMin:0,xMax:583,yMi n:0,yMax:763},{printAsBitmap:true},"");
printJob.send();
}
else
{
trace( "print start failed");
}
delete printJob;
}


thank you



FlashKit > Flash Help > Flash MX
Posted on: 04-04-2006, 07:34 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Dynamic PrintJob Nightmare
Hi I am a newbie to this forum. So 'hello everyone'. I am having a bit of a crisis at the minute with a deadline coming up and I am wondering if anyone can help.

I am trying to get a print button to work dynamically. when the button is pressed an image is downloaded into an MC and when complete it should print. Which would be nice. Not the case though.

In principle it works. the print dialog will appear when the images have completely downloaded but it also appears throughout the downloading process. from the start to the finish. The dialog box can appear tons of times depending on the download time.

What is happening is the print dialog box comes up straight away and even though you press print or cancel it continues to come up until the entire image is downloaded. As the swf stalls each time the print dialog box appears it can take some time for the image to load.

I have been stuck on this for weeks. I have listed the code below and would be eternally grateful to anyone who could help me get passed this hurdle.

Cheers !!!


//button code
on (release){
_root.startingPrinting();
}

function startingPrinting(){
var printFirst = page;
var printSecond = page +1;
// Using ZoomifyViewer to render images - printing 2 pages at a time
_root.print1.print1.setImagePath(printFirst);
_root.print1.print1.updateView();
_root.print2.print2.setImagePath(printSecond);
_root.print2.print2.updateView();
_root.initCheck();

}

function initCheck(){
myInterval = setInterval(startChecking, 1000);
}
function startChecking(){
var print2IsReady = _root.print2.print2.checkTileQueue();
if(print2IsReady==false) {
clearInterval(myInterval);
trace("It's finally loaded! Print now!");
_root.readyToPrint();
}
}
function readyToPrint (){
printJob = new PrintJob();
if (printJob.start())
{
printJob.addPage(_root.print1,{xMin:0,xMax:583,yMi n:0,yMax:763},{printAsBitmap:true},"");
printJob.addPage(_root.print2,{xMin:0,xMax:583,yMi n:0,yMax:763},{printAsBitmap:true},"");
printJob.send();
}
else
{
trace( "print start failed");
}
delete printJob;
}


thank you

MP3 Nightmare HELP
I'm doing a Flash Mobile Phone Ringtones Website, where the user can access a library of about 2,000+ ringtones and order the one of their choice.
The supplier has provided me with the MP3s.
I got a programme called Soundnails which will batch export MP3's into seperate .swf because I load .swf containing the MP3 upon the user clicking the "Play" Button.

My problem is this. Soundnails only batch exports MP3s that are 128kbps 44100Hz Stereo - The ones the supplier has given me are 32kbps -

Given the numbers I can't possibly export each sound individually, are there any cheap programs or server side utlities etc that can help?
What can I do, is there anyone who can save me

Regards
PADDYWALL esq

IE Nightmare
Hi All,

I am currently trying to find a workaround for the new version of IE.

I believe that movies won't play the same way as they used to in previous versions.

I have found this article which was posted in a thread on here.

It would be the perfect solution - if I understood how to use java and how to control it - which I don't!!!

Does any one out there have a sample folder of how I should set it up or some files that I can play about with to get a better understanding of how it can be done please?

Hope someone can help!!!!

What A Nightmare
Ok, I'm aware that this is a bit complicated to explain but I'll try my best.
I have a flash movie which consists of a series of jpgs with their associated thumbnails that load dynamically depending on a section variable. Each section has six jpgs and six thumnails to load, and I have a loading bar that displays while the images are being loaded. Up to this point all is fine. It works a treat when its on my computer.
The problem starts when I upload it to my server. Then all kinds of weird things happen. Sometimes it all works like expected, but others it never finishes loading the sections completely. When this happens it is usually one of the thumbnails that for some reason doesn't want to load so the loading bar stays on 97% or 99% and the section never displays. All the necessary images are in the server, so I don't understand why sometimes it doesn't load them all.
I'm on an adsl connection so download time shouldn't be an issue. The only conclusion I come to is that maybe my hosting cannot cope with being requested all the images at once??
Is this possible? In total each section (jpgs and thumbnails) is about 150K so its all a bit baffling.

Any ideas greatly appreciated.

Its A Nightmare For Me
Hi everyone,
I am new user in flash and I am currently doing a website. I installed mx 2004
when I export my pages they dont appear in the center of the I.Explorer but on
top,even though the settings on the publishing are set to center.I cant figure
the problem!!!

What can I do to get them in the middle of the browser so there are no scrolling
bars? Please help...thanks in advance

[F8] Nightmare... Please Help
Wasn't even sure where to post this; I'm having problems relating to Flash/CSS/XML and I don't know where things are going wrong...

Anyway, the dillemma: I am making a Flash menu & background for a website with an iframe stacked on top of it (because I need full use of HTML for the pages themselves).

Now, I have two ultimately horrible mockups I did for testing purposes:

http://www.dreamsthunder.com/flash/index.htm
This one works.

http://www.dreamsthunder.com/flash/menu_experiment.html
This one doesn't... except sometimes when I've left the page for a while and then go back and look at it, suddenly the iframe exists again.

Anyway, I want to use the second one because the menu is all set up the way I want it. But I cannot get the iframe to stay stacked on top of the Flash file. So can anyone tell me why z-index is working on the first page, but not the second one?

Also, the links from the menu on the second page are not opening in the iframe. The menu is driven by XML (http://www.dreamsthunder.com/flash/menu.xml)... is there something spectacular about targeting frames in XML that I'm not aware of? The first "Google" link is set to target "main", which is the iframe.

I would appreciate ANY help, although I'm sure not expecting it... *sigh*

The Mac/PC PDF Nightmare
I've read a lot of discussion on how to open PDFs on a Mac via Applescript and on a PC via a .BAT file, but is it possible to create a hybrid CD that would open PDFs on both Mac & PC or would I need to publish 2 separate CDs, one for Mac/one for PC? Has anyone actually created a hybrid CD with this functionality. I really hope this isn't just wishful thinking.

Thanks,
app

Dpi Nightmare
I'm working on a site for a client that he wants to have the End User upload a image on to the site, where the back end saves a main copy and a makes a thumbnail to play with in flash. Then the End User can reposition and scale the thumbnail image on a silhouette of a snowboard. After we save this custom boards on a database. Later then client opens the End Users account and reproduces this on a real size board.

The Problem: One the dpi of the after product has to be 300dpi and the Main image upload has to be that as well.

So I need to know what the dpi of the swf file is so that I may make a proper representation of the image on over the silhouette of the board, that way the End User can see what 100% of the image uploaded will look like in a 1/15th scale representation of it.

I think from the export option when saving a jpg from flash that it's 72 dpi? Any one know for sure??

AS Nightmare... Help Pls
Yeap...
After 15 aspirines, i still have a headache cause of this stupid code.
I am trying to send values between swf.
But something weird is happening... in one of the swf, the code seem to not work, but looks ok...
The idea is that after clicking on the red square, it will send a new value to the OTHER flash movie that is inside of a html.
I will upload both of them so u guys can give me a hand, pls...
Just change the actuall addresses of the files...
Thanks.
Leo.

AS Nightmare
Hi,

I have a problem with sound. I just dont's seem to be able to mute a background loop out without muting every sound playing.

fla files

the vol.fla has a movie container which loads in the mute button with attached sound. The mute works fine as a stand-alone .swf but not when loaded into vol.

Also, this 'vol.swf' is loaded into another main movie into level7. The problem there is that when it is supposed to mute the bg music, it mutes everything!!!!!

Could someone out there take a look and tell me where I am going wrong please.

Wez

LocalToGlobal Nightmare
I have been at this for about a day now and am getting quite frustrated with the whole thing. I have a movieClip that is contained inside another clip which I need to get the global coordinates from its local position. I then need to set these coordinates to another movie clip on stage.

This code is all contained on one button on stage...
----------------------------------------------------------
if (pla == 2) {
myobj = new Object();
myobj.x = "_root.top.12._x";
myobj.y = "_root.side.11._y";
localToGlobal(myobj);
setProperty (_root.ball, _x, Number(myobj.x));
setProperty (_root.ball, _y, Number(myobj.y));
gotoAndStop (5);
}

----------------------------------------------------------

Any help would be appreciated.

Thanks,
liamsan

Scrollbar Nightmare
I have got several pages on a website which need to scroll. So far i have got an up and down arrow so that when you rollover them it scrolls the text. I have also go a 'fake' scrollbar which is just tweened. Is there any code i can put on this so that i can grab it and scroll the text with that aswell as the arrows?

mucho help would be appreciated!

Variable Nightmare
Could someone explain this to me once and for all.

Okay...I'm talking about basic basic variable stuff.
Let's say I have a button. When you roll over it...I want a menu to motion tween
onto the stage. And when you roll off of it...I want the menu to motion tween off.
SO I create a movie clip...with the motion in animation and the motion out animation.
I throw a couple of stop actions in there and some frame labels so that I can target
the right frame.

Here is what I want to do. If the user rolls off the button before the movie clip
reaches it's fully extended position......I want it to reverse it's frames and go back.
Or just disappear. Either way. What I don't want it to do...is suddenly jump to the
fade out label.....creating a jumpy effect.

The coding I'm looking for must be simple...but I've never done it.
ALl I need is something that tells flash...that when the movie clip reaches it's fully
extended position...then something =1, if not...something =0. If whatever is equal to 1,
then play the fade out.....if whatever isn't= to 1 than play previous frame, or go to and
stop at some blank frame.

I have the idea...just don't know how to implement it.

HELP>

Thanks.

Navigational Nightmare
Need HELP!!!!
I have a movie which can be viewed using a click through navigation system or sat through automatically. To do this I have two movies back to back and leap from one to another depending on the users selection. Unfortunately with 14,000 frames this can't be done. Is there anyway of implamenting this system with just one movie.
Cheers

Variable Nightmare
hi, does anyone know if its possible to change the variables in one movieclip from another movieclip? when i tried this using

graphics.menu._visible = true

the menu was not visible when i finally got there. is my script wrong or is this not possible? help please.

Navigation Nightmare
Hi,

I have a flash navigation on a html page which is sitting in a table (the site doesn't use frames).

The problem is when i click on the button it goes to the html page but doen't stay on the frame i have specified because the flash and the html are in one page it loads the movie again to the start.

I need to find a way to tell it to stop on the frame it is on once the new url has loaded. I beleive this is done with an fs_command and a flash method ( a piece of javavscript in the head of the html) but can't find an example of this and can't seem to work it out.

Can anyone help PLEEEEAAASSSEE!

Thank you very much for any replies.

Jas

Preloader Nightmare...please Help
I have been searching, downloading and reading tutorials ALL DAY! ugh...

I have a VERY basic preloader in frame 1 and a stop action. On frame 2 I have 2 movie clips. The first mc is 23 frames and the second one is 210 frames long.

I want to preload the 2 movieclips and then have it start playing.
Here is my code:

onClipEvent (enterFrame) {
ifFrameLoaded (210) {
_root.gotoAndPlay(5);
}
}

Thank you in advance! jd

Preloading Nightmare.. Please Help.... ;'(
Hi everybody,
yet again I hope for some kind soul to have mercy on me and show me the way...

I've done this site which has a preloader that loads the intro, then starts paying it while the rest of the site downloads... just the usual...
Now I want to add a progressbar to indicate how much has loaded - just to give the visitor an idea.

My problem is that I have no idea how to implement the AS in a way that it will recognise the bytes for the intro only, rather than the whole site.

The AS I have in place at the moment will indicate the whole bytes of the site, then after 20% or so - the intro starts paying - which just looks wrong.... I've tried so many different angles, but not exactly being the script genius ( I WISH) - I just can't figure it out...

Anyway, here's what I've got there at the moment:

total_bytes = _root.getBytesTotal();
loaded_bytes = _root.getBytesLoaded();
remaining_bytes = total_bytes-loaded_bytes;
percent_done = int((loaded_bytes/total_bytes)*100);
bar.gotoAndStop(percent_done);
ifFrameLoaded ("intro", 250) {
gotoAndPlay("intro", 1);
}

Depths Nightmare
I have some button components that each one creates an empty mc to draw a curve on. How do I set the depth, so that every emty mc gets a different depth? They all execute at the same time, and I want the depth to be lower then the component.
As it is now, the empty drawing mcs has the same depth, but this screws up. Click here to have a look yourself--> http://webzone.k3.mah.se/kit01051/mx...interface.html

roll over all the buttons a few times, and you should see the nasty turn the design takes. I need your help, dude, this is ugly. Spanks u very much

HAVING A NIGHTMARE - CGI Forms
I'm working on a Flash website and i need to include a form to fill in with a 'submit' button....

I am a very novice actionscriptor, so could someone/ anyone give me a detailed account of what to do. I've created all the fields and done a 'clear' button but the 'submit' is confusing the life out of me.

DON'T ASSUME I KNOW ANYTHING. Be as basic as you can it'd be much appreciated.

Cheers

Decimal Nightmare
I have an input text field where the user needs to enter 3 numbers. As the user enters the numbers I need to have the numbers display as starting from the tenths place and working up. To make this clearer lets say they were to enter "989" when the type the first 9 it needs to appear as .9; then when they type the "8" it needs to be 9.8 and lastly when they type the second 9 it needs to show up as 98.9.
Can anyone help me out, I don't have alot of actionscript experience so you may have to walk me through the code or just provide code that works. THANKS!

Combo Box Nightmare
I have a combo box that is getting its information from an array, is what i need to do is have combo box 1 populate another combo box with an array based on what was clicked on.

Hopefully this makes sense.

Thanks in advance for the help

Nightmare Sound
got a problem with sound jumping scenes i have an intro loop followed by a standard loop.

the intro comes in fine:

frame1

_global.Music1 = new Sound(this);
_global.Music1.attachSound("mineloop");
_global.Music1.start();


the problem is that i need to switch to the second loop at its end regardless of where the movie is in its scene/stage so i wrote it into a function:


_global.myfunction = function() {
if (_global.Music1.position>=37280) {
_global.Music1.stop("mineintro");
_global.Music = new Sound("mineloop");
_global.Music.attachSound("mineloop");
_global.Music.start(0, 99);
_global.done = true;
} else {
play();
}
}


ok so that should test for the end of the sound in milliseconds but i cant't seem to get it to detect when it happens without using a while loop - which stops the movie and chrash's the test due to it proccessing.

how the hell do i do this!!!!
i need it to be controlled by a single frame at the start of the first scene so it runs smoothly - any help appreciated!!

cheers

Function Nightmare
Here's what's happening. I have a main movie into which I load another movie. In the loaded movie I lay out a valid and simple function called larry(); on the first frame of the main timeline. It goes like this:

function larry () {
textbox.loadVariables("TEXT/larry.txt");
}

Now, I have a movie clip on the main timeline which contains a frame which tries to invoke the function on the main timeline like this:

larry();

It will not work. Does anyone know how to target this funtion from a movie clip? It would be a major help.

Thanks.

Class Nightmare
AAlright people,

Now I seem to be having a nightmare here, and after a few hours I've come to the conclusion that i really dont know what im doing and that statistically, a dead monkey without the use of his arms would probably have figured this out ages ago,

Ive got this function that creates a circle using the drawing API of Flash, its not exact i know but for the time being it works. what i cant seem to do is make this into some type of class so that i can simply go:


Code:
circle = new circleFunction()
hmm what to do??????

Anyway if anyone can figure this out Id be greatful, i know im going wrong somwwhere


Code:
init = function (radius, res, centreX, centreY) {
this._quality = "LOW";
//this._x = Stage.width/2;
//this._y = Stage.height/2;
var angle = 360/res;
x = (Math.sin((angle*res)*Math.PI/180)*radius)+centreX;
y = (Math.cos((angle*res)*Math.PI/180)*radius)+centreY;
this["circ"+a].lineStyle(0, 0x0000FF, 100);
this["circ"+a].beginFill(0xFF0000, 20);
this["circ"+a].moveTo(y, x);
this.point = [];
for (var i = 1; i<=res; i++) {
this.pointNum++;
var ang = angle*i;
xpos = (Math.sin(ang*Math.PI/180)*radius)+centreX;
ypos = (Math.cos(ang*Math.PI/180)*radius)+centreY;
this.point["pos"+i] = [];
this.point["pos"+i].x = xpos;
this.point["pos"+i].y = ypos;
this["circ"+a].lineTo(ypos, xpos);
}
this["circ"+a].endFill();
};
mapes = new init(100, 100, 10, 10);

PRELOAD NIGHTMARE - Please Help
I'm having major difficulty finding any information on how to preload from an external loaded movie named "slide.swf" to preload a MC and specific frames on _level0 and preload 3 external .swf files too...

Is this even possible? I just seem to be going around in circles with this! Any help would be really apprecaited

ps. i'm using flash mx

Please Help With Is Nightmare Of A Problem
Hey there. What kind of work is involved in building a forum like the one were in at the moment. My client is interested in people putting there views onto a message board on the site.

It is completely a flash based site.

Illustrator Nightmare
I know this is probably very simple but it is driving me crazy...I am getting an error message when I try importing my illustrator eps file. It is just a simple shape. I am using Illustrator 10 but I have tried saving in all different versions. Also, when I past the element into Flash it is not smooth. The edges are jagged. Please, if someone has a simple solution or something I am missing let me know.

Fullscreen NIghTMaRe
Please help!

I have an start movie that has on frame 1

fscommand("fullscreen", "true");
fscommand("allowscale", "false");

and on frame 2

loadMovie("intro.swf", _root.clip1);
stop();

in the movie intro.swf i have no fullframe commands as this should be set by the first movie. yet when i play these movies it jumps to a small screen on the mac. .. .

please help, deadline approaching. . . .

tasVino

My Preloading Nightmare
well, here's the script I'm using:

myLoader = new MovieClipLoader();
myListener = new Object();
myListener.onLoadStart = function(clip) {
pBar1.label = "Now Loading: "+ clip;
};
myListener.onLoadProgress = function(clip, bytesLoaded, bytesTotal) {
var precentLoaded = int(100*(bytesLoaded/bytesTotal));
pBar1.setProgress(bytesLoaded, bytesTotal);
pBar1.label = precentLoaded;
};
myListener.onLoadComplete = function(clip) {
bytes= clip.getBytesLoaded();
pBar1.label= bytes + " bytes loaded";
};
myLoader.addListener(myListener);
myLoader.loadClip("test.swf", movC1);

-How do I get the movie clip that's loading to wait until it's entirely loaded to appear. Whenever it loads it show's the movie as it's loading. It's pain.

Mailform Nightmare
anybody knows where can I find working mailform tutorial? I found quite a few for a simple mailform, but none actually worked...
Thanks for any advice
Lee Bosh

Loadmovie Nightmare
I am attempting to use the loadmovie command to get an external swf file on to the stage. I am using flash mx 6. The code works fine on my local machine but when I attempt to upload and view online the swf file does not load. Any help at all?

Preloader Nightmare
Help!!!! I am very new to this. I have made a flash site which is quite image heavy - and now have to make a preloader (the wrong way round I know.) The main scene, and body of the site is a series of movies within movies etc.

Does anyone out there know a really easy way to get a basic preloader running which will cater for the messy way I have made the site?

Library A Nightmare
Hi all.

Being new to Flash (MX), ive found that now that my page is nearing completion, all the testing and discarded ideas have 'plumped' up the library rediculously.

I have over 700 items in there and theyre making the file HUGE! Theres a lot of stuff that simply doesnt need to be in there.

Is there any automated procedures that can shred unneccesary files, or am I going to have to go through one by one which will take an incredible amount of time as Im not sure wether a lot of them do have a use in there?

Thanks for any help

Preloader Nightmare.
I've been through all the previous posts and done everythin that has been advised and still i am having problems.

I hav NO junk in the first frame. Nothin except for the Preloader bar and Dynamic text field.

QUESTION: does 'publishing' or 'previewing' the swf make a difference to whether the preloader will appear or not.

The reason i ask is that i hav uploaded a site now, about 20 times and each time something different has gone wrong with the preloaders.

I have several buttons in my main movie that Load .swfs, and everyone of these .swf's has the same preloader in the first two frames. But when i upload all the files in my website to the net, some of the preloaders work and some don't, plus now, two of my buttons don't work, whereaas they did do before i added the preloaders.

yes i hav checked that the uploaded files are properly linked with the correct file names.

Heres the site in question.

Let me know how it works on urs.

http://nicksonstudios.freeservers.com

Its the 'woman figure' and the 'plane circle' that don't seem to load up the pages. Every other button works in that main menu and every one should hav a preloader, but as u will see, some don't work.

I also hav the trouble of the bar starting at 60% ish and taking a while to appear. I know this is usually because of lots of junk in the first two frames of the swf, but i assure u i hav nothing but the preloader.

Hope someone can shed some light on this please.

Thanx.

Droptarget Nightmare
so we built this paint application
actually, we borrowed it from a book

and it works fine on its own
as soon as we load it into another movie via loadMovie(), it doesnt retrieve anything using the _droptarget command

after searching the board, we found no real solution

does anyone know a fix for this?

we cannot use hitTest because the clips we are coloring overlap, so sometimes it returns many clips, not the top one that was clicked

we really need dropTarget to work

thanks in advance

dan

My Combobox Nightmare
Hi all

already asked the question and have found a variety of suggestions throughout the web, but none work!

I am using Flash MX 2004, flash player 7.
I have a combobox on a movie that is loaded into level 1.
As soon as you try to scroll through the list in the combobox, it closes.

The combobox works perfectly if run as a root movie on level 0, but loaded onto any other level, the combobox won't stay open.
By removing all preloaders, the combobox on level 1 works the first time that the movie loads, and ONLY the first time. If you browse to a different page and then back again, the combobox once again closes as soon as you use the scroll arrows or scrollbar. Forcing a browser refresh isn't much of a solution, but so far it's the only thing that works for me.

I have a copy of the combobox in the library, I tried creating the combobox using actionscript instead of dragging from the library. I tried loading on different levels, I have had no luck!!

I have seen quite a few people ask similar questions, but does anyone have any solution???

Thanks for your time and any suggestions welcome
Cheers
G

MP3 PLAYER NIGHTMARE-Help
Hey there,

I was looking to build a cool mp3 player in Flash mx-I went on the movie section and studied some that were there but wanted to make my own! So-- I have worked on this thing now and lifted some action script code from a mp3 player that was similar to what I wanted.

First of all what is xml? it seems to be a list of all the tracks for the player- where does this come into play??

Now the Flash code I copied was from a mp3 player designed in Flash 5 I believe. I am using MX.

Every thing is exact as far as I see between my mp3 player and the one I used (action script code etc) but---it still won't work!!
I have looked and looked over and over.

Can someone help me out?I am confused as to why it isn't working!
I have attached the .fla source file for the mp3 player I made.

AS2.0 Class Nightmare.
ive written a class Spinner which contains in it a function called spin(), which essentially moves the mc around along the x axis. ive drawn a bunch of shapes and made them into separate mcs. when i export these mcs as actionscrip and set their class to Spinner, and then attach them to my stage via actionscript, everything works fine. HOWEVER, if i place the mc by hand onto the stage and give it a name (say 'shape'), then try make that mc into a spinner, i cant seem to call function spin(). in other words, everything works when i write:

shape=this.attachMovie("s","shape",1);
shape.onEnterFrame=shape.spin;

---

but, it does NOT work if i place the mc onto the stage by hand, and give it an instance name 'shape', and then write:

shape = new Spinner();
shape.onEnterFrame=shape.spin;


is there any way to point mc's that are already on stage to a class? is my syntax just wrong or am i going nuts?

cheers

E-Mail Nightmare
Flash Mx 2004 Professional
Hi guys and Gals I have made an Email page with forms with a submit and reset command buttone how do I get this to email me the information from the forms?

I guess its with a mailto:**********;Body {form1},{form2},{form2})
)
!!!!!!!!!!!

Has anybody got an example? or a know of a tutorial?

Regards

Kev

Tweening Nightmare Can You Help?
Hi all, I'm trying to make it so that I have an object, that first I move using a motion tween, then I morph it using a shape tween - what I cannot get is how to follow one from the other - I can create either on it's own, but I cannot figure out how to go from motion to shape...I can't see what I'm doing wrong!!

Telltarget Nightmare.
Hopefully I make sense. It's been a long day.

When using telltarget, is the swf that's being replaced able to stay visible until the loading movie is complete? My home page has a placeholder on it in the form of a movie screen. This movie screen has an image on it along with some animations.When I load a new movie from the homepage( movie2)into the placeholder, I can still see the background of the movie screen as the (movie2)gets loaded (preloader etc.)
If I am viewing (movie2)that has been loaded over top of my movie screen image, and I select a different button to load (movie3), I see the movie screen background under it and not the(movie2) background (which I want).
Is there a way to keep movie2 there while movie3 is transitioning in?

Thanks for any help

My Loader Nightmare
hey there -

I've asked about this before but so far no solutions have worked. After spending so long getting this photo gallery working, loaders are defeating me. Does anyone know a rock solid JPG/external SWF loader to be found anywhere? It needs to allow for the loading a SWF that is almost entirely composed of images that load during run time (they are in the library and get attached on the fly while a gallery is running). Please help. Thank you.

T5

UPDATE: Alternatively, would it be possible to load the pics separately in another swf that acts as a library, and call them from that library like a shared library? Is there a way to make something like this work?

If Statement Nightmare
Ok, here's a problem that is driving me up the wall. I'm trying to do a simple if statement in frame 20 of my top layer which looks like this:


Code:
healthProgramsBtn.onRollOver=function(){
if(where=="lincoln"){
where="lincolnHealth";
play();
}else {
where="hide";
play();
}

}
The first if statement works fine. When I roll over this button first, it plays the correct frame label which is lincolnHealth. When I roll over the Lincoln text button again, I go to the hide frame label, good. However, when I roll back over this button again, instead of playing the lincolnHealth frame label, it plays the hide frame label again, it should play lincolnHealth. I then realized I never set the "where" variable back to "lincolnHealth", so I modified the above code to try this:


Code:
healthProgramsBtn.onRollOver=function(){
if(where=="lincoln"){
where="lincolnHealth";
play();
}else if(where=="lincolnHealth"){
where="hide";
play();
}else if(where=="hide"){
where="lincolnHealth";
play();
}
}
But this doesn't hide the menu either after the third time rolling over the health programs button.

If anyone has the time to take a look at the FLA (stripped down) or suggest my flawed logic I would really appreciate it.

http://midwestwebdesign.net/temp/tour.zip

Button Nightmare Over Here.....
hey,

im having a real problem with buttons. basically i have a scene which opens with 2 buttons. i want one button to do something IF the other one is in a certain position and vice versa. i just cant figure it out. im thinking i have to set a variable or something when one is clicked and then check that variable on the other buttons click?!?! probably very wrong.

if you look at the attached .fla, the circle button closes the box on the right when its clicked. however if the user shuts the box first by clicking the brown bar the circle button still closes the box, thus reopening it to then close it and it looks awful.

i want it so if the box is shut first the circle button still works and goes to a certain frame on click, but not to try and shut the box again.

i hope that makes sense to anyone?

any help is greatly appreciated!

thanks in advance,

jb

Hit Test Nightmare
I have mocked up a simple hit test situation where the user drags a name onto a box to gain the correct answer. The code is shown below.

pawnname_mc.onPress = function () {
this.startDrag(false);
};

pawnname_mc.onRelease = function () {
this.stopDrag()
if (pawnname_mc.hitTest(pawnbox_mc._x, pawnbox_mc._y, true) == true) {
queenname_mc._alpha = 20
}
};

When this code is used as a standalone code on the root timeline then it works fine. However if i then try to make the thing into a movie clip then it just wont work. Does anyone know why?

Transitions Nightmare
I'm having some troubles with transitions and MC's as buttons. I have been reading and searching through the forums and came up with what I have so far. It may be a mess to some of you but I could use some guidance.

I'm trying to assign a variable to my buttons so when a user selects a button it will play the out for the current state then pick-up the variable in order to go to the desired areas intro.

This is what I have currently,

Code:
b1.home_btn.onRollOver = over;
b1.home_btn.onRollOut = out;
b1.home_btn.onRelease = transition;
b1.home_btn.onRelease = function() {
nextpage = "home";
}

b1.gallery_btn.onRollOver = over;
b1.gallery_btn.onRollOut = out;
b1.gallery_btn.onRelease = transition;
b1.home_btn.onRelease = function() {
nextpage = "gallery";
}

b1.featured_btn.onRollOver = over;
b1.featured_btn.onRollOut = out;
b1.featured_btn.onRelease = transition;
b1.home_btn.onRelease = function() {
nextpage = "featured";
}

b1.reflect_btn.onRollOver = over;
b1.reflect_btn.onRollOut = out;
b1.reflect_btn.onRelease = transition;
b1.home_btn.onRelease = function() {
nextpage = "reflect";
}

b1.clients_btn.onRollOver = over;
b1.clients_btn.onRollOut = out;
b1.clients_btn.onRelease = transition;
b1.home_btn.onRelease = function() {
nextpage = "clients";
}

b1.contact_btn.onRollOver = over;
b1.contact_btn.onRollOut = out;
b1.contact_btn.onRelease = transition;
b1.home_btn.onRelease = function() {
nextpage = "contact";
}


function over () {
this.gotoAndPlay("mouse-over");
}

function out () {
this.gotoAndPlay("mouse-out");
}

function transition () {
_root.gotoAndPlay("home-out");
}
I have attached the fla which is not finished.

I would appreciate any help.

Thanks!

SwapDepths Nightmare
Hi there,

I have been struggling with this for ages. I am loading external jpgs into a swf, and using duplicate movieclip I am placing each jpg into a separate instance of a movieclip on a new depth. What I want to do is click on the top movieclip on the highest depth, it to scale up to twice it's size for a few seconds, then to go back to normal size and go to the lowest depth, beneath all the other movieclips. I have managed to get this to work once, you go through each image, it goes to the back, but once you return to the beginning of the pile again, the movieclip scales up and then does nothing.

I was thinking it has something to do with the first movieclip having a new depth of zero that might be causing the problems.

Here is the code for the function I am using:


Code:
function imageload(){
loadVariables(section_path + "/" + "image_info.txt","");
imageMC.onEnterFrame = function(){
if( image_total !== undefined ) {
image_total = parseInt(image_total, 10);
if(image_no < image_total){
image_no++;
imageMC.duplicateMovieClip("imageMC"+image_no, image_no);
_root["imageMC"+image_no].onPress = function(){
startDrag(this);
}

_root["imageMC"+image_no].onRelease = _root["imageMC"+image_no].onReleaseOutside = function(){
currentDepth = this.getDepth();
stopDrag();
this._xscale = 180;
this._yscale = 180;
function wait() {
_root["imageMC"+currentDepth]._xscale = 100;
_root["imageMC"+currentDepth]._yscale = 100;
_root["imageMC"+currentDepth].swapDepths(currentDepth-image_total);
clearInterval(myTimer);
}
myTimer = setInterval(wait, 5000);

}
startPreload(section_path + "/" + image_no + ".jpg");
delete imageMC.onEnterFrame;
} else {
delete imageMC.onEnterFrame;
}

}
}
}
image_info.txt contains the variable image_total and image_no is defined as 0 in another layer. startPreload is the function I am using to load in the external jpgs. If anyone can see where my code is going wrong then let me know, or maybe there is an easier way to do this then I am open to all sugestions.

Thanks,

Bob
www.bobcooper.org.uk

My Navigation NIGHTMARE
I'm "just" trying to link the pages together, but I can't figure out how to make flexible, modular navigation for my website:

http://lsinteractive.com/chuckozeas/

(it works only up until the first commercial in the "commercials" section)

I tried to hire someone to help from the list but he flaked on me

I'm a beginner and I'm almost through the Ed's Foundation book.

I've searched this list up and down, and still haven't found a solution I understand.

Can someone please help me? Or point me in the right direction?

I need to disable the buttons after they're pressed and I have rollOver frames.

My main navigation code right now looks something pitiful like this:

http://lsinteractive.com/main.fla



Quote:




var myLinks_array:Array = new Array ();
myLinks_array[0] = "commercials/com_jurr5.swf";
myLinks_array[1] = "commercials/com_gmc.swf";


//GMC


gmcMc.onRelease = function ()
{
_root.gotoAndStop("commercialsPg");
_root.commercialsMc.loadMovie(myLinks_array[0]);
gmcMc.gotoAndStop("Press");
gmcMc.enabled=false;


};


gmcMc.onPress = function(){
gmcMc.gotoAndStop("Press");
gmcMc2.enabled=true; // enable back last button
gmcMc2.gotoAndStop("RollOut"); // reset last button to normal state
}

gmcMc.onRollOver = function(){
gmcMc.gotoAndStop("RollOver");
}

gmcMc.onRollOut = function(){
gmcMc.gotoAndStop("RollOut");
}


//GMC2


gmcMc2.onRelease = function ()
{
_root.gotoAndStop("commercialsPg");
_root.commercialsMc.loadMovie(myLinks_array[1]);
gmcMc2.gotoAndStop("Press");
gmcMc2.enabled=false;


};


gmcMc2.onPress = function(){
gmcMc2.gotoAndStop("Press");
gmcMc.enabled=true; // enable back last button
gmcMc.gotoAndStop("RollOut"); // reset last button to normal state

}

gmcMc2.onRollOver = function(){
gmcMc2.gotoAndStop("RollOver");
}

gmcMc2.onRollOut = function(){
gmcMc2.gotoAndStop("RollOut");
}

Copyright © 2005-08 www.BigResource.com, All rights reserved