Pages: [1]
  Print  
Author Topic: Nav page problems.  (Read 742 times)
DimensionB
Gaia Novice
*
Posts: 5


« on: December 24, 2008, 06:12:40 AM »

Hi.

I'm new to Gaia, but not to AS3 and Flash.

Yesterday i've started creating a website using Gaia. Created the project, Scaffolded it, then commented "Scaffold(this)" in all the pages. Pasted layout jpg's to my pages. Everything was fine and project worked in a proper manner.  There will be a top menu in my website, so i've decided to implement it into "nav.fla".

I have created MovieClip with a black rectangle in it. Dragged to te stage and named instance as "mcRect". After that my nav page started to throw an error:

ReferenceError: Error #1056: Cannot create property mcRect on com.puppetmaster.pages.NavPage.
   at flash.display::Sprite/flash.display:Sprite::constructChildren()
   at flash.display::Sprite$iinit()
   at flash.display::MovieClip$iinit()
   at com.gaiaframework.templates::AbstractBase$iinit()
   at com.gaiaframework.templates::AbstractPage$iinit()
   at com.puppetmaster.pages::NavPage$iinit()

Before that everything worked fine.

When i remove instance name everyhing works fine. The problem appears only when i set instance name to thet MovieClip.

I use last version of Gaia.
Logged
DimensionB
Gaia Novice
*
Posts: 5


« Reply #1 on: December 24, 2008, 06:19:55 AM »

It started working after i've checked "Automatically declare stage instances" in the publish settings. anyways, it's pretty strange.

Maybe someone can explain me how should i work without changing this setting?
Logged
DimensionB
Gaia Novice
*
Posts: 5


« Reply #2 on: December 24, 2008, 06:24:43 AM »

The problem is solved now.


Thanks. No help needed anymore.
Logged
danieltome
Gaia Novice
*
Posts: 1


« Reply #3 on: September 06, 2010, 05:56:26 PM »

The problem is solved now.


Thanks. No help needed anymore.

Can you reply what your solution was?
Logged
filthstift
Gaia Novice
*
Posts: 5


« Reply #4 on: December 01, 2010, 04:19:24 AM »

Yeah, I've got the same error problem now. I am also struggling with it.

It helps other people if you explain the way you fixed it.


I hope you can help me with it.



Thanks
Logged
filthstift
Gaia Novice
*
Posts: 5


« Reply #5 on: December 01, 2010, 04:29:01 AM »

Ok,


Instead of creating a new MovieClip and put it on you stage in any FLA, delete it from the Stage and create a "Class name" for your Movieclip in the properties window.

After that, go to your .as file of your .fla and add it to the scene with this code.

var button:MyButton = new MyButton();
addChild(button);

Basic as3 though.


Can anyone tell me why it isn't possible to create movieclips on stage and give it an "instance name" instead of making a class of every object(movieclip) ?
Logged
Ramiro
Moderator
Gaia Addict
*****
Posts: 825


interactive pragmatism


« Reply #6 on: December 01, 2010, 05:40:01 AM »

The problem was solved because he checked "automatically declare stage instances" in the fla settings. Other way to solve it is to create public properties in the document class with the same names as the named movieclips in the stage.
Logged
Pages: [1]
  Print  
 
Jump to:  

TinyPortal v1.0 beta 4 © Bloc