Flash and PHPWCMS

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
shocktone
Posts: 74
Joined: Thu 19. Aug 2004, 17:33
Location: Duesseldorf. Germany

Flash and PHPWCMS

Post by shocktone »

I would like to use Flash in phpwcms. There should be an animated banner on the top of the page. Does the banner reload everytime I click to the next page or does it stay ? I don't want the movie to restart eveytime.


Greetings Jens.
User avatar
pSouper
Posts: 1552
Joined: Tue 11. Nov 2003, 15:45
Location: London
Contact:

Post by pSouper »

yup: though after the first time is is likely to be refreshed by the browser from its cache and not dowloaded from your server every time.

any multimedia will restart on each new page & refresh. this includes animation, video, flash, shockwave & sound.
shocktone
Posts: 74
Joined: Thu 19. Aug 2004, 17:33
Location: Duesseldorf. Germany

Post by shocktone »

the only solution would be with frames. right ?
User avatar
isac
Posts: 410
Joined: Tue 18. Nov 2003, 13:13
Location: Portugal
Contact:

Post by isac »

Hi,

Maybe there is, somewere, a flash forum were you can find some help to build your banner animation. I think will be possible to make an action script that will check if the animation was already played, and jump to last frame off animation where there is the stop(); funtion.

Im not a flash fan, but i think this solution is possible.

cumps,
Isac.
dr.swank
Posts: 41
Joined: Sun 14. Dec 2003, 23:52

Post by dr.swank »

hi shocktone,

the solution is to use a sharedObject. have a look at:

http://www.markme.com/nigel/

Nigel is one of the developers at MM. on the menu at the right goto

Tutorials/this menu

and have a look at the code.

cheers, doc

ps. you can see how this works inside a frameset at:

http://bonn-shido.de/

in progress..
Last edited by dr.swank on Sat 26. Feb 2005, 12:34, edited 1 time in total.
Image
User avatar
jsw_nz
Posts: 907
Joined: Fri 2. Apr 2004, 02:42
Location: New Zealand

Post by jsw_nz »

I am assuming you have the Flash authoring tool....
In your flash banner you would do a 'quick check' of the download status.
If already loaded...lets skip the animation, otherwise play the animation sequence as the entire flash(swf) downloads.

STATUS:
On the first request (from server) it would return "_root.skipAnimation=0'
On the second request (from cache) it would return "_root.skipAnimation=1'

To get this variable you would call the function: checkLoad();

Code: Select all

function checkLoad() {
	root_percentLoaded = Math.ceil((_root.getBytesLoaded()/_root.getBytesTotal())*100);
	if (root_percentLoaded == 100 ) {
		_root.skipAnimation=1;
	}else{
		_root.skipAnimation=0;
	}
}
Then you would implement a frame script to query the variable using this actionscript:

Code: Select all

if (_root.skipAnimation == 0) {
	gotoAndPlay("animation_sequence");
} else {
	gotoAndPlay("preloaded");
}

In my case, I used it on the banner I created for a recent project. The first load shows an animation and then loads an external image (swf format) after fully downlaod. All subsequent pages skip the animation and load the image directly:

http://www.opinz.co.uk/index.php?home

Hope this helps

PS: Dr. Swank has a good approach using SharedObject. I used the same apprach to load unique images on every page refresh. I would query the shardObject in flash, then load the next image based on the last loaded image that was previously recorded to SharedObject. (something like a 'flash cookie')

Cheers,
jsw_nz(john)
cikalong
Posts: 4
Joined: Sat 26. Feb 2005, 03:28

Post by cikalong »

dear john,

i'm new in here, just view your website and i'm so interested the way it's look liked, could you please help me to built one? have to be patient with me..
User avatar
jsw_nz
Posts: 907
Joined: Fri 2. Apr 2004, 02:42
Location: New Zealand

Post by jsw_nz »

Hi Cikalong,

Why not PM me....perhaps I can take a look at your requirements....
might need your source.

:) John
Post Reply