Skip to main content
Known Participant
March 6, 2013
Question

Urgent Help! Import Class errors

  • March 6, 2013
  • 1 reply
  • 396 views

Hello,

I have a flash based site (CS4/AS3) with multiple pages and on each page, when click a certain btn, i have a xml image gallery.

I recently bought a xml gallery and have some problems gettin it to work..and the support team doesnt respond so i'm hoping u can help me. It.s not very complicated but i have some problems understanding some things.

Here is the documentation of the gallery > https://dl.dropbox.com/u/21765376/Portfolio_Flash_Gallery.pdf. I managed to configure the gallery but have problems embed it to my .fla project.

This is what i have done so far according to the documentation: i copied the lightBoxLoader to my .fla file; Then created a keyframe on the page that i need to display the gallery and paste this:

import src.Portfolio;

stop();

var myPortfolio:Portfolio;

if ( stage.loaderInfo.parameters["XmlFilePath"]!=null)

    myPortfolio= new Portfolio(String(stage.loaderInfo.parameters["XmlFilePath"]));

else

    myPortfolio= new Portfolio("xml/config.xml");

   

addChild(myPortfolio);

When test movie : 1172: Definition src:Portfolio could not be found.

Then on that as keyframe, clicked the stage and in the prop panel named Class: Portfolio >> 1172: Definition src:Portfolio could not be found.- import src.Portfolio;  /   1137: Incorrect number of arguments.  Expected no more than 0. - myPortfolio= new Portfolio(String(stage.loaderInfo.parameters["XmlFilePath"]));   / 1137: Incorrect number of arguments.  Expected no more  -  myPortfolio= new Portfolio("xml/config.xml");than 0.

Folders r structured like this:     Desktop(C...)/SITE  >> and here  i have Portfolio .fla,which contains the lightBoxLoader + the gallery folders (images>btns,thumbs,view  | src> Portfolio Actionscript file   |  xml > config )  + my site .fla with necessasry assets.

I also  modified > Publish settings/Flash/Actionscript settings / Source path - and here put  "../src" .

I know i/m missing something but dont know what, im not pro at AS3!

I hope u understand my problem and can give me a solution!

Please!

Thank You!.

This topic has been closed for replies.

1 reply

Amy Blankenship
Legend
March 7, 2013

It seems that your Portfolio constructor is not supposed to take any arguments.