User UIComponent Initalisation Failes / init() never called

  • CrazeydAVE
  • Born
  • Born
  • CrazeydAVE
  • Posts: 4

Post 3+ Months Ago

:x

Hello I have recently returned to computers after an enforced break !
Sorry I don't time to introduce my self, i will later,

But in the meantime i could really do with a question answered, please. But before I ask here's a little background.

I have been contracted to construct two 'financial services' webs sites one a simple (mostly text content) XHTML/CSS design (great fine love XHTML and CSS).

The second however is a flash map (well i have'nt seen one of them before :wink: )

The problem is with my flash map..... ( it would be :x )

I have constucted a number of components (extending UIComponent) which until recently worked fine ( until I added in a 'bytes' preloader ).

Now after rearraging my timeline moving the 'export' point one of my components has stopped initalising ( e.g. the init() function is never called neither is createChildren() but set enabled is !!!)

My question is Does anybody know any reasons that cause UIComponent init()/createChildren() functions to be bypassed. !!

Regards

David Paterson
  • Abelius
  • Proficient
  • Proficient
  • User avatar
  • Posts: 260
  • Loc: Miami Beach, FL, USA

Post 3+ Months Ago

Two questions:

1) You said you utilized a preloader component. Is it set in a separate SCENE from the rest of the contnet?

2) Is the init() code in the first frame of the (hopefully) second scene? Because if the preloader is in the same place and it is making the typical
---got_All? ---> Yes? ---> OK, go ahead ---> No? ---> Ok, keep loading...
cycle, then that cycle might be to blame that the init() function is never been caled...
  • CrazeydAVE
  • Born
  • Born
  • CrazeydAVE
  • Posts: 4

Post 3+ Months Ago

Hi Abel,

Thanks for the reply,

1) No the preloader is on the one and only scene, but it has been removed !!! and I still get the problem.

2) the init function is a required method on UIComponent and is called during a createObject call or by the system if the component is on the stage.

Regards

Dave 'Crazey dAVE' Paterson
  • Abelius
  • Proficient
  • Proficient
  • User avatar
  • Posts: 260
  • Loc: Miami Beach, FL, USA

Post 3+ Months Ago

OK, without seeing the actual code and if you managed to get rid of the preloader, I would say: How problematic would it be for you to start from the point where the component WAS working, that is right before you added that preloader...?
  • CrazeydAVE
  • Born
  • Born
  • CrazeydAVE
  • Posts: 4

Post 3+ Months Ago

Hi Abel,

Could go back but this would mean defeat

this is a flagship web-site.

I should explain that iam a experienced desktop application developer, who has been do other things and has recently come back to IT.

i have in the past considered the web to be a interesting if not nightmareish ( for development/support ) area.

But with the introduction of XML, XHTML and CSS support into the modern browsers + PHP 8) I thought it was about time i tested my skills on the web.

I have already created a very simple site for a client (http://www.bacapital.co.uk) ( <- a graphic artist iam not ) using the above and manged to get it validate as XHTML strict ( bye bye flash) and render on all the modern win32 browsers. (mac's still a problem)

i have also considered in the past flash a nice pretty toy with poor debugging support and a strange scripting language ( it still is strange but I have growing affection for it, AS2 atleast anyway but the debugger is in a word 'pathetic' the MSWord 6 WordBASIC debugger was better ( but not much :lol: ) )

so i have created this smart solution for my client and now i need to know why the initialise sequence is failing !!

since you previous post I have continued to investigate the problem

i have tried moving the export point for the base classes and the component back to the first frame ( no joy ).

i have tried using the attachMovie and createObject calls to create the component and i get the same result a 256 recurrsion error.

the linkage and component definiations are correct and I have created a fresh movie clip for the class to 'link' to (no joy either ).

i have tried removing all the initalisation code from the component ( from init() and createChildren()) ( no joy)

in other words i stumped again all i can think ( in the back of my mind ) is that flash has stuffed the file ( and I hate blaming tools ).

have you ever heard of a site/page releating to flash component development that has a section on common errors.

regards

Dave P
  • Abelius
  • Proficient
  • Proficient
  • User avatar
  • Posts: 260
  • Loc: Miami Beach, FL, USA

Post 3+ Months Ago

Alas, my hat to you, my friend...! You've outdone me by quite a mile, and I am not being humble here... :)

Well, the three closest solutions (talking about websites) are:

http://www.actionscript-toolbox.com
http://www.actionscipt.org
and http://www.flashkit.com, apart of the mother site of all, of course...
  • CrazeydAVE
  • Born
  • Born
  • CrazeydAVE
  • Posts: 4

Post 3+ Months Ago

:lol: Cheers Abel,

I have had some success with this but only by copying the class file and giving this class/linkage a new name together with a new movieclip. ( I initalialy commented out all the code :roll: ). And bingo the clip loads correctly.. not much help but nice to see the movie again after nearly 4.5 days :D.
I then uncommented the init() and createChildren() functions (no changes to the code) and bingo I have a component that loads and initalises... but i don't have a clue why :? ( i did all this with the other class).

So I now have to uncomment the user methods and see what happens then...... then one i'm most interested in is the enabled get/set methods (could be trouble ahead).

Thanks for all the help, belive me just talking this one out has helped loads (good to know I'm not going mad (well not completely anyway).

With great thanks Dave P
  • Abelius
  • Proficient
  • Proficient
  • User avatar
  • Posts: 260
  • Loc: Miami Beach, FL, USA

Post 3+ Months Ago

Good... Glad to see I'm not the only Bud-and-ActionScript-addict out there...

And proves how far the language has gotten... :)

Post Information

  • Total Posts in this topic: 8 posts
  • Users browsing this forum: No registered users and 6 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.