Skip to main content
Inspiring
February 26, 2009
Question

Communicating between classes

  • February 26, 2009
  • 2 replies
  • 575 views
Hi,

I am having problem making classes to communicate. I have main class which loads external swf that contains one image at this time. I want to change alpha for that image using button (created from library) from main swf.
Don't know how, various methods I tried gave various error messages.

Here is the code for both classes:
This topic has been closed for replies.

2 replies

igreckAuthor
Inspiring
February 27, 2009
Does anyone have any idea how to achieve this?
Inspiring
February 27, 2009
Try casting loader.content to SlideShow.

TS
igreckAuthor
Inspiring
March 1, 2009
Hi,
It worked.
Now, instead of image I tried to put 3rd party component (SlideShowPro) which gave me these errors when I tested Main.as:

1046: Type was not found or was not a compile-time constant: SlideShowPro
1180: Call to a possibly undefined method SlideShowPro
1172: Definition net.slideshowpro.slideshowpro could not be found

I am obviously missing something but what?

Here is the code for both classes:


Darshan_Rane
Inspiring
February 26, 2009
Hi
Make the myImage variable in Another Class public

then access it using
loaderAbout.myImage.alpha = .50;
igreckAuthor
Inspiring
February 26, 2009
Unfortunately it didn't work either, gave me the same error.