Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 02-14-2006, 10:38 AM   #1
aussie01
Registered User
 
Join Date: Mar 2005
Posts: 15
Default Loading External .jpg into ScrollPane. 99% there!

Hi,

I'm trying to have an external jpeg load into a scrollpane. Everything is working fine, I've even got a preloader for the jpeg. Only thing is that the loaded jpeg doesn't fit get masked by the scrollpane, and the scrollpane doesn't give a scrollbar to move the jpeg.

Here is the code I've used...

Code:
champscroll.loadMovie("http://www.sportstv.eu.com/ChampionshipList.jpg");
loadingBar._xscale = 1;
loadingBar.onEnterFrame = function(){
	kBytesLoaded = this._parent.champscroll.getBytesLoaded() / 1024;
	kBytesTotal = this._parent.champscroll.getBytesTotal() / 1024;
	percentage = Math.round(kBytesLoaded / kBytesTotal * 100);
	this._xscale = percentage;
	if (percentage < 99.9) {
		loadingBar._alpha = 100;
		bar2box._alpha = 100;
	}
	if (percentage == 100) {
		delete this.onEnterFrame;
		loadingBar._alpha = 0;
		bar2box._alpha = 0;
	}
}
loadingBar and bar2box are parts of the preloader. champscroll is the scrollpane and ChampionshipList.jpg is the external jpeg, obviously.

Does anyone have any ideas? I've tried to use redraw and refreshPane after the above code but they didn't work.

Thanks for any help.
aussie01 is offline   Reply With Quote
Old 02-14-2006, 11:02 AM   #2
skjc
Registered User
 
Join Date: Oct 2004
Location: Southampton UK
Posts: 336
Default

as far as i am aware you will have to load the movie into the scrollpane.contentPath -

look up .contentPath and .content - you should find your answer

you may also want to look at .setSize as well if you want to resize the scrollpane
skjc is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Loading clips into scrollpane and MovieClipLoader snazzyslippers Components 2 04-05-2005 12:40 AM
How to track status of external mc busy loading... Pyralis_Ryu ActionScript 1.0 (and below) 0 04-09-2003 04:42 PM
when i invoke external images how can i add loading bar dreamnet ActionScript 1.0 (and below) 1 03-31-2003 02:40 AM
Loading External SWF wipes out nav? sensoria ActionScript 1.0 (and below) 5 04-18-2002 10:22 PM
loading big external movies matbatstudioz ActionScript 1.0 (and below) 1 03-18-2001 06:22 AM


All times are GMT. The time now is 07:30 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.