Search…

X3 Photo Gallery Support Forums

Search…
 
User avatar
Inertia
Topic Author
Posts: 9
Joined: 19 May 2009, 08:38

Background issue - SWF

22 May 2009, 14:50

Hello,

I recently purchased Imagevue and I've set up my gallery. I'm pretty familiar with some php, html and css, however my Flash is somewhat limited. I've searched the forums, searched google but unfortunately I cannot find an answer to my problem, hence my post.

In the template - Firestarter, the background is swf. I've created and using a swf background in a new template I've done. However, the swf background in Firestarter stays in place when you resize, which looks wonderful. My swf background ends up "moving" each time the window is changed and only returns back to the bottom right position on refresh.

Link so you can see:

http://enchantedcanvas.com/Gallery/#/content/1/

If you resize the broswer window, you'll see what I mean. I would love for the background to remained "fixed" like the Firestarter background does but not sure exactly what code to put.

The AS is 2.0, and I've checked to make sure that on the template config I have it set to noScale, alignment is bottom right.

The AS code I'm using is as follows:
Code
fireflays =function(maxF) {
	this.createEmptyMovieClip("fireflay_mc",this.getNextHighestDepth());
	fireflay_mc.attachMovie("fireflay", "f", fireflay_mc.getNextHighestDepth());
	no_f=1;
	
	duplicateFirefly = function(){
		fireflay_mc.f.duplicateMovieClip(["f"+no_f], no_f);
		fireflay_mc["f"+no_f]._x=Math.random()*Stage.width;
		fireflay_mc["f"+no_f]._y=Math.random()*Stage.height;
		fireflay_mc["f"+no_f]._alpha=Math.random()*100;
		fireflay_mc["f"+no_f]._rotation=Math.random()*360;
		//fireflay_mc["f"+no_f]._xscale=fireflay_mc["f"+no_f]._yscale=Math.random()*100; //scale firefly
		no_f++;
		if(no_f>maxF) clearInterval(fireflayID);
	 }
	fireflayID = setInterval(duplicateFirefly, 100);  
}

fireflays(100); 
The Flash file is "Transparent", aligned Right, position Right Bottom, and is also noScale.

It is the main "image" in the flash that doesn't stay put. I thought about adding the image via CSS, and having the swf just be the "dots", however it doesn't show on the template as I think the swf overrides it.

I hope this makes sense, and if you need anything more from me, please ask. I have searched far and wide before coming here, as it helps me learn but I've truly hit a brick wall!

Thanks so much :D
 
User avatar
Inertia
Topic Author
Posts: 9
Joined: 19 May 2009, 08:38

22 May 2009, 14:59

after posting I posted this code in frame one of the Flash.
Code
Stage.scaleMode = "noScale";
I thought it would automatically set that on publishing, but apparently not.

:shock:

It maintains the image in position, however, with this in the flash, it doesn't allow the "dots" or the swf action to work.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

23 May 2009, 09:45

This issue has a logical explanation. When aligning your background to the BOTTOM RIGHT, it uses the width and height of your SWF to caluclate the position. Since the width and height of your background is changing based on the dynamic contents, it won ´t be able to position your background correctly.

Why does this work with firestarter theme? Because I made sure that the dynamic effects did not exceed the bottom and right side of the background.

If you add your background to top left, I dont think this would be a problem. If you are going to place it at bottom right, you will need to take this into consideration. A workaround is to make a background vector area cover the entire area of where the dynamic effects may appear. This way, the effects will not have any effect on the movieclip width or height since it is within the static area.
 
User avatar
Inertia
Topic Author
Posts: 9
Joined: 19 May 2009, 08:38

23 May 2009, 12:26

Hmm.. I figured it would be something simple :(

As I said, I'm relatively new to Flash, so this has been a learning experience hah.

I've fixed it now. I did separate action script for the "dots" setting a max size etc and it is all working well. Now I can finalize my site.

Thank you so much for your help!
 
gadgetologist
Experienced
Posts: 123
Joined: 06 May 2009, 18:48

23 May 2009, 13:36

Really love the work of the artist you're working with.
 
User avatar
Inertia
Topic Author
Posts: 9
Joined: 19 May 2009, 08:38

23 May 2009, 16:02

Heh.. thank you :oops:

It's me :D

I am the Artist -smiles-
 
User avatar
Nick
Imagevue Hitman
Posts: 2872
Joined: 02 May 2006, 09:13

25 May 2009, 03:46

Whoa, cool, the only thing... On the background there is girl with the wings, and its rotated vertically. Now it looks like she's been flying carelessly and hit the skyscraper accidently.
firedev.com
 
User avatar
Inertia
Topic Author
Posts: 9
Joined: 19 May 2009, 08:38

25 May 2009, 07:35

LOL I suppose she does. Only that is the way I had the original image painted, with her in that position. I didn't want to deviate from the original, but now you have me thinking otherwise :D

Thanks XD